powerpc: extend execmem_params for kprobes allocations
authorMike Rapoport (IBM) <rppt@kernel.org>
Sun, 5 May 2024 16:06:23 +0000 (19:06 +0300)
committerLuis Chamberlain <mcgrof@kernel.org>
Tue, 14 May 2024 07:31:43 +0000 (00:31 -0700)
commit1b750c2fbf82fd704255d1975db39d9b429922f0
tree0217540a017970e8ce97d5910540878e1eebc554
parente2effa2235d9c7d0e9410637a2602bc69ee4f800
powerpc: extend execmem_params for kprobes allocations

powerpc overrides kprobes::alloc_insn_page() to remove writable
permissions when STRICT_MODULE_RWX is on.

Add definition of EXECMEM_KRPOBES to execmem_params to allow using the
generic kprobes::alloc_insn_page() with the desired permissions.

As powerpc uses breakpoint instructions to inject kprobes, it does not
need to constrain kprobe allocations to the modules area and can use the
entire vmalloc address space.

Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/module.c