From: Helge Deller <deller@gmx.de> To: linux-s390@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, Josh Triplett <josh@joshtriplett.org>, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 3/3] x86/fault: Dump command line of faulting process to syslog Date: Sat, 6 Aug 2022 14:23:48 +0200 [thread overview] Message-ID: <20220806122348.82584-4-deller@gmx.de> (raw) In-Reply-To: <20220806122348.82584-1-deller@gmx.de> If a process segfaults, include the command line of the faulting process in the syslog. In the example below, the "crash" program (which simply writes zero to address 0) was called with the parameters "this is a test": crash[2326]: segfault at 0 ip 0000561a7969c12e sp 00007ffe97a05630 error 6 in crash[561a7969c000+1000] crash[2326] cmdline: ./crash this is a test Code: 68 ff ff ff c6 05 19 2f 00 00 01 5d c3 0f 1f 80 00 00 00 00 c3 0f 1f 80 00 00 00 00 e9 7b ff ff ff 55 48 89 e5 b8 00 00 00 00 <c7> 00 01 00 00 00 b8 00 00 00 00 5d c3 0f 1f 44 00 00 41 57 4c 8d Signed-off-by: Helge Deller <deller@gmx.de> --- arch/x86/mm/fault.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index fad8faa29d04..d4e21c402e29 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -784,6 +784,8 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code, printk(KERN_CONT "\n"); + dump_stack_print_cmdline(loglvl); + show_opcodes(regs, loglvl); } -- 2.37.1
WARNING: multiple messages have this Message-ID (diff)
From: Helge Deller <deller@gmx.de> To: linux-s390@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, Josh Triplett <josh@joshtriplett.org>, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 3/3] x86/fault: Dump command line of faulting process to syslog Date: Sat, 6 Aug 2022 14:23:48 +0200 [thread overview] Message-ID: <20220806122348.82584-4-deller@gmx.de> (raw) In-Reply-To: <20220806122348.82584-1-deller@gmx.de> If a process segfaults, include the command line of the faulting process in the syslog. In the example below, the "crash" program (which simply writes zero to address 0) was called with the parameters "this is a test": crash[2326]: segfault at 0 ip 0000561a7969c12e sp 00007ffe97a05630 error 6 in crash[561a7969c000+1000] crash[2326] cmdline: ./crash this is a test Code: 68 ff ff ff c6 05 19 2f 00 00 01 5d c3 0f 1f 80 00 00 00 00 c3 0f 1f 80 00 00 00 00 e9 7b ff ff ff 55 48 89 e5 b8 00 00 00 00 <c7> 00 01 00 00 00 b8 00 00 00 00 5d c3 0f 1f 44 00 00 41 57 4c 8d Signed-off-by: Helge Deller <deller@gmx.de> --- arch/x86/mm/fault.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index fad8faa29d04..d4e21c402e29 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -784,6 +784,8 @@ show_signal_msg(struct pt_regs *regs, unsigned long error_code, printk(KERN_CONT "\n"); + dump_stack_print_cmdline(loglvl); + show_opcodes(regs, loglvl); } -- 2.37.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-08-06 12:24 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-06 12:23 [PATCH v2 0/3] Dump command line of faulting process to syslog Helge Deller 2022-08-06 12:23 ` Helge Deller 2022-08-06 12:23 ` [PATCH v2 1/3] proc: Add get_task_cmdline_kernel() function Helge Deller 2022-08-06 12:23 ` Helge Deller 2022-08-06 12:23 ` [PATCH v2 2/3] lib/dump_stack: Add dump_stack_print_cmdline() and wire up in dump_stack_print_info() Helge Deller 2022-08-06 12:23 ` Helge Deller 2022-08-06 12:23 ` Helge Deller [this message] 2022-08-06 12:23 ` [PATCH v2 3/3] x86/fault: Dump command line of faulting process to syslog Helge Deller
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220806122348.82584-4-deller@gmx.de \ --to=deller@gmx.de \ --cc=josh@joshtriplett.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-parisc@vger.kernel.org \ --cc=linux-s390@vger.kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.