public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix messed up page fault BUG messages
@ 2014-08-13 11:27 Fengguang Wu
  2014-08-13 23:16 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2014-08-13 11:27 UTC (permalink / raw)
  To: x86; +Cc: Ingo Molnar, LKML

The 0day boot test robot hits messed up BUG lines like

[   25.732010] BUG: unable to handle kernel paging requestrun: /lkp/wfg/sr at 000000000000d908
[   24.986598] BUG: unable to handle kernel run: /lkp/wfg/srpaging request at 000000000000d908
[   24.914406] BUG: unable to handle kernel run: /lkp/wfg/srearly console in decompress_kernel

Which makes the generated bug ID not stable and hence not bisectable.

Fix it by printing the BUG message in one shot.

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 arch/x86/mm/fault.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 3664279..f3e0e0a 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -599,13 +599,13 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
 			printk(nx_warning, from_kuid(&init_user_ns, current_uid()));
 	}
 
-	printk(KERN_ALERT "BUG: unable to handle kernel ");
 	if (address < PAGE_SIZE)
-		printk(KERN_CONT "NULL pointer dereference");
+		printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer dereference at %p\n",
+		       (void *) address);
 	else
-		printk(KERN_CONT "paging request");
+		printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer paging request at %p\n",
+		       (void *) address);
 
-	printk(KERN_CONT " at %p\n", (void *) address);
 	printk(KERN_ALERT "IP:");
 	printk_address(regs->ip);
 
-- 
2.1.0.rc1


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

* Re: [PATCH] x86: fix messed up page fault BUG messages
  2014-08-13 11:27 [PATCH] x86: fix messed up page fault BUG messages Fengguang Wu
@ 2014-08-13 23:16 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2014-08-13 23:16 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: x86, Ingo Molnar, LKML

On Wed, 13 Aug 2014, Fengguang Wu wrote:

> The 0day boot test robot hits messed up BUG lines like
> 
> [   25.732010] BUG: unable to handle kernel paging requestrun: /lkp/wfg/sr at 000000000000d908
> [   24.986598] BUG: unable to handle kernel run: /lkp/wfg/srpaging request at 000000000000d908
> [   24.914406] BUG: unable to handle kernel run: /lkp/wfg/srearly console in decompress_kernel
> 
> Which makes the generated bug ID not stable and hence not bisectable.
> 
> Fix it by printing the BUG message in one shot.
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
>  arch/x86/mm/fault.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 3664279..f3e0e0a 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -599,13 +599,13 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
>  			printk(nx_warning, from_kuid(&init_user_ns, current_uid()));
>  	}
>  
> -	printk(KERN_ALERT "BUG: unable to handle kernel ");
>  	if (address < PAGE_SIZE)
> -		printk(KERN_CONT "NULL pointer dereference");
> +		printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer dereference at %p\n",
> +		       (void *) address);
>  	else
> -		printk(KERN_CONT "paging request");
> +		printk(KERN_ALERT "BUG: unable to handle kernel NULL pointer paging request at %p\n",
> +		       (void *) address);
>  
> -	printk(KERN_CONT " at %p\n", (void *) address);
>  	printk(KERN_ALERT "IP:");
>  	printk_address(regs->ip);
>  

That's been around forever, but I trust that an automated boot testing 
robot would find it more troublesome than most, so I agree it needs to be 
fixed.  One problem: it changes the message from

	BUG: unable to handle kernel paging request at %p

to

	BUG: unable to handle kernel NULL pointer paging request at %p

and the test for address < PAGE_SIZE is supposed to be the determining 
factor on whether it is a "NULL pointer" or not.  When that's fixed:

	Acked-by: David Rientjes <rientjes@google.com>

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

end of thread, other threads:[~2014-08-13 23:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 11:27 [PATCH] x86: fix messed up page fault BUG messages Fengguang Wu
2014-08-13 23:16 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox