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]
Date:   Thu, 12 Oct 2017 12:03:04 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     sergey.senozhatsky@...il.com, linux-kernel@...r.kernel.org,
        rostedt@...dmis.org, mingo@...nel.org, tglx@...utronix.de,
        Jason Wessel <jason.wessel@...driver.com>
Subject: Re: [PATCH 1/3] printk: Fix kdb_trap_printk placement

On Thu 2017-10-12 11:45:37, Petr Mladek wrote:
> Hi,
> 
> I thought about this a lot from several angles. And I would prefer
> sligly different placement, see the patch below.
> 
> On Thu 2017-09-28 14:18:24, Peter Zijlstra wrote:
> > Some people figured vprintk_emit() makes for a nice API and exported
> > it, bypassing the kdb trap.
> 
> Sigh, printk() API is pretty complicated and this export
> made it much worse. Well, there are two things:
> 
> First, kdb_trap_printk name is a bit misleading. It is not a
> generic trap of any printk message. Instead it seems to be
> used to redirect only particular messages from some existing
> functions, e.g. show_regs() called from kdb_dumpregs().
> 
> Second, it seems that the only user of the exported vprintk_emit()
> is dev_vprintk_emit(). I believe that code using this wrapper
> is not called in the sections where kdb_trap_printk is incremented.

Well, I wonder if we should go even further and stop exporting
vprintk_emit(). IMHO, the only reason was dev_print_emit() and
the ability to pass the extra "dict" parameter.

My aim is to redirect all the exported interfaces into vprintk_func
(need another name?) where the right implementation will be chosen
by the context (NMI, printk_safe, kdb, deferred?, printk_early, normal).

In each case, I would like to have all these re-directions on a single
place to make the printk() code better readable.

IMHO, it would make sense to do this clean up first before
this patchset adds more twists. But I am afraid that we will
meet some problems and it make take longer. I am open for
opinions.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ