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: <202310270845.3D1EB44@keescook>
Date: Fri, 27 Oct 2023 08:46:16 -0700
From: Kees Cook <keescook@...omium.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
	Christoph Hellwig <hch@....de>,
	Justin Stitt <justinstitt@...gle.com>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	Petr Mladek <pmladek@...e.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arnd Bergmann <arnd@...db.de>, Jonathan Corbet <corbet@....net>,
	Yun Zhou <yun.zhou@...driver.com>,
	Jacob Keller <jacob.e.keller@...el.com>,
	Zhen Lei <thunder.leizhen@...wei.com>,
	linux-trace-kernel@...r.kernel.org,
	Yosry Ahmed <yosryahmed@...gle.com>, linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_str()

On Thu, Oct 26, 2023 at 03:44:59PM -0400, Steven Rostedt wrote:
> On Thu, 26 Oct 2023 12:40:37 -0700
> Kees Cook <keescook@...omium.org> wrote:
> 
> > @@ -81,16 +88,20 @@ static inline unsigned int seq_buf_used(struct seq_buf *s)
> >   *
> >   * After this function is called, s->buffer is safe to use
> >   * in string operations.
> > + *
> > + * Returns @s->buf after making sure it is terminated.
> >   */
> > -static inline void seq_buf_terminate(struct seq_buf *s)
> > +static inline char *seq_buf_str(struct seq_buf *s)
> 
> Looking at show_buffer() (below), I wonder if this should be:
> 
> static inline const char *seq_buf_str() ?
> 
> I mean, it can be modified, but do we want to allow that?

Yeah, good idea. I've updated this for v3.

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ