diff options
| author | Mike Rapoport (IBM) <rppt@kernel.org> | 2024-05-05 19:06:21 +0300 |
|---|---|---|
| committer | Luis Chamberlain <mcgrof@kernel.org> | 2024-05-14 00:31:43 -0700 |
| commit | 4d7b321a9ce0782a953874ec69acc2b12b9cb2cd (patch) | |
| tree | e8abfa527afe7d24a55eb9d6c3bee1d4e46fd511 /arch/riscv/kernel/probes | |
| parent | 223b5e57d0d50b0c07b933350dbcde92018d3080 (diff) | |
| download | lwn-4d7b321a9ce0782a953874ec69acc2b12b9cb2cd.tar.gz lwn-4d7b321a9ce0782a953874ec69acc2b12b9cb2cd.zip | |
riscv: extend execmem_params for generated code allocations
The memory allocations for kprobes and BPF on RISC-V are not placed in
the modules area and these custom allocations are implemented with
overrides of alloc_insn_page() and bpf_jit_alloc_exec().
Define MODULES_VADDR and MODULES_END as VMALLOC_START and VMALLOC_END for
32 bit and slightly reorder execmem_params initialization to support both
32 and 64 bit variants, define EXECMEM_KPROBES and EXECMEM_BPF ranges in
riscv::execmem_params and drop overrides of alloc_insn_page() and
bpf_jit_alloc_exec().
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'arch/riscv/kernel/probes')
| -rw-r--r-- | arch/riscv/kernel/probes/kprobes.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/riscv/kernel/probes/kprobes.c b/arch/riscv/kernel/probes/kprobes.c index 2f08c14a933d..e64f2f3064eb 100644 --- a/arch/riscv/kernel/probes/kprobes.c +++ b/arch/riscv/kernel/probes/kprobes.c @@ -104,16 +104,6 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) return 0; } -#ifdef CONFIG_MMU -void *alloc_insn_page(void) -{ - return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END, - GFP_KERNEL, PAGE_KERNEL_READ_EXEC, - VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, - __builtin_return_address(0)); -} -#endif - /* install breakpoint in text */ void __kprobes arch_arm_kprobe(struct kprobe *p) { |
