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 \(Bamvor\)" X-Patchwork-Id: 88844 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2756272qgi; Thu, 22 Dec 2016 03:36:14 -0800 (PST) X-Received: by 10.99.117.11 with SMTP id q11mr15893633pgc.50.1482406574167; Thu, 22 Dec 2016 03:36:14 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f8si30409526pgc.288.2016.12.22.03.36.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 03:36:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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-Spam-Score: -5.6 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [119.145.14.65 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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+patch=linaro.org@lists.infradead.org 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(+) -- 2.10.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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); }