public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Joe Perches <joe@perches.com>
Cc: mingo@elte.hu, vegard.nossum@gmail.com,
	akpm@linux-foundation.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC/PATCH] x86: Use KERN_DEFAULT log-level in __show_regs()
Date: Tue, 29 Dec 2009 09:08:35 +0200	[thread overview]
Message-ID: <4B39AAF3.4060605@cs.helsinki.fi> (raw)
In-Reply-To: <1262029654.3352.27.camel@Joe-Laptop.home>

Joe Perches kirjoitti:
> On Mon, 2009-12-28 at 10:26 +0200, Pekka Enberg wrote:
>> From: Pekka Enberg <penberg@cs.helsinki.fi>
>>
>> Andrew Morton reported a strange looking kmemcheck warning:
>>
>>   WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (ffff88004fba6c20)
>>   0000000000000000310000000000000000000000000000002413000000c9ffff
>>    u u u u u u u u u u u u u u u u i i i i i i i i u u u u u u u u
>>
>>    [<ffffffff810af3aa>] kmemleak_scan+0x25a/0x540
>>    [<ffffffff810afbcb>] kmemleak_scan_thread+0x5b/0xe0
>>    [<ffffffff8104d0fe>] kthread+0x9e/0xb0
>>    [<ffffffff81003074>] kernel_thread_helper+0x4/0x10
>>    [<ffffffffffffffff>] 0xffffffffffffffff
>>
>> The above printout is missing register dump completely. The problem here is
>> that the output comes from syslog which doesn't show KERN_INFO log-level
>> messages. We didn't see this before because both of us were testing on 32-bit
>> kernels which use the _default_ log-level.
>>
>> Fix that up by explicitly using KERN_DEFAULT log-level for __show_regs()
>> printks.
>>
>> Cc: Vegard Nossum <vegard.nossum@gmail.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
>> ---
>>  arch/x86/kernel/process.c    |    4 ++--
>>  arch/x86/kernel/process_32.c |   14 +++++++-------
>>  arch/x86/kernel/process_64.c |   24 ++++++++++++------------
>>  3 files changed, 21 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
>> index 98c2cde..c6ee241 100644
>> --- a/arch/x86/kernel/process.c
>> +++ b/arch/x86/kernel/process.c
>> @@ -103,8 +103,8 @@ void show_regs_common(void)
>>  	if (!product)
>>  		product = "";
>>  
>> -	printk("\n");
>> -	printk(KERN_INFO "Pid: %d, comm: %.20s %s %s %.*s %s/%s\n",
>> +	printk(KERN_CONT "\n");
>> +	printk(KERN_DEFAULT "Pid: %d, comm: %.20s %s %s %.*s %s/%s\n",
> 
> What is the reason to convert KERN_INFO to KERN_DEFAULT here?

To be consistent with rest of __show_regs() log-levels.

  reply	other threads:[~2009-12-29  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-28  8:26 [RFC/PATCH] x86: Use KERN_DEFAULT log-level in __show_regs() Pekka Enberg
2009-12-28 10:07 ` [tip:x86/urgent] " tip-bot for Pekka Enberg
2009-12-28 19:47 ` [RFC/PATCH] " Joe Perches
2009-12-29  7:08   ` Pekka Enberg [this message]
     [not found]     ` <1262072421.1888.57.camel@Joe-Laptop.home>
2009-12-29  7:47       ` Pekka Enberg

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=4B39AAF3.4060605@cs.helsinki.fi \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=vegard.nossum@gmail.com \
    --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