# Re: \[PATCH\] kprobes: Enable tracing for mololithic kernel images

- From: Song Liu \<song@kernel.org\>
- Date: 2022-06-09 22:48:39 
- List: linux-modules
- Page: https://ratatoskr.run/linux-modules/2022/06/1814168
- Thread: https://ratatoskr.run/linux-mips/2022/06/1811301/t.md

```text
On Thu, Jun 9, 2022 at 11:41 AM Edgecombe, Rick P
[ref] wrote:
>
> On Thu, 2022-06-09 at 06:24 -0700, Luis Chamberlain wrote:

[...]

>
> Like say for a next step we moved prog pack out of bpf into core code,
> gave it it's own copy of module_alloc(), and then made kprobes use it.
> Then we would have something with improved W^X guard rails, and kprobes
> would not depend on modules anymore. I think maybe it's a step in the
> right direction, even if it's not perfect.

I was also thinking about where to put the prog pack allocator eventually.
Shall it be part of mm code or module code?

Btw, prog pack has more challenges with W^X requirement:
1. The arch need to have text poke mechanism;
2. Some users of prog pack need to learn to use the ROXbuffer with text poke,
  for example, how to calculate relative address differently.

Thanks,
Song
```
