diff options
author | 2024-05-05 19:06:21 +0300 | |
---|---|---|
committer | 2024-05-14 00:31:43 -0700 | |
commit | 4d7b321a9ce0782a953874ec69acc2b12b9cb2cd (patch) | |
tree | e8abfa527afe7d24a55eb9d6c3bee1d4e46fd511 /arch/riscv/include | |
parent | mm/execmem, arch: convert remaining overrides of module_alloc to execmem (diff) | |
download | linux-4d7b321a9ce0782a953874ec69acc2b12b9cb2cd.tar.gz linux-4d7b321a9ce0782a953874ec69acc2b12b9cb2cd.tar.bz2 linux-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/include')
-rw-r--r-- | arch/riscv/include/asm/pgtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 6afd6bb4882e..381137ce70d4 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -55,6 +55,9 @@ #define MODULES_LOWEST_VADDR (KERNEL_LINK_ADDR - SZ_2G) #define MODULES_VADDR (PFN_ALIGN((unsigned long)&_end) - SZ_2G) #define MODULES_END (PFN_ALIGN((unsigned long)&_start)) +#else +#define MODULES_VADDR VMALLOC_START +#define MODULES_END VMALLOC_END #endif /* |