Thread (38 messages) 38 messages, 7 authors, 3d ago

Re: [PATCH v4 03/11] seq_buf: Copy what fits when seq_buf_puts() and seq_buf_putmem() overflow

flat view

From: Kees Cook <kees@kernel.org>
Date: 2026-10-05 10:06:22
Also in: bpf, linux-doc, linux-hardening, linuxppc-dev, lkml, nvdimm

On Sat, Oct 03, 2026 at 04:50:58AM +0000, bot+bpf-ci@kernel.org wrote:
Can this break callers that rely on seq_buf_puts() dropping a string whole
when it does not fit?
Yes, good catch; lpfc does. For v5 there's a new patch ahead of this one
that has lpfc_rx_monitor_report() print each record with
seq_buf_printf() and, when one doesn't fit, end the string where it
began, so its debugfs output still stops at the last whole record.

I've checked all the other users of seq_buf_puts() and didn't find any
other cases like this.

-Kees

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help