lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180620091541.GB444@jagdpanzerIV>
Date:   Wed, 20 Jun 2018 18:18:10 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Dmitry Vyukov <dvyukov@...gle.com>, 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 (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?

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ