[PATCH v2] rxrpc/proc: size address buffers for %pISpc output

Pengpeng Hou pengpeng at iscas.ac.cn
Wed Apr 8 01:21:56 PDT 2026


Hi David,

That's possible for some builds, yes.

My concern here is a bit narrower: with the current %pISpc formatter, the
ISATAP case can produce 50 visible characters, i.e. 51 bytes including
the trailing NUL, while these helpers pass a declared char[50] object to
sprintf().

So even if a particular compiler/ABI happens to pad the stack slot out to
sizeof(long) or more, that would only be incidental code generation slack.
It still writes one byte past the end of the declared object, and whether
that lands in padding or in another live stack slot depends on the build
and the specific function layout.

In particular, rxrpc_local_seq_show() has only a single local char[50]
buffer, so there is no source-level guarantee of spare space there either.

The patch is really just making the object size match the formatter's
actual maximum output, so we don't depend on incidental stack padding.

Thanks,
Pengpeng





More information about the linux-afs mailing list