summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPuranjay Mohan <puranjay12@gmail.com>2023-08-31 15:12:26 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2023-09-06 15:26:05 +0200
commit20e490adea279d49d57b800475938f5b67926d98 (patch)
treec6b70e72d25b3873c50146219480070e39e3e33f /arch
parentMerge branch 'add-support-cpu-v4-insns-for-rv64' (diff)
downloadlinux-20e490adea279d49d57b800475938f5b67926d98.tar.xz
linux-20e490adea279d49d57b800475938f5b67926d98.zip
bpf: make bpf_prog_pack allocator portable
The bpf_prog_pack allocator currently uses module_alloc() and module_memfree() to allocate and free memory. This is not portable because different architectures use different methods for allocating memory for BPF programs. Like ARM64 and riscv use vmalloc()/vfree(). Use bpf_jit_alloc_exec() and bpf_jit_free_exec() for memory management in bpf_prog_pack allocator. Other architectures can override these with their implementation and will be able to use bpf_prog_pack directly. On architectures that don't override bpf_jit_alloc/free_exec() this is basically a NOP. Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> Acked-by: Song Liu <song@kernel.org> Acked-by: Björn Töpel <bjorn@kernel.org> Tested-by: Björn Töpel <bjorn@rivosinc.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20230831131229.497941-2-puranjay12@gmail.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions