Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7344734imm; Tue, 24 Jul 2018 12:29:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpez43U3zrdHAo19vp2RM11Zlk/tTcz5K5ayX6Dd4fqfHHbK+rASb+9SsKWqWly6qnhUzc5L X-Received: by 2002:a63:5866:: with SMTP id i38-v6mr17620406pgm.63.1532460573489; Tue, 24 Jul 2018 12:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532460573; cv=none; d=google.com; s=arc-20160816; b=x/bog47idJpBVyC/44IG+95T7lrYuDYOQ92+A3UYn1rmtLG6yp3YTAKpQlW8FiU4or qzbg7J9FuHMTcMlAXRRhvokYI1aOhcuir/TtgbIa99lsm3mJhWG3TWp0Suxd7pcUZXeR zWG+vmvOX8gA5m4O0P+tD00AtdZ/+Ijur62Ms3ziD50Hd9a63M2nYABVp2tiLi35Y+lH kymTGUeLfqZB2eJ+Jlt3W55x5Y1Abj22DL46dCtfoONGMAvqDZkSPzxoCTQe6Xrngdqg kUUEHC2KoZdG8Oe+/wg1ecWDzdpNqUcsmRUewPtzyUXg46qLWw8z+D7bmKM+XPHlUcwb +rNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=mAMx9dhkXFMxiazP/lneULWD6SvUqkNjliqiBXs/5ds=; b=zb/X1OUuKNlnXAB0WmQ14qlnzilixTpd8ORMn4VoJuXJMAxze8ijjOXeS0Vu//hTBg da+eQ13RR+5aQ55q4k32lU7bBEwIzULGU1SLytpFPEIr/hqZq0eEfwrXFxpdMZz7f3h7 RTsCHWDBlFM9DG2tC+fzV2sv2LfEL3i4uktmUhg9cTlrlwa3kzVtpGpWe7Ihj3vwbbz8 IMra4gBlB94L1711IKwz1OWMsZwSTk1D8C+0H7iM0lnzqCJaORg8WHlm4a5FXjCgnBoO +7MBu16JoLVMJTaQ9fFAhjBoEB7xUot+NJl7PenTMCTKbuZ5JAi95qyZ3diD8t9/I497 SJdg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k33-v6si11216548pld.269.2018.07.24.12.29.16; Tue, 24 Jul 2018 12:29:33 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388692AbeGXUgM (ORCPT + 99 others); Tue, 24 Jul 2018 16:36:12 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51886 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388678AbeGXUgM (ORCPT ); Tue, 24 Jul 2018 16:36:12 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6OJNbuM052725 for ; Tue, 24 Jul 2018 15:28:15 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ke96rb0ye-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Jul 2018 15:28:14 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jul 2018 15:28:13 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 24 Jul 2018 15:28:09 -0400 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6OJS8AS9962008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Jul 2018 19:28:08 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3EC08AE060; Tue, 24 Jul 2018 15:27:24 -0400 (EDT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0C85AE05C; Tue, 24 Jul 2018 15:27:21 -0400 (EDT) Received: from kermit-br-ibm-com.br.ibm.com (unknown [9.18.235.193]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 24 Jul 2018 15:27:21 -0400 (EDT) From: Murilo Opsfelder Araujo To: linux-kernel@vger.kernel.org Cc: "Alastair D'Silva" , Andrew Donnellan , Balbir Singh , Benjamin Herrenschmidt , Christophe Leroy , Cyril Bur , "Eric W . Biederman" , Michael Ellerman , Michael Neuling , Murilo Opsfelder Araujo , Nicholas Piggin , Paul Mackerras , Simon Guo , Sukadev Bhattiprolu , "Tobin C . Harding" , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 5/7] powerpc/traps: Print VMA for unhandled signals Date: Tue, 24 Jul 2018 16:27:18 -0300 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724192720.32417-1-muriloo@linux.ibm.com> References: <20180724192720.32417-1-muriloo@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18072419-2213-0000-0000-000002CF6731 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009424; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01065574; UDB=6.00547380; IPR=6.00843431; MB=3.00022305; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-24 19:28:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072419-2214-0000-0000-00005AF3ACB8 Message-Id: <20180724192720.32417-6-muriloo@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-24_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=738 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807240204 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds VMA address in the message printed for unhandled signals, similarly to what other architectures, like x86, print. Before this patch, a page fault looked like: Jul 11 15:56:25 localhost kernel: pandafault[61470]: unhandled signal 11 at 00000000100007d0 nip 000000001000061c lr 00007fff8d185100 code 2 After this patch, a page fault looks like: Jul 11 16:04:11 localhost kernel: pandafault[6303]: unhandled signal 11 at 00000000100007d0 nip 000000001000061c lr 00007fff93c55100 code 2 in pandafault[10000000+10000] Signed-off-by: Murilo Opsfelder Araujo --- arch/powerpc/kernel/traps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 047d980ac776..e6c43ef9fb50 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -315,9 +315,13 @@ static void show_signal_msg(int signr, struct pt_regs *regs, int code, return; pr_info("%s[%d]: unhandled signal %d at "REG_FMT \ - " nip "REG_FMT" lr "REG_FMT" code %x\n", + " nip "REG_FMT" lr "REG_FMT" code %x", current->comm, current->pid, signr, addr, regs->nip, regs->link, code); + + print_vma_addr(KERN_CONT " in ", regs->nip); + + pr_cont("\n"); } void _exception_pkey(int signr, struct pt_regs *regs, int code, -- 2.17.1