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, 26 Oct 2023 12:35:43 -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] seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_cstr()

On Thu, Oct 26, 2023 at 02:02:47PM -0400, Steven Rostedt wrote:
> On Thu, 26 Oct 2023 10:54:26 -0700
> Kees Cook <keescook@...omium.org> wrote:
> 
> > > Do we really need to call it _cstr? Why not just have seq_buf_str() ?
> > > 
> > > I mean, this is C, do we need to state that in the name too?  
> > 
> > I'm fine either way. I did that just to make the distinction between our
> > length-managed string of characters interface (seq_buf), and the
> > %NUL-terminated string of characters (traditionally called "C String" in
> > other languages). And it was still shorter than "seq_buf_terminate(s);
> > s->buffer" ;)
> 
> Do you believe that people might get confused with it as seq_buf_str()?
> 
> Can you envision that we would want a seq_buf_str() and seq_buf_cstr() that
> do something different?

No, I see your point. Like I said, I don't care either way. I was just
explaining why I did it that way. "string" means a lot of things to
different people. "C String" is unambiguous, and I try to be unambiguous
whenever possible. :)

I'll send a v2 as seq_buf_str()...

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ