mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jianyu Zhan <nasa4836@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, bp@suse.de,
	luto@kernel.org, dave.hansen@linux.intel.com, brgerst@gmail.com,
	joe@perches.com, heukelum@fastmail.fm, jdike@addtoit.com,
	jbeulich@novell.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, nasa4836@gmail.com
Subject: [PATCH RFC] x86/traps: show unhandled signal for i386 in do_trap()
Date: Thu, 10 Mar 2016 20:19:58 +0800	[thread overview]
Message-ID: <1457612398-4568-1-git-send-email-nasa4836@gmail.com> (raw)

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

             reply	other threads:[~2016-03-10 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 12:19 Jianyu Zhan [this message]
2016-03-10 13:40 ` Jan Beulich
2016-03-10 18:31 ` [tip:x86/asm] x86/entry/traps: Show " tip-bot for Jianyu Zhan

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=1457612398-4568-1-git-send-email-nasa4836@gmail.com \
    --to=nasa4836@gmail.com \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=heukelum@fastmail.fm \
    --cc=hpa@zytor.com \
    --cc=jbeulich@novell.com \
    --cc=jdike@addtoit.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®