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

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

On Thu, Jun 9, 2022 at 11:41 AM Edgecombe, Rick P
[off-list 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
Thread (37 messages) 37 messages, 11 authors, last reply 2022-06-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help