Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555691 > unrolled thread

[PATCH v2 1/1] x86/kernel: Update bug_at() head message

Started byAndy Shevchenko <andriy.shevchenko@linux.intel.com>
First post2017-01-10 17:50 +0100
Last post2017-01-12 11:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 1/1] x86/kernel: Update bug_at() head message Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-10 17:50 +0100
    Re: [PATCH v2 1/1] x86/kernel: Update bug_at() head message Ingo Molnar <mingo@kernel.org> - 2017-01-12 09:50 +0100
    [tip:locking/core] locking/jump_labels: Update bug_at() boot  message tip-bot for Andy Shevchenko <tipbot@zytor.com> - 2017-01-12 11:10 +0100

#1555691 — [PATCH v2 1/1] x86/kernel: Update bug_at() head message

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2017-01-10 17:50 +0100
Subject[PATCH v2 1/1] x86/kernel: Update bug_at() head message
Message-ID<sY7Mt-3II-21@gated-at.bofh.it>
First of all, %*ph specifier allows to dump data in hex format using the
pointer to a buffer. This is suitable to use here.

Besides that Thomas suggested to move it to critical level and replace __FILE__
by explicit mention of "jumplabel".

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 arch/x86/kernel/jump_label.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index fc25f698d792..32f126e726f5 100644
--- a/arch/x86/kernel/jump_label.c
+++ b/arch/x86/kernel/jump_label.c
@@ -32,8 +32,7 @@ static void bug_at(unsigned char *ip, int line)
 	 * Something went wrong. Crash the box, as something could be
 	 * corrupting the kernel.
 	 */
-	pr_warning("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n",
-	       ip, ip, ip[0], ip[1], ip[2], ip[3], ip[4], __FILE__, line);
+	pr_crit("jumplabel: Unexpected op at %pS [%p] (%5ph) %d\n", ip, ip, ip, line);
 	BUG();
 }
 
-- 
2.11.0

[toc] | [next] | [standalone]


#1557201

FromIngo Molnar <mingo@kernel.org>
Date2017-01-12 09:50 +0100
Message-ID<sYJf3-1MG-15@gated-at.bofh.it>
In reply to#1555691
* Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> First of all, %*ph specifier allows to dump data in hex format using the
> pointer to a buffer. This is suitable to use here.
> 
> Besides that Thomas suggested to move it to critical level and replace __FILE__
> by explicit mention of "jumplabel".
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  arch/x86/kernel/jump_label.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
> index fc25f698d792..32f126e726f5 100644
> --- a/arch/x86/kernel/jump_label.c
> +++ b/arch/x86/kernel/jump_label.c
> @@ -32,8 +32,7 @@ static void bug_at(unsigned char *ip, int line)
>  	 * Something went wrong. Crash the box, as something could be
>  	 * corrupting the kernel.
>  	 */
> -	pr_warning("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n",
> -	       ip, ip, ip[0], ip[1], ip[2], ip[3], ip[4], __FILE__, line);
> +	pr_crit("jumplabel: Unexpected op at %pS [%p] (%5ph) %d\n", ip, ip, ip, line);
>  	BUG();

What is 'jumplabel'? Nobody calls it that in the kernel - everyone calls it 
'jump_label' ...

(Fixed that in patch, no need to resend.)

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1557274 — [tip:locking/core] locking/jump_labels: Update bug_at() boot message

Fromtip-bot for Andy Shevchenko <tipbot@zytor.com>
Date2017-01-12 11:10 +0100
Subject[tip:locking/core] locking/jump_labels: Update bug_at() boot message
Message-ID<sYKuv-2GC-53@gated-at.bofh.it>
In reply to#1555691
Commit-ID:  6e03f66c001790d6ca853c68a56c87460bc86467
Gitweb:     http://git.kernel.org/tip/6e03f66c001790d6ca853c68a56c87460bc86467
Author:     Andy Shevchenko <andriy.shevchenko@linux.intel.com>
AuthorDate: Tue, 10 Jan 2017 18:43:54 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 12 Jan 2017 09:43:07 +0100

locking/jump_labels: Update bug_at() boot message

First of all, %*ph specifier allows to dump data in hex format using the
pointer to a buffer. This is suitable to use here.

Besides that Thomas suggested to move it to critical level and replace __FILE__
by explicit mention of "jumplabel".

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170110164354.47372-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/jump_label.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kernel/jump_label.c b/arch/x86/kernel/jump_label.c
index fc25f69..c37bd0f 100644
--- a/arch/x86/kernel/jump_label.c
+++ b/arch/x86/kernel/jump_label.c
@@ -32,8 +32,7 @@ static void bug_at(unsigned char *ip, int line)
 	 * Something went wrong. Crash the box, as something could be
 	 * corrupting the kernel.
 	 */
-	pr_warning("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n",
-	       ip, ip, ip[0], ip[1], ip[2], ip[3], ip[4], __FILE__, line);
+	pr_crit("jump_label: Fatal kernel bug, unexpected op at %pS [%p] (%5ph) %d\n", ip, ip, ip, line);
 	BUG();
 }
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web