Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3060495imm; Sun, 1 Jul 2018 11:18:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKzmiFZ8Vdb0GjutVWGc5k1MWxjQ8yk/J2x1TXbE3fBisr0dMEGUqRUwjzo8YbunkxBDZEs X-Received: by 2002:a63:a70f:: with SMTP id d15-v6mr19236696pgf.168.1530469123844; Sun, 01 Jul 2018 11:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530469123; cv=none; d=google.com; s=arc-20160816; b=wNUXhIu1IdO1cYsGg3GfD1iKzWZkUyhesgJIVNfZnUhc27mwvKbyoSIGXpbTuDIHFR mPo3Nkpun5oypxNivF7skuskZROOITFrAoWVWOdtbF0Ewqu/wCFD2FY6xLlf/SzOsH2G vTivEqdw5Vp8mTlUnu66VmZi7PQKo9p6jh3GQdS/N/cCPsRxF2KBRT0/PpNFL0Kv7Q6u QoN7lS0J2ckru3PtBgCHHWA6r6oOPSXKbiIeMsnQ52UinF/nFt49yVbMrvS9MIXQODbG F3zaUoNJKM+4b6NheCqQlD+qI72+gT9VAshuRrtcuyGZGNGU/auecLnx8WQBWxzfUnZE /6fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FCwkfsTfyV+f2FvdXqP5E7um516VdfFkYxvP8SpuWcI=; b=AIQl9UMhd8MFpoXoEh4c6Z5a6cT03Xlqmu/Uliyhj9wTbmBK6yyyh+n0Z5lPJDXPSY BTGVGJ34ITPFY9FnDqr1TSuP1PG3QO8hM/nRlek/uUHJO3533W1qqiSWCwFj81ep7VCp ERXCLWjeZ/A2E/jx8zV3A2aCp8lElc5sAp5a+7mgocuLptpaQGKgSh8dXL9RL1veEfJE NVSHpLyt+f7WlYF7UuqemSPin3sgv/G2ky1hOUE50u1fLAm7LxV3FBv/KsipRyS4xqnx 5Jc2q+R/v2yBtRhkTRsTM6rL1oVelbeSJoVj14gQ8DvywEHD4IuE+iK0EO08YTqwXAcv fQlQ== 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 t1-v6si13647450plo.241.2018.07.01.11.18.29; Sun, 01 Jul 2018 11:18:43 -0700 (PDT) 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 S965047AbeGAQ0K (ORCPT + 99 others); Sun, 1 Jul 2018 12:26:10 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33788 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965283AbeGAQ0G (ORCPT ); Sun, 1 Jul 2018 12:26:06 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D95EFAD8; Sun, 1 Jul 2018 16:26:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, "Eric W. Biederman" Subject: [PATCH 4.9 009/101] signal/xtensa: Consistenly use SIGBUS in do_unaligned_user Date: Sun, 1 Jul 2018 18:20:55 +0200 Message-Id: <20180701160757.514976203@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable 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 Cc: stable@vger.kernel.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: Greg Kroah-Hartman --- 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 @@ -334,7 +334,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