From: Kees Cook <keescook@chromium.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Christoph Hellwig <hch@lst.de>,
Justin Stitt <justinstitt@google.com>,
Kent Overstreet <kent.overstreet@linux.dev>,
Petr Mladek <pmladek@suse.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>, Jonathan Corbet <corbet@lwn.net>,
Yun Zhou <yun.zhou@windriver.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Zhen Lei <thunder.leizhen@huawei.com>,
linux-trace-kernel@vger.kernel.org,
Yosry Ahmed <yosryahmed@google.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_str()
Date: Fri, 27 Oct 2023 08:46:16 -0700 [thread overview]
Message-ID: <202310270845.3D1EB44@keescook> (raw)
In-Reply-To: <20231026154459.1603d750@gandalf.local.home>
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@chromium.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
next prev parent reply other threads:[~2023-10-27 15:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 19:40 [PATCH v2] seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_str() Kees Cook
2023-10-26 19:44 ` Steven Rostedt
2023-10-27 15:46 ` Kees Cook [this message]
2023-10-26 20:20 ` Andy Shevchenko
2023-10-26 20:33 ` Steven Rostedt
2023-10-27 15:49 ` Kees Cook
2023-10-27 4:54 ` Christoph Hellwig
2023-10-27 10:53 ` Matthew Wilcox
2023-10-27 15:50 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202310270845.3D1EB44@keescook \
--to=keescook@chromium.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=jacob.e.keller@intel.com \
--cc=justinstitt@google.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mhiramat@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=thunder.leizhen@huawei.com \
--cc=willy@infradead.org \
--cc=yosryahmed@google.com \
--cc=yun.zhou@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).