From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41bS7Y5ptWzF09Y for ; Thu, 26 Jul 2018 06:51:21 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6PKmaDg130075 for ; Wed, 25 Jul 2018 16:51:18 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kf04j11g4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 25 Jul 2018 16:51:18 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 25 Jul 2018 16:51:17 -0400 Date: Wed, 25 Jul 2018 17:51:08 -0300 From: Murilo Opsfelder Araujo To: LEROY Christophe Cc: linuxppc-dev@lists.ozlabs.org, "Tobin C . Harding" , Sukadev Bhattiprolu , Simon Guo , Paul Mackerras , Nicholas Piggin , Michael Neuling , Michael Ellerman , "Eric W . Biederman" , Cyril Bur , Benjamin Herrenschmidt , Balbir Singh , Andrew Donnellan , "Alastair D'Silva" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 7/7] powerpc/traps: Show instructions on exceptions References: <20180724192720.32417-1-muriloo@linux.ibm.com> <20180724192720.32417-8-muriloo@linux.ibm.com> <20180725180134.Horde.BdhyE2b-TXhoVB7W8bsBhg1@messagerie.si.c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <20180725180134.Horde.BdhyE2b-TXhoVB7W8bsBhg1@messagerie.si.c-s.fr> Message-Id: <20180725205108.GE23643@kermit-br-ibm-com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, Christophe. On Wed, Jul 25, 2018 at 06:01:34PM +0200, LEROY Christophe wrote: > Murilo Opsfelder Araujo a écrit : > > > Move show_instructions() declaration to arch/powerpc/include/asm/stacktrace.h > > and include asm/stracktrace.h in arch/powerpc/kernel/process.c, which > > contains > > the implementation. > > > > Modify show_instructions() not to call __kernel_text_address(), allowing > > userspace instruction dump. probe_kernel_address(), which returns -EFAULT if > > something goes wrong, is still being called. > > > > Call show_instructions() in arch/powerpc/kernel/traps.c to dump > > instructions at > > faulty location, useful to debugging. > > Shouldn't this part be in a second patch ? Makes sense. Perhaps I should split this patch in two: one to remove __kernel_text_address() check in show_instructions(), and another to call show_instructions() in show_signal_msg(). > Wouldn't it be better to also see regs in addition if we want to use this to > understand what happened ? > So you could call show_regs() instead of show_instructions() ? I see that show_regs() prints more information and calls show_instructions() at the end if in privileged state. I'm not sure about which situations we might want to call show_regs() - and display a bunch of information - or just dump instructions for some signals. Isn't calling show_regs() in this case considered overkill? Cheers Murilo