From patchwork Tue Aug 28 13:52:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 10578559 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D04913B8 for ; Tue, 28 Aug 2018 13:53:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A2EF2834A for ; Tue, 28 Aug 2018 13:53:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0BCE284DA; Tue, 28 Aug 2018 13:53:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8FB62834A for ; Tue, 28 Aug 2018 13:53:18 +0000 (UTC) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:Subject: From:To:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LV/CQtvQcJwuO1ZspSZbZnu1UT5Ctouj5Pe8C3JHbNk=; b=uGdEYTruE34hlX 2Sesi76S1uLRModQ6P0wZPtDOOvxiTNQ5/ASDVxP7i64+1l3unFwhDz01gGbwC2zSIgn0LLpJwZkP 9eVzHJFaD3Xy12RiFm0JxQ1L3XVKxPS0BMZazEr5v6Hi2vYXod4ob5vQu4UdTYONSpmpg669Kswo3 bch1tbXWS50wJt3QsLuWKyz2jhT55732k0HiyEBkdt5ySUZmgV5UJ6uu4Mf/0FhWf5GBtbrB8JoHa XwWJr06l5mdJoNxzUz7Llx4SbUe/qk5K/o4gBuuOFsAop7AYTH39/vsWlZIRgqz7iET/Jng/oHvkJ mC8LeUn4FrzpZrRzK4UQ==; 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 1fueQj-0004nx-MB; Tue, 28 Aug 2018 13:53:13 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fueQg-0004mR-Fa for linux-arm-kernel@lists.infradead.org; Tue, 28 Aug 2018 13:53:12 +0000 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 89B82F449C990; Tue, 28 Aug 2018 21:52:48 +0800 (CST) Received: from [127.0.0.1] (10.177.23.32) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.399.0; Tue, 28 Aug 2018 21:52:44 +0800 To: Catalin Marinas , , , Mark Rutland , "linux-arm-kernel@lists.infradead.org" , LinuxArm From: Ding Tianhong Subject: [PATCH] arm64: don't dump stack for usermode address in show_regs Message-ID: Date: Tue, 28 Aug 2018 21:52:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180828_065310_738631_A60FF999 X-CRM114-Status: GOOD ( 10.78 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The patch 1149aad10b ("arm64: Add dump_backtrace() in show_regs") would help to dump the stack when debug in the socklockups, but if the issues happened in the user space, it will be errors when dumping the usermode address in kernel, so don't dump stack for usermode address in show_regs. Signed-off-by: Ding Tianhong --- arch/arm64/kernel/process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 7f1628e..454825a 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -249,7 +249,9 @@ 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)