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:   Wed, 26 May 2021 11:25:52 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     John Ogness <john.ogness@...utronix.de>
Cc:     Chris Down <chris@...isdown.name>, linux-kernel@...r.kernel.org,
        Jessica Yu <jeyu@...nel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Kees Cook <keescook@...omium.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>, kernel-team@...com
Subject: Re: [PATCH v6 2/4] printk: Straighten out log_flags into
 printk_info_flags

On Wed 2021-05-26 10:39:18, John Ogness wrote:
> On 2021-05-26, Petr Mladek <pmladek@...e.com> wrote:
> >> >> diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h
> >> >> index 73cc80e01cef..71918d47ca95 100644
> >> >> --- a/kernel/printk/printk_ringbuffer.h
> >> >> +++ b/kernel/printk/printk_ringbuffer.h
> >> >> @@ -50,6 +50,12 @@ struct prb_data_blk_lpos {
> >> >>  	unsigned long	next;
> >> >>  };
> >> >>  
> >> >> +/* Flags for a single printk record. */
> >> >> +enum printk_info_flags {
> >> >> +	LOG_NEWLINE	= 2,	/* text ended with a newline */
> >> >> +	LOG_CONT	= 8,	/* text is a fragment of a continuation line */
> >> >> +};
> >> >
> >> > Nit: Could you please move this after "enum desc_state" declaration?
> >> 
> >> Is there a reason that this enum is moved into printk_ringbuffer.h? The
> >> ringbuffer does not use this enum.
> >
> > We want to use it in two source files: printk.c and index.c
> > Alternative solution would be to move it to kernel/printk/internal.h.
> >
> > Well, will internal.h still be needed after we remove printk_safe?
> 
> We wouldn't be able to remove internal.h until deferred printing is
> removed. And that cannot happen until after printing kthreads exist. So
> it will still hang around for a while.
> 
> But even so, I do not like the idea of turning printk_ringbuffer.h into
> the new internal.h. The ringbuffer is quite complex and IMHO we should
> try to keep the printk_ringbuffer.* files as isolated as possible.
> 
> I would prefer to put this enum declaration in internal.h. Even if
> eventually it is the only thing left in internal.h.

Fair enough. Chris, please move enum printk_info_flags declaration
into kernel/printk/internal.h

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ