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: <032f1e9eec231e230781931ca8525ab2d29ae206.camel@perches.com>
Date:   Wed, 20 May 2020 19:09:27 -0700
From:   Joe Perches <joe@...ches.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Chenggang Wang <wangchenggang@...o.com>,
        linux-kernel@...r.kernel.org, Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC PATCH 2/2] init: Allow multi-line output of kernel command
 line

On Wed, 2020-05-20 at 18:00 -0700, Andrew Morton wrote:
> On Wed, 20 May 2020 13:36:45 -0700 Joe Perches <joe@...ches.com> wrote:
> 
> > On Wed, 2020-05-20 at 21:10 +0900, Sergey Senozhatsky wrote:
> > > On (20/05/19 21:58), Joe Perches wrote:
> > > [..]
> > > > >  Maybe we can
> > > > > use here something rather random and much shorter instead. E.g.
> > > > > 256 chars. Hmm. How 
> > > > 
> > > > 	min(some_max like 132/256, PRINTK_LOG_LINE_MAX)
> > > > 
> > > > would work.
> > > 
> > > An alternative approach would be to do what we do in the
> > > print_modules() (the list of modules which can definitely
> > > be longer than 1K chars).
> > > 
> > > We can split command line in a loop - memchr(pos, ' ') - and
> > > pr_cont() parts of the command line. pr_cont() has overflow
> > > control and it flushes cont buffer before it overflows, so
> > > we should not lose anything.
> > 
> > It doesn't matter much here, but I believe
> > there's an 8k max buffer for pr_cont output.
> > 
> > include/linux/printk.h:#define CONSOLE_EXT_LOG_MAX      8192
> > 
> > Anyway, no worries, it simplifies the loop if
> > done that way.
> 
> I'm wondering if we shold add a kernel puts() (putsk()?  yuk) which can
> puts() a string of any length.
> 
> I'm counting around 150 instances of printk("%s", ...) and pr_foo("%s",
> ...) which could perhaps be converted, thus saving an argument.

I'd expect that it hardly matters.
printk(KERN_CONT "string") works.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ