Re: [PATCH v3 1/2] kprobes: textmem API

2024-03-25 Thread Jarkko Sakkinen
On Mon Mar 25, 2024 at 10:37 PM EET, Jarkko Sakkinen wrote: > - if (ret == -ENOENT && !trace_kprobe_module_exist(tk)) { > +#ifdef CONFIG_MODULES > + if (ret == -ENOENT && trace_kprobe_module_exist(tk)) > + ret = 0; > +#endif /* CONFIG_MODULES */ For this we could have #ifndef

[PATCH v3 1/2] kprobes: textmem API

2024-03-25 Thread Jarkko Sakkinen
Tracing with kprobes while running a monolithic kernel is currently impossible because CONFIG_KPROBES depends on CONFIG_MODULES because it uses the kernel module allocator. Introduce alloc_textmem() and free_textmem() for allocating executable memory. If an arch implements these functions, it can