]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Factor out a helper to prepare trampoline for struct_ops prog
authorHou Tao <houtao1@huawei.com>
Mon, 25 Oct 2021 06:40:22 +0000 (14:40 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Nov 2021 21:10:00 +0000 (14:10 -0700)
commitae6146010ab2e1c5b97a88cb31ac1d857e9e8fbf
treec1fd0b3c45638ebc5f3ebd6d860acc46257e8d5f
parentfd7150d40e17717e503ff98020052a4d45232405
bpf: Factor out a helper to prepare trampoline for struct_ops prog

Factor out a helper bpf_struct_ops_prepare_trampoline() to prepare
trampoline for BPF_PROG_TYPE_STRUCT_OPS prog. It will be used by
.test_run callback in following patch.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20211025064025.2567443-2-houtao1@huawei.com
include/linux/bpf.h
kernel/bpf/bpf_struct_ops.c