]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Introduce bpf_arch_text_copy
authorSong Liu <song@kernel.org>
Fri, 4 Feb 2022 18:57:39 +0000 (10:57 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 8 Feb 2022 02:13:01 +0000 (18:13 -0800)
commit4c93a844b964852a1e1f054de984604d3ea44f06
treebfa0fd9b389bc5a2718a5fafeae0ba390d74ea03
parent5704d09461e626ad0db346bf91a08418a4ca557e
bpf: Introduce bpf_arch_text_copy

This will be used to copy JITed text to RO protected module memory. On
x86, bpf_arch_text_copy is implemented with text_poke_copy.

bpf_arch_text_copy returns pointer to dst on success, and ERR_PTR(errno)
on errors.

Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220204185742.271030-7-song@kernel.org
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h
kernel/bpf/core.c