Re: [RFC][PATCH 0/4] Make bpf_jit and kprobes work with CONFIG_MODULES=n

From: Google
Date: Thu Mar 07 2024 - 21:46:14 EST


Hi,

On Wed, 6 Mar 2024 13:34:40 -0800
Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote:

> On Wed, Mar 06, 2024 at 12:05:07PM -0800, Calvin Owens wrote:
> > Hello all,
> >
> > This patchset makes it possible to use bpftrace with kprobes on kernels
> > built without loadable module support.
>
> This is a step in the right direction for another reason: clearly the
> module_alloc() is not about modules, and we have special reasons for it
> now beyond modules. The effort to share a generalize a huge page for
> these things is also another reason for some of this but that is more
> long term.

Indeed. If it works without CONFIG_MODULES, it may be exec_alloc() or
something like that. Anyway, thanks for great job on this item!

>
> I'm all for minor changes here so to avoid regressions but it seems a
> rename is in order -- if we're going to all this might as well do it
> now. And for that I'd just like to ask you paint the bikeshed with
> Song Liu as he's been the one slowly making way to help us get there
> with the "module: replace module_layout with module_memory",
> and Mike Rapoport as he's had some follow up attempts [0]. As I see it,
> the EXECMEM stuff would be what we use instead then. Mike kept the
> module_alloc() and the execmem was just a wrapper but your move of the
> arch stuff makes sense as well and I think would complement his series
> nicely.

yeah, it is better to work with Mike.

Thank you,

>
> If you're gonna split code up to move to another place, it'd be nice
> if you can add copyright headers as was done with the kernel/module.c
> split into kernel/module/*.c
>
> Can we start with some small basic stuff we can all agree on?
>
> [0] https://lwn.net/Articles/944857/
>
> Luis


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