Re: [PATCH v5 0/3] Use BTF to trim return values

From: Google

Date: Thu Sep 03 2026 - 19:53:07 EST


On Thu, 3 Sep 2026 12:36:06 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> On Wed, 2 Sep 2026 23:55:33 +0900
> Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
>
> > Hmm, shouldn't both the actually applied size and the true size be displayed?
> > e.g.
> >
> > ret=0x5 (in 8 bytes, true size: 16 bytes)
>
> I have to ask. Why do we care? Is there a use for this information?

If the structure itself is being returned, representing it as a scalar
value could lead to misunderstandings. Since we can check it is a
scalar or not, it should be noticed. In this meaning, I think "(trunc)"
is also good to me. (at least user can notice it)

Thanks,

>
> If not, ret=0x5 would be sufficient.
>
> -- Steve
>


--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>