* [PATCH] kasan: use \n with pr_emerg
@ 2016-07-12 14:16 Vegard Nossum
2016-07-12 14:27 ` Andrey Ryabinin
0 siblings, 1 reply; 3+ messages in thread
From: Vegard Nossum @ 2016-07-12 14:16 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Vegard Nossum, Andrey Ryabinin
I'm seeing this in the kernel log:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] KASAN
CPU: 0 PID: 56 Comm: ext4.exe Not tainted 4.7.0-rc6 #1
We really ought to be using \n with pr_*() so the 'general protection
fault...' starts on a line of its own. With this patch it looks better:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] KASAN
CPU: 0 PID: 56 Comm: ext4.exe Not tainted 4.7.0-rc7+ #650
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
arch/x86/mm/kasan_init_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
index 1b1110f..0493c17 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -54,8 +54,8 @@ static int kasan_die_handler(struct notifier_block *self,
void *data)
{
if (val == DIE_GPF) {
- pr_emerg("CONFIG_KASAN_INLINE enabled");
- pr_emerg("GPF could be caused by NULL-ptr deref or user memory access");
+ pr_emerg("CONFIG_KASAN_INLINE enabled\n");
+ pr_emerg("GPF could be caused by NULL-ptr deref or user memory access\n");
}
return NOTIFY_OK;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kasan: use \n with pr_emerg
2016-07-12 14:16 [PATCH] kasan: use \n with pr_emerg Vegard Nossum
@ 2016-07-12 14:27 ` Andrey Ryabinin
2016-07-12 14:32 ` Vegard Nossum
0 siblings, 1 reply; 3+ messages in thread
From: Andrey Ryabinin @ 2016-07-12 14:27 UTC (permalink / raw)
To: Vegard Nossum, Ingo Molnar; +Cc: linux-kernel
On 07/12/2016 05:16 PM, Vegard Nossum wrote:
> I'm seeing this in the kernel log:
>
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] KASAN
> CPU: 0 PID: 56 Comm: ext4.exe Not tainted 4.7.0-rc6 #1
>
> We really ought to be using \n with pr_*() so the 'general protection
> fault...' starts on a line of its own. With this patch it looks better:
>
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault: 0000 [#1] KASAN
> CPU: 0 PID: 56 Comm: ext4.exe Not tainted 4.7.0-rc7+ #650
>
Dmitry fixed that already: http://lkml.kernel.org/g/<1467294357-98002-1-git-send-email-dvyukov@google.com>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> ---
> arch/x86/mm/kasan_init_64.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
> index 1b1110f..0493c17 100644
> --- a/arch/x86/mm/kasan_init_64.c
> +++ b/arch/x86/mm/kasan_init_64.c
> @@ -54,8 +54,8 @@ static int kasan_die_handler(struct notifier_block *self,
> void *data)
> {
> if (val == DIE_GPF) {
> - pr_emerg("CONFIG_KASAN_INLINE enabled");
> - pr_emerg("GPF could be caused by NULL-ptr deref or user memory access");
> + pr_emerg("CONFIG_KASAN_INLINE enabled\n");
> + pr_emerg("GPF could be caused by NULL-ptr deref or user memory access\n");
> }
> return NOTIFY_OK;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kasan: use \n with pr_emerg
2016-07-12 14:27 ` Andrey Ryabinin
@ 2016-07-12 14:32 ` Vegard Nossum
0 siblings, 0 replies; 3+ messages in thread
From: Vegard Nossum @ 2016-07-12 14:32 UTC (permalink / raw)
To: Andrey Ryabinin, Ingo Molnar; +Cc: linux-kernel
On 07/12/2016 04:27 PM, Andrey Ryabinin wrote:
> On 07/12/2016 05:16 PM, Vegard Nossum wrote:
>> We really ought to be using \n with pr_*() so the 'general protection
>> fault...' starts on a line of its own. With this patch it looks better:
>>
>> kasan: CONFIG_KASAN_INLINE enabled
>> kasan: GPF could be caused by NULL-ptr deref or user memory access
>> general protection fault: 0000 [#1] KASAN
>> CPU: 0 PID: 56 Comm: ext4.exe Not tainted 4.7.0-rc7+ #650
>>
>
> Dmitry fixed that already: http://lkml.kernel.org/g/<1467294357-98002-1-git-send-email-dvyukov@google.com>
>
Great, thanks :-)
Vegard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-12 14:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-12 14:16 [PATCH] kasan: use \n with pr_emerg Vegard Nossum
2016-07-12 14:27 ` Andrey Ryabinin
2016-07-12 14:32 ` Vegard Nossum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox