From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBDA0C43381 for ; Thu, 28 Mar 2019 11:34:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9AB672075E for ; Thu, 28 Mar 2019 11:34:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bSJ3yEV/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AB672075E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8Z0ue+zuvPqxrRz7QShAS8m9zu5xsbcwvBNpds97tPo=; b=bSJ3yEV/zZN6M7 qu4S+egdtOYk50NrOM3FJXIaAnfq267CLNOqrZnnLzXVzMUInIutk3EauUFg2H0PMHd8tag6tgZJB vEefZM/9A8c8VPF2Cmdy+zI+6gicQiQ4ZtJJoNZQda4OVvD5t4SVgr6/CKmw2vg+AokoAXGOJl3gy 3dqJnSMtvsC4wx9BIkvCyJE+eTvX6uAzkcSolKztuD8vbeV7YRqln+ok1Xv2ZLNkXmbsKhl8nG5WI Fw9rUyGfNGM4Xd4jFAXw/4707ghD42kaVDi7ztIYRNEPdrENqUbnOaGcy3Qxp7Xb+ROeUxwzbp/9P 6MdkdNu4NeNV5ThZGFIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9TIP-0007Mn-28; Thu, 28 Mar 2019 11:34:09 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9TIK-0007Ln-9b for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2019 11:34:07 +0000 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E5B9155A0296E6C0D636; Thu, 28 Mar 2019 19:33:57 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.408.0; Thu, 28 Mar 2019 19:33:49 +0800 From: Kefeng Wang To: Mark Rutland , Will Deacon , Catalin Marinas , Subject: [PATCH] arm64: skip dump_backtrace() in show_regs when user mode pt_regs Date: Thu, 28 Mar 2019 19:45:27 +0800 Message-ID: <20190328114527.171178-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190328_043404_496696_474FC41F X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kefeng Wang Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no need to call dump_backtrace() when the pt_regs corresponds to user mode, eg, [ 334.634005] potentially unexpected fatal signal 11. [ 334.634476] CPU: 3 PID: 2049 Comm: test Not tainted 5.1.0-rc2 #24 [ 334.634745] Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 [ 334.635786] pstate: 60001000 (nZCv daif -PAN -UAO) [ 334.636131] pc : 0000aaaaad4c0788 [ 334.636725] lr : 0000ffff83aac6e0 [ 334.637006] sp : 0000ffffd14e9670 [ 334.637352] x29: 0000ffffd14e9690 x28: 0000000000000000 [ 334.637814] x27: 0000000000000000 x26: 0000000000000000 [ 334.638143] x25: 0000000000000000 x24: 0000000000000000 [ 334.638460] x23: 0000000000000000 x22: 0000000000000000 [ 334.639499] x21: 0000aaaaad4c0650 x20: 0000000000000000 [ 334.640336] x19: 0000aaaaad4c0790 x18: 0000000000000002 [ 334.641062] x17: 0000ffff83aac600 x16: 0000aaaaad4d0fa0 [ 334.641474] x15: 0000ffff83c10150 x14: 0000ffff83c101e0 [ 334.641894] x13: 0000ffff83c12048 x12: 0000000000000000 [ 334.642421] x11: 0000000000010000 x10: 0000000008000000 [ 334.642749] x9 : 000000000fffffff x8 : ffffffffffffffff [ 334.643378] x7 : 0000000000010000 x6 : 0000ffff83be0b00 [ 334.643669] x5 : 0000000000000000 x4 : 0000000000000000 [ 334.644012] x3 : 0000aaaaad4c0754 x2 : 0000ffffd14e97d8 [ 334.644302] x1 : 0000fffefffffffc x0 : 0000ffff00000000 [ 334.645211] Call trace: Signed-off-by: Kefeng Wang --- arch/arm64/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 3767fb21a5b8..de224f1512ca 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -298,7 +298,8 @@ void __show_regs(struct pt_regs *regs) void show_regs(struct pt_regs * regs) { __show_regs(regs); - dump_backtrace(regs, NULL); + if (!user_mode(regs)) + dump_backtrace(regs, NULL); } static void tls_thread_flush(void) -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel