[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+bcp4fSBBq3F86T-C4+n-YkeXUGMqpvkJ6vj6mK-TU2EA@mail.gmail.com>
Date: Wed, 20 Jun 2018 11:31:08 +0200
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Petr Mladek <pmladek@...e.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
syzkaller <syzkaller@...glegroups.com>,
Steven Rostedt <rostedt@...dmis.org>,
Fengguang Wu <fengguang.wu@...el.com>,
LKML <linux-kernel@...r.kernel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] printk: inject caller information into the body of message
On Wed, Jun 20, 2018 at 11:18 AM, Sergey Senozhatsky
<sergey.senozhatsky.work@...il.com> wrote:
> On (06/20/18 18:06), Sergey Senozhatsky wrote:
>>
>> b) printk_safe output is quite uncommon. And we flush per-CPU buffer
>> from the same CPU which has caused printk_safe output [except for
>> panic() flush] therefore logging the info available to log_store()
>> seemed enough. IOW, once again, was a bit unsure if we want to add
>> some complex code to already complex code, with just one potential
>> user.
>
> BTW, pr_cont() handling is not so simple when we are in printk_safe()
> context. Unlike vprintk_emit() [normal printk], we don't use any
> dedicated pr_cont() buffer in printk_safe. So, at a glance, I suspect
> that injecting context info at every printk_safe_log_store() call for
> `for (...) pr_cont()' loop is going to produce something like this:
> I<10> 23 I<10> 43 I<10> 47 ....
>
> // Hmm, maybe the line will endup having two prefixes. Once
> // from printk_safe_log_store, the other from normal printk
> // log_store().
>
> While the same `for (...) pr_cont()' called from normal printk() context
> will produce
> I<10> 32 43 47 ....
>
> It could be that I'm wrong.
> Tetsuo, have you tested pr_cont() from printk_safe() context?
So this is another reason to get rid of pr_cont entirely, right?
Powered by blists - more mailing lists