linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap()
@ 2016-03-10 12:19 Jianyu Zhan
  2016-03-10 13:40 ` Jan Beulich
  2016-03-10 18:31 ` [tip:x86/asm] x86/entry/traps: Show " tip-bot for Jianyu Zhan
  0 siblings, 2 replies; 3+ messages in thread
From: Jianyu Zhan @ 2016-03-10 12:19 UTC (permalink / raw)
  To: tglx, mingo, hpa, bp, luto, dave.hansen, brgerst, joe, heukelum,
	jdike, jbeulich
  Cc: x86, linux-kernel, nasa4836

Commit abd4f7505baf ("x86: i386-show-unhandled-signals-v3") did turn on
the showing-unhandled-signal behaviour for i386 for some exception handlers,
but for no reason do_trap() is left out(my naive guess is because turning it on
for do_trap() would be too noisy since do_trap() is shared by several exceptions).

And since the same commit make "show_unhandled_signals" a debug tunable(in
/proc/sys/debug/exception-trace), and x86 by default turning it on. So it would be
strange for i386 users who turing it on manually and expect seeing the unhandled signal
output in log, but nothing.

This patch turns it on for i386 in do_trap().

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
---
 arch/x86/kernel/traps.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index ade185a..ef54dbb 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -262,7 +262,6 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
 	tsk->thread.error_code = error_code;
 	tsk->thread.trap_nr = trapnr;
 
-#ifdef CONFIG_X86_64
 	if (show_unhandled_signals && unhandled_signal(tsk, signr) &&
 	    printk_ratelimit()) {
 		pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx",
@@ -271,7 +270,6 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
 		print_vma_addr(" in ", regs->ip);
 		pr_cont("\n");
 	}
-#endif
 
 	force_sig_info(signr, info ?: SEND_SIG_PRIV, tsk);
 }
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap()
  2016-03-10 12:19 [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap() Jianyu Zhan
@ 2016-03-10 13:40 ` Jan Beulich
  2016-03-10 18:31 ` [tip:x86/asm] x86/entry/traps: Show " tip-bot for Jianyu Zhan
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2016-03-10 13:40 UTC (permalink / raw)
  To: Jianyu Zhan
  Cc: jdike, heukelum, brgerst, luto, x86, tglx, dave.hansen, joe,
	mingo, bp, linux-kernel, hpa

>>> On 10.03.16 at 13:19, <nasa4836@gmail.com> wrote:
> Commit abd4f7505baf ("x86: i386-show-unhandled-signals-v3") did turn on
> the showing-unhandled-signal behaviour for i386 for some exception handlers,
> but for no reason do_trap() is left out(my naive guess is because turning it 
> on
> for do_trap() would be too noisy since do_trap() is shared by several 
> exceptions).
> 
> And since the same commit make "show_unhandled_signals" a debug tunable(in
> /proc/sys/debug/exception-trace), and x86 by default turning it on. So it 
> would be
> strange for i386 users who turing it on manually and expect seeing the 
> unhandled signal
> output in log, but nothing.
> 
> This patch turns it on for i386 in do_trap().
> 
> Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>

I've been carrying this patch for years, without ever being able to
decide whether the distinction between 32-bit and 64-bit was
intentional.

Reviewed-by: Jan Beulich <jbeulich@suse.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/asm] x86/entry/traps: Show unhandled signal for i386 in do_trap()
  2016-03-10 12:19 [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap() Jianyu Zhan
  2016-03-10 13:40 ` Jan Beulich
@ 2016-03-10 18:31 ` tip-bot for Jianyu Zhan
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jianyu Zhan @ 2016-03-10 18:31 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: torvalds, jbeulich, peterz, bp, mingo, linux-kernel, tglx,
	dvlasenk, nasa4836, brgerst, luto, hpa

Commit-ID:  10ee73865e9e4705ba8b3f4d6149e8e68d902bb7
Gitweb:     http://git.kernel.org/tip/10ee73865e9e4705ba8b3f4d6149e8e68d902bb7
Author:     Jianyu Zhan <nasa4836@gmail.com>
AuthorDate: Thu, 10 Mar 2016 20:19:58 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 10 Mar 2016 18:37:25 +0100

x86/entry/traps: Show unhandled signal for i386 in do_trap()

Commit abd4f7505baf ("x86: i386-show-unhandled-signals-v3") did turn on
the showing-unhandled-signal behaviour for i386 for some exception handlers,
but for no reason do_trap() is left out (my naive guess is because turning it on
for do_trap() would be too noisy since do_trap() is shared by several exceptions).

And since the same commit make "show_unhandled_signals" a debug tunable(in
/proc/sys/debug/exception-trace), and x86 by default turning it on.

So it would be strange for i386 users who turing it on manually and expect
seeing the unhandled signal output in log, but nothing.

This patch turns it on for i386 in do_trap() as well.

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@suse.de
Cc: dave.hansen@linux.intel.com
Cc: heukelum@fastmail.fm
Cc: jbeulich@novell.com
Cc: jdike@addtoit.com
Cc: joe@perches.com
Cc: luto@kernel.org
Link: http://lkml.kernel.org/r/1457612398-4568-1-git-send-email-nasa4836@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/traps.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 5fae2d8..1baf081 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -248,7 +248,6 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
 	tsk->thread.error_code = error_code;
 	tsk->thread.trap_nr = trapnr;
 
-#ifdef CONFIG_X86_64
 	if (show_unhandled_signals && unhandled_signal(tsk, signr) &&
 	    printk_ratelimit()) {
 		pr_info("%s[%d] trap %s ip:%lx sp:%lx error:%lx",
@@ -257,7 +256,6 @@ do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
 		print_vma_addr(" in ", regs->ip);
 		pr_cont("\n");
 	}
-#endif
 
 	force_sig_info(signr, info ?: SEND_SIG_PRIV, tsk);
 }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-10 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-10 12:19 [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap() Jianyu Zhan
2016-03-10 13:40 ` Jan Beulich
2016-03-10 18:31 ` [tip:x86/asm] x86/entry/traps: Show " tip-bot for Jianyu Zhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).