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

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

```text
ko@kernel.org" [ref], "ebiederm@xmission.com" [ref], "aneesh.kumar@linux.ibm.com" [ref], "bristot@redhat.com" [ref], "wangkefeng.wang@huawei.com" [ref], "kernel@esmil.dk" [ref], "jniethe5@gmail.com" [ref], "paul.walmsley@sifive.com" [ref], "ast@kernel.org" [ref], "will@kernel.org" [ref], "masahiroy@kernel.org" [ref], "Sakkinen, Jarkko" [ref], "samitolvanen@google.com" [ref], "naveen.n.rao@linux.ibm.com" [ref], "elver@google.com" [ref], "keescook@chromium.org" [ref], "rostedt@goodmis.org" [ref], "nathan@kernel.org" [ref], "rmk+kernel@armlinux.org.uk" [ref], "broonie@kernel.org" [ref], "bp@alien8.de" [ref], "egorenar@linux.ibm.com" <egorenar@lin
 ux.ibm.com>, "tsbogend@alpha.franken.de" [ref], "linux-parisc@vger.kernel.org" [ref], "nathaniel@profian.com" [ref], "dmitry.torokhov@gmail.com" [ref], "davem@davemloft.net" [ref], "kirill.shutemov@linux.intel.com" [ref], "huschle@linux.ibm.com" [ref], "peterz@infradead.org" [ref], "hpa@zytor.com" [ref], "sparclinux@vger.kernel.org" [ref], "yangtiezhu@loongson.cn" [ref], "mbenes@suse.cz" [ref], "chenzhongjin@huawei.com" [ref], "ardb@kernel.org" [ref], "x86@kernel.org" [ref], "linux@armlinux.org.uk" [ref], "linux-riscv@lists.infradead.org" [ref], "mingo@redhat.com" [ref], "atomlin@redhat.com" [ref], "aou@eecs.berkeley.edu" <aou@eecs.berkeley.ed
 u>, "hca@linux.ibm.com" [ref], "liaocha
ng1@huawei.com" [ref], "atishp@atishpatra.org" [ref], "jpoimboe@kernel.org" [ref], "tmricht@linux.ibm.com" [ref], "linux-mips@vger.kernel.org" [ref], "changbin.du@intel.com" [ref], "palmer@dabbelt.com" [ref], "linuxppc-dev@lists.ozlabs.org" [ref], "linux-modules@vger.kernel.org" [ref]
Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org
Sender: "Linuxppc-dev" [ref]

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
```
