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: <19a8c717f8d9dc76f2b09e6dd19f3fbb71bf29c5.camel@perches.com>
Date:   Wed, 20 May 2020 13:36:45 -0700
From:   Joe Perches <joe@...ches.com>
To:     Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        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 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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ