Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3337961imu; Sun, 11 Nov 2018 12:41:40 -0800 (PST) X-Google-Smtp-Source: AJdET5cFLLx4zRHyKlpDwY4lDXzUGoI/UeDr16M1k/TPNIQiB9i7mBCxC3JMcAHZQUPfwkTZkP5n X-Received: by 2002:a17:902:b104:: with SMTP id q4-v6mr17546569plr.5.1541968900199; Sun, 11 Nov 2018 12:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968900; cv=none; d=google.com; s=arc-20160816; b=CAiGv5CMuEGK71+YFqyzHIQPvQcL8bKyBSwXIVVu4jwTRbrduTpzAkab1aFNiqq6LT LV3PbCQCb+j4XdCF2tQyauBZrWvfxuGGDxh7AM6mM61rK9e2Q7kRq6S/Tx1ochnyIhRN euoJ8z0uizVxQanj8ZCg16x8w9eKEBlp2YZOcZ1eU1K+WOLyAlhupPE4T2aI72P3WULV N4WbUkARnuEGPuBb2T56463SvmasbiIOTZ/+MgdyVvKqoX0qimKo4GEBZZvMOfiaxp7j 3V2hF5rWSMZkqWoTKlo7j9qJlH8xRbpUQ9MwHY/sUM+DS34d+KS5q7MB7cRwdkFcoF4G Uxqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=mq5Gyv+M7Trv33AvON4elzdw7erxviusMLjYfF2TdQo=; b=IbP/QVnbSl5YulmUJOXjg5RU0Vo+qMt0T/Lu+MBAAL98LyJFzWqpje14ARpIIGHvJ6 bjLWIU4lSwynBkcZMsLUY+j0KPtfVbEupF55bIdetHInkm7FEnuSCHw0WkohRfLLtvgo gdoh6MJTyAPMqnhhTkIg2h8AQvPwZ6kv8ZoV+0mPtE6q3F6UToGgefaouDgV6+kdvYsp mLVFmxdvtwe+Qp2mp65CTooXRrqq1T0qEPgDlTwLeQkSZ28dejeLH/0NWBsifoHTEI3m xAg/DPH+QoIbKOTeu/GbocOEVii89CfhoaHMhHKxrE+OX6PopKrTiUk3vYbamg/Y7bCA ENPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70-v6si17216812pfz.20.2018.11.11.12.41.25; Sun, 11 Nov 2018 12:41:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730001AbeKLGa2 (ORCPT + 99 others); Mon, 12 Nov 2018 01:30:28 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49444 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729893AbeKLFsE (ORCPT ); Mon, 12 Nov 2018 00:48:04 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsQ-0000lG-FR; Sun, 11 Nov 2018 19:58:34 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsO-0001OC-4w; Sun, 11 Nov 2018 19:58:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, linux-xtensa@linux-xtensa.org, "Max Filippov" , "Chris Zankel" , "Eric W. Biederman" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 027/366] signal/xtensa: Consistenly use SIGBUS in do_unaligned_user In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: "Eric W. Biederman" commit 7de712ccc096b81d23cc0a941cd9b8cb3956605d upstream. While working on changing this code to use force_sig_fault I discovered that do_unaliged_user is sets si_signo to SIGBUS and passes SIGSEGV to force_sig_info. Which is just b0rked. The code is reporting a SIGBUS error so replace the SIGSEGV with SIGBUS. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Fixes: 5a0015d62668 ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 3") Signed-off-by: "Eric W. Biederman" Signed-off-by: Ben Hutchings --- arch/xtensa/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/xtensa/kernel/traps.c +++ b/arch/xtensa/kernel/traps.c @@ -282,7 +282,7 @@ do_unaligned_user (struct pt_regs *regs) info.si_errno = 0; info.si_code = BUS_ADRALN; info.si_addr = (void *) regs->excvaddr; - force_sig_info(SIGSEGV, &info, current); + force_sig_info(SIGBUS, &info, current); } #endif