From patchwork Thu Dec 22 11:35:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangjian X-Patchwork-Id: 9484691 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B7AD7601D2 for ; Thu, 22 Dec 2016 11:36:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AF1227FBB for ; Thu, 22 Dec 2016 11:36:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EC3F2818E; Thu, 22 Dec 2016 11:36:35 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97A3227FBB for ; Thu, 22 Dec 2016 11:36:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cK1e9-0002YS-4E; Thu, 22 Dec 2016 11:34:53 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cK1e2-0001tQ-Rg for linux-arm-kernel@lists.infradead.org; Thu, 22 Dec 2016 11:34:50 +0000 Received: from 172.24.1.60 (EHLO szxeml432-hub.china.huawei.com) ([172.24.1.60]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DSM19223; Thu, 22 Dec 2016 19:32:31 +0800 (CST) Received: from linux696.site (10.110.60.54) by szxeml432-hub.china.huawei.com (10.82.67.209) with Microsoft SMTP Server id 14.3.235.1; Thu, 22 Dec 2016 19:32:27 +0800 From: To: Subject: [PATCH] arm64: print bad_frame in handle_signal Date: Thu, 22 Dec 2016 19:35:01 +0800 Message-ID: <20161222113501.17167-1-bamvor.zhangjian@huawei.com> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 X-Originating-IP: [10.110.60.54] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161222_033447_240334_B22ACB16 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, broonie@kernel.org, hanjun.guo@linaro.org, arnd@arndb.de, bamvor.zhangjian@linaro.org 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 From: Bamvor Jian Zhang Sometims handle_signal will fail due to the bad frame and send to segfault to process consequently. But there is no information in system log which lead to hard to debug the root issue. This patch add as same bad frame print as sys_rt_sigreturn. Signed-off-by: Bamvor Jian Zhang --- arch/arm64/kernel/signal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index c7b6de6..cd6b81b 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -316,6 +316,10 @@ static void handle_signal(struct ksignal *ksig, struct pt_regs *regs) if (!ret) user_fastforward_single_step(tsk); + if (show_unhandled_signals) + pr_info_ratelimited("%s[%d]: bad frame in %s: pc=%08llx sp=%08llx\n", + current->comm, task_pid_nr(current), + __func__, regs->pc, regs->sp); signal_setup_done(ret, ksig, 0); }