Re: [PATCH v3] seq_buf: add seq_buf_strlen(), seq_buf_init_append(), seq_buf_puts_trunc()
From: Bill Wendling
Date: Thu Sep 17 2026 - 18:11:40 EST
On Thu, Sep 17, 2026 at 7:24 AM Kees Cook <kees@xxxxxxxxxx> wrote:
> On September 16, 2026 6:13:59 PM PDT, Bill Wendling <morbo@xxxxxxxxxx> wrote:
> >Converting some strlcat() call sites seq_buf need behavior seq_buf
> >doesn't currently provide, either directly or without introducing subtle
> >bugs:
>
> Ah, our implementations have crossed paths in flight. :)
>
> > - seq_buf_strlen(): seq_buf_used() reports the full buffer size when
>
> We agree, we need this one. :)
>
>
> > - seq_buf_init_append(): seq_buf_init() always clears the buffer it's
>
> Oh, nice, yeah this is cool. I'd like a different name that mentions "str"? Maybe _from_str?
>
> > - seq_buf_puts_trunc(): seq_buf_puts() (like seq_buf_printf() and
>
> I prefer my solution that just truncates and sets overflow. Nothing i found needed the non-trunc behavior.
>
> I'll send a v2 of the other series with seq_buf_init_from_str?
>
Hi Kees,
I didn't know you were working on this as well.
Andrew, please ignore this patch. I apologize for the spam.
-bw
> -Kees
>
> --
> Kees Cook