From: Alejandro Colomar <alx+linux-hardening@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jiri Kosina <jkosina@suse.cz>, Petr Mladek <pmladek@suse.cz>,
Kees Cook <kees@kernel.org>,
linux-hardening@vger.kernel.org
Subject: Re: seq_buf_putc() and strings
Date: Wed, 28 Oct 2026 19:00:19 +0100 [thread overview]
Message-ID: <auI38dBMI7aaSkY1@devuan> (raw)
In-Reply-To: <20261028134755.176f8323@gandalf.local.home>
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
Hi Steven,
> Date: 2026-10-28 13:47:55-0400
> From: Steven Rostedt <rostedt@goodmis.org>
>
> On Wed, 28 Oct 2026 18:13:40 +0100
> Alejandro Colomar <alx+linux-hardening@kernel.org> wrote:
>
> > Are there any reasons to not write that NUL byte?
>
> Yes, for speed. seq_buf is used in hotpaths in tracing. I purposely made
> the design decision that the seq_buf string is never guaranteed to be NUL
> terminated.
Hmmm, okay; I'll keep that in mind when rewriting. Thanks!
Cheers,
Alex
>
> -- Steve
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-10-28 18:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 17:13 seq_buf_putc() and strings Alejandro Colomar
2026-10-28 17:30 ` Alejandro Colomar
2026-10-28 17:47 ` Steven Rostedt
2026-10-28 18:00 ` Alejandro Colomar [this message]
2026-10-28 20:59 ` seq_buf_used() return value on overflow Alejandro Colomar
2026-10-28 21:03 ` Alejandro Colomar
2026-10-28 21:30 ` seq_buf_str() silent truncation (data corruption) Alejandro Colomar
2026-10-29 1:04 ` Steven Rostedt
2026-10-29 11:48 ` Alejandro Colomar
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=auI38dBMI7aaSkY1@devuan \
--to=alx+linux-hardening@kernel.org \
--cc=jkosina@suse.cz \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
/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