From patchwork Tue Nov 2 11:07:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516681 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp4439582iml; Tue, 2 Nov 2021 04:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/vnnopQrDmRGEumLUaRDl4hLb7g8v3Z0csqY7lzHT6IToyP7uPU7dn8ozQEpf1DEV4QIY X-Received: by 2002:a05:6808:116:: with SMTP id b22mr4815952oie.80.1635854313141; Tue, 02 Nov 2021 04:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635854313; cv=none; d=google.com; s=arc-20160816; b=s2OOcLdBFnvb1cuSVZHNynZUlOQCBKy24q5V0AX38/IdRMzB3IyMy0e6raTCcdl8Ba SbESOFxU4LENup9kPGpSKX0JitVD+GEAB3dFKJeAHijfLHQKma7sh537ycHfmXEvsXdD 5GSrtWhv0nZxBr5gMis3VmN4GwpWew+JMHJZY8Z5MkS2Iqeu/TRz+PEdFB4K8hIPV04u HYQtrcrNrIa2DjbCePh72a388m/XwnTDPqj/wsldbRxSV/0Z/b8k0yzXbjiJtYDHTIC8 SkcTrpU+D1TDz5WWi/ckvb8ToFAIDVUx7oAu+OTXuU8LIwY+dPTR11eUeXj84+OcUhnE WVMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7lLZzifCuDAFtBOJRXRut8iWPXEYL/L2LC9pwY/6QWY=; b=Dhh+HSZa1AGawRJIqqJkFhjcNASOf6BYyeR1NJnl1E0lZ1wlfr+A8uQw7i5ZUx8E4B NiebpAMxBAsVJXsvfKz9L7qbOLdjIf05EoUyhyZNXYlVs6Dagu/F4KxGi1wsIuahDxw0 kKxvTonwz5KhcGbgd+XzPxbYstVVH1wYdfW71eqi3hLX/Tm/SclMrTMl81kB07f02pSh incRvJuW4tIso2jQZ0xtvYN0OsPYMiw4O/HTP3nZ2W6p4vlRQdZFlKLTpI3dbRJhk1NT jxPyta9s/ZRkysGPrRjxFHzdgsvlBTz6DS9P5gxscpweIllboZI8BMSk6eH6JjX9wmnN VPTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G1hYnCJ1; 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 e129si14667955oia.150.2021.11.02.04.58.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Nov 2021 04:58:33 -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=G1hYnCJ1; 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]:37390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhsQy-0002X7-Hp for patch@linaro.org; Tue, 02 Nov 2021 07:58:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhrhM-0001vY-10 for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:11:24 -0400 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]:37868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhrhI-00021n-BF for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:11:23 -0400 Received: by mail-qt1-x82d.google.com with SMTP id o12so7706668qtv.4 for ; Tue, 02 Nov 2021 04:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7lLZzifCuDAFtBOJRXRut8iWPXEYL/L2LC9pwY/6QWY=; b=G1hYnCJ1LayxyZpilQvnLE4XfaY/AcXvxVzGjz6CRfEywQ/KnPsip6x98wvKKDXD16 bdfoN3XTGxsZiQGznOW7P6/VZfvIV7lZtkcU/+nbWzDJ+95VTaeTvhbQlMcEvVpUfYsE g07g5dYp7Eh3Lh8BtVIZrpqh5etObL6OIP8I3LanqquMfyi9k3YqJ8aPHhegipkTfmSi TdpLpmW3zTLrLam+0uzwQ/447l9VbAIsTy9SQaeyJMd5DdHRLMhuShvl7RbX48lVyx8C rlVaVXdrc6CMFtFI5xIbCROxfP3ZwMegRYMEax/+XUymaWmq6L/2sHxtEbYbhPSlgBnL yK3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7lLZzifCuDAFtBOJRXRut8iWPXEYL/L2LC9pwY/6QWY=; b=fC0tYrJ3SjqHodqgRmrC1JLQIZEecRjnk7DxZlrtGXJ5yncGVRc6lkx7VKV8npYbew 2a1ktc1/AYHgwIbNIvmDpTwH8wCO1P2KdobM8HH9SHYJnVI5KDPf62KvbCM9qP2AYjFr Tk+iNE4Q1hvH4sCxIWgZTFIuHKK1gh7mwN8dH1mZOsukyYf/5Mj82cT4xEM2V01Xg+tR zdtqeUg9JpxyRFafnOYW4BjwdZ/IfbXPRl5+wokvDD91axxvccSNT0ZEYs23Rs8UR3Om A2B2UVQZ0wxtowglyyLkbldQdP92QCnLRM9IZkor4YegCcCS8TeLJg0NtB7TwwkpeDzE 7M+g== X-Gm-Message-State: AOAM531XxtLl/8YCY5dukacLfUrEmCm64HZ8Fts4AbiylTnrTyxg6h7J PBRzx4etLujSLhq3XbS2xh2ua9NXGKEkNg== X-Received: by 2002:ac8:5e0a:: with SMTP id h10mr36257566qtx.195.1635851477537; Tue, 02 Nov 2021 04:11:17 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id bm25sm12730854qkb.4.2021.11.02.04.11.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 04:11:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 60/60] linux-user: Handle BUS_ADRALN in host_signal_handler Date: Tue, 2 Nov 2021 07:07:40 -0400 Message-Id: <20211102110740.215699-61-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211102110740.215699-1-richard.henderson@linaro.org> References: <20211102110740.215699-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x82d.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Handle BUS_ADRALN via cpu_loop_exit_sigbus, but allow other SIGBUS si_codes to continue into the host-to-guest signal conversion code. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/signal.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.25.1 diff --git a/linux-user/signal.c b/linux-user/signal.c index df2c8678d0..81c45bfce9 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -860,6 +860,9 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) cpu_loop_exit_sigsegv(cpu, guest_addr, access_type, maperr, pc); } else { sigprocmask(SIG_SETMASK, &uc->uc_sigmask, NULL); + if (info->si_code == BUS_ADRALN) { + cpu_loop_exit_sigbus(cpu, guest_addr, access_type, pc); + } } sync_sig = true;