Re: linux-next: build failure after merge of the kspp tree

Beau Belgrave
2022-01-26T19:42:03Z

On Tue, Jan 25, 2022 at 10:26:11PM -0500, Steven Rostedt wrote:
> On Tue, 25 Jan 2022 19:18:53 -0800
> Kees Cook <keescook@chromium.org> wrote:
>
> > On Tue, Jan 25, 2022 at 08:16:34PM -0500, Steven Rostedt wrote:
> > > On Wed, 26 Jan 2022 09:35:38 +0900
> > > Masami Hiramatsu <mhiramat@kernel.org> wrote:
> > >
> > > > I think Kees' idea seems better. If you and Beau are good, I will update
> > > > the macros for __rel_loc. (This requires to change some user-space
> > > > application which Beau is making too.)

I like the simplicity of using offset from the start of data, however,
we would have to save the start of data somewhere for this. The user
trace processing side won't know the size of the common header (unless I
missed something elsewhere got added).

Due to this, I would *prefer* to have the offset still be the offset
from the __rel_loc entry. That makes it absolutely clear to both user and
kernel without requiring any additional information where to find it.

> > >
> > > If Beau is OK with it, I'm OK with it too. I need to release a new version
> > > of libtraceevent anyway, and I can make the update for that too.
> > >
> > > Who's adding the patch (if Beau says it's OK), you or Kees?
> >
> > I don't know anything about libtraceevent, so hopefully not me! :) The
> > patches Masami and I already sent fix the warning, so I leave it you
> > y'all to decide if you want to make the internals a bit simpler.
> >
>
>
> Thinking about this more. I may just take both your patches, and leave it
> as an offset from the location of the descriptor. It's closer to the
> meaning of "relative" than doing it as a fixed offset from data.
>
> And then no other patches or user space needs to be changed.
>

Right, and on the user side we will not know the start of the "data" /
fixed offset without carrying back that information somehow, due to the
common header size not being a fixed length forever.

> Thanks,
>
> -- Steve

Thanks,
-Beau