Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3022311imm; Sun, 1 Jul 2018 10:29:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLtZg5UsgE/Km5vyOldY2u6Fm9vFSBJ5nq+btDZfj60QPKhsb6lmNCkLU8iZiAlHqgIikj1 X-Received: by 2002:a17:902:123:: with SMTP id 32-v6mr22343701plb.181.1530466155832; Sun, 01 Jul 2018 10:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530466155; cv=none; d=google.com; s=arc-20160816; b=yuDBodbi9D78ayuqNnEyxiD3kgMGmovlNfki6uZXxcn65ZencE+uwJln+ZYH5iT+yf Wo2u4p5mSHhBaMRwmil9tY1S74Cdi0xfbs5lt8Sba6dNtpG/MX5WBuOI0OTkFi6o4VOc c+2AtE42eig13oIh+8+7BgOyebyP2DwJtxNR8YPxOA5R9mZzqrHU1AM4/K43wRx2IFw0 GrEoa/R2gnHPKgglwENAQ6e4egMVLIh7fHoE36Nmot/qweUaf/kBEmdj4f/OjXWHVOWN dXFq2r83MepjZ/gXHXMasJNgzB9TRnsdAWhVP5FQh0ANKyjudGsEFmYR5XNKXBjfUDyX rd4A== 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=ERfMDkDmJcaQHdnMTr4X8fUhWxyhtf88vxk9FKY1gJM=; b=H2TW1HHrTwlicyHcuf9hwMy0Pd7HH3ECc4Qf65Btxr/p1zp77kKI/r4wxpiZ19Kgk5 n6Uo8MYvl9rMCPnm7ehgjeljo2myXqRbKpshaeHChD0V4dgz3Rnz7wPGa1CwvwdF4YIF cor3KU8NxBnTYz29lNS4Rt6C6un/gvtDMEqEp/oqOMqj/YMqTX9ukH4fd5gUFTbBpT1B axlbUOvD21HAwVsEHdzeTPSkD8pbhUftRuOKFdZOw+koZ5FTF5FhTR2/Vo8To/PGNZsT nVPvhEkdWMLqO9o421TOkNHZqFjIlu2Yxq8Z2V8OnOClMjuQRgcrVZAXosokEEnPy1Mx FNZw== 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 195-v6si12016553pgb.176.2018.07.01.10.29.01; Sun, 01 Jul 2018 10:29:15 -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 S1031307AbeGAR15 (ORCPT + 99 others); Sun, 1 Jul 2018 13:27:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36188 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031383AbeGAQhK (ORCPT ); Sun, 1 Jul 2018 12:37:10 -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 8DB45AA6; Sun, 1 Jul 2018 16:37:09 +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.17 017/220] signal/xtensa: Consistenly use SIGBUS in do_unaligned_user Date: Sun, 1 Jul 2018 18:20:41 +0200 Message-Id: <20180701160909.070584091@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@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.17-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 @@ -338,7 +338,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