From patchwork Tue Oct 3 19:20:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 728826 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1305:b0:23f:8cfb:5ad7 with SMTP id s5csp43427lto; Tue, 3 Oct 2023 12:22:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOINjrSAz8Qdcjf9avxlEyElTUR0sGQYeo9fumpHY8h8TQgQxzshT6UBJ7/U//kQlZKrCE X-Received: by 2002:a0c:a619:0:b0:631:f9ad:1d43 with SMTP id s25-20020a0ca619000000b00631f9ad1d43mr220962qva.14.1696360971246; Tue, 03 Oct 2023 12:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696360971; cv=none; d=google.com; s=arc-20160816; b=w8BZluBNdL8e1BRB6UHKc8rnQvuNioRgWOnRQTsgTGN53GLziYlCllW1sZwKfLZX7t cQ+3bSTGAG4FZ7/pWnGTDkbozog4mSJuFRknUxbgdTmbGmtm6nLWbvlsjOkeyS9H2wFK /R6q/wh7SBPANTBL8pVxeQVPPnYQWCZ3CeHtdSGkyH/LR6P1UOOQ4MLYeDuk1hkyNaZo yd7OJkw4N6vMC25DQ59aziy1h1+h0K16NJjZDAqnbVhxm3o8wSGwafrQXgFu6zaZkRvT 4zVpA7Gb8d9vyya25QiENSj47oBZdsBgNr22Y0FOR7bH29mTQRpGOJ/VZLCCXAIT9/o4 P4fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=4OPqum188XMIDb5aXYhUEallrUuFRh7JykmjZpdIEEM=; fh=YRZ+qgYKjKfO+J7iYLqJ+AhmJljeW1N2qgZkMPPeD1I=; b=cu0iT7oB7a0oFvSWXZK8dz7JoGdySXa5HeVLhQfviNvJ4uzgagzyOBt8eSNJ73F1ct tXtRADhVrKxvByNOYvlWnex1v2Hgpm+UlHPALp0Po84cZkFgbcOItbBvPoi+wRmpFKRK gvEYktfb8aO+oBxQgtKCHwvZoKTnFK+R4CqkuBpaNRCgCkTLrrU+awn6v1Q1PpKcCrlt 1Qy7TpBNQcZfXbsr+uys6LB3OnaCtX2zfMaYp0wJpSiR4ymGc31zT5zTlFSGCtj23vEr /ZYT8me9P79fNYYNpGJrhGHK84lmBJBVi5+/7CjnBhV9w7wY+HxtXLhD/1ZM/BRbS2FE qpHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hj1DHvX+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q17-20020a0cf5d1000000b006561de71bfcsi794617qvm.269.2023.10.03.12.22.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 12:22:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hj1DHvX+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnkwp-0004sA-PC; Tue, 03 Oct 2023 15:20:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnkwk-0004qt-0N for qemu-devel@nongnu.org; Tue, 03 Oct 2023 15:20:42 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnkwR-0004dJ-U9 for qemu-devel@nongnu.org; Tue, 03 Oct 2023 15:20:41 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1c5c91bece9so10445825ad.3 for ; Tue, 03 Oct 2023 12:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696360813; x=1696965613; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4OPqum188XMIDb5aXYhUEallrUuFRh7JykmjZpdIEEM=; b=Hj1DHvX+KcNr/tPdAjnac/2+A8qhRj49XVvxzfM2L9p9ETJJrcYkC+2YBif7WYiQVu qAExuIUAU3lZ95/EuVo7sgvG/3YTR2iX/NcJqeCwopMN8pmLA2QlSM3q+OY8tf9B4uo4 eqELsh2G3FljkDl5lsFec+Z/+t5p8wk4FCcQT1FSZBUDW6sMvtY+LXcvhilLfxF2HfbW LTwSi09BuDODjYZNnQm24MlDggj4RLTfeASVtJLjqqKhkuJLnQVn4x7dqF++srvLgmyu JwhHm9zk3AW59fniDTFMRisdOkIBOpqVzSWowTNh15YmSNaZlfLYjnh09fGKRNFCbqFG Slfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696360813; x=1696965613; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4OPqum188XMIDb5aXYhUEallrUuFRh7JykmjZpdIEEM=; b=jusjQ3eev64ysh7mqL8zEGhudXJ3FZvwiFoN8JfEzdfIcgCTSDMNSG9iIRDO6rzx4A fLH8c5VfPOLa/z4A61xlWEVLXpJWVyFPvgICzxYZ90LL7nYqD/ex01hQBY5FZAvueEjS Av5aCxJwOhd1QnuYW9x6dswZof+fOHRWV2bELy1SUpDGhhNnIxLKeIgiiiqIbJMS5X2L 2MbXvFf9ChxyrDgX5I4zSqCwSKpAxn8MDS0wIlZVEp4KyKe2idiOFlq32z+a3+pTv8O9 q9lS/ny+YDPViV56kcgQnSGi0OfEjkstelanAAgRMvaJLBpLfZNEG260IMf5poFBVKDI oLNg== X-Gm-Message-State: AOJu0YyaYNKflPId6gwquvP+KbhphuIxeL+hsomAEZ4jqHzXu0GdglHC rjYI1s7rc6WAEK0YHT9VlI9edFifa2iR9GpNfso= X-Received: by 2002:a17:903:1c1:b0:1c7:61a1:9695 with SMTP id e1-20020a17090301c100b001c761a19695mr600981plh.20.1696360813487; Tue, 03 Oct 2023 12:20:13 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id w5-20020a170902d3c500b001c5fd2a28d3sm1978497plb.28.2023.10.03.12.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:20:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: laurent@vivier.eu, deller@gmx.de Subject: [PATCH v5 0/9] linux-user: Detect and report host crashes Date: Tue, 3 Oct 2023 12:20:03 -0700 Message-Id: <20231003192012.1674888-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org More signal cleanups. Mostly tested by temporarily adding an abort, divide by zero, undefined instruction, null dereference, within the implementation of a guest syscall to induce an error. Changes for v5: * Remap guest abort, which means we need to try less hard on the host side to handle assertion failures. * Drop the backtrace. Since backtrace_symbols only looks at the dynamic symbol set, we don't much that's useful -- we still need to use the debugger. r~ Helge Deller (1): linux-user: Detect and report host crashes Richard Henderson (8): linux-user: Split out die_with_signal linux-user: Exit not abort in die_with_backtrace linux-user: Only register handlers for core_dump_signal by default linux-user: Map unsupported signals to an out-of-bounds value linux-user: Simplify signal_init linux-user: Split out host_sig{segv,bus}_handler linux-user: Detect and report host SIGILL, SIGFPE, SIGTRAP linux-user: Remap guest SIGABRT linux-user/signal.c | 452 +++++++++++++++++++++++++++++--------------- 1 file changed, 296 insertions(+), 156 deletions(-) Acked-by: Helge Deller