commit | fc611f47f2188ade2b48ff6902d5cce8baac0c58 | [log] [tgz] |
---|---|---|
author | KP Singh <[email protected]> | Sun Mar 29 01:43:49 2020 +0100 |
committer | Daniel Borkmann <[email protected]> | Mon Mar 30 01:34:00 2020 +0200 |
tree | fa4363e15a618c0f4357d846f9b0b4cd20c6433c | |
parent | e5fb60ee4c958b92686830ecfaf5e60bbd139130 [diff] [blame] |
bpf: Introduce BPF_PROG_TYPE_LSM Introduce types and configs for bpf programs that can be attached to LSM hooks. The programs can be enabled by the config option CONFIG_BPF_LSM. Signed-off-by: KP Singh <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Brendan Jackman <[email protected]> Reviewed-by: Florent Revest <[email protected]> Reviewed-by: Thomas Garnier <[email protected]> Acked-by: Yonghong Song <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Acked-by: James Morris <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 372708e..3bde59a 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h
@@ -1515,6 +1515,9 @@ extern const struct bpf_func_proto bpf_tcp_sock_proto; extern const struct bpf_func_proto bpf_jiffies64_proto; extern const struct bpf_func_proto bpf_get_ns_current_pid_tgid_proto; +const struct bpf_func_proto *bpf_tracing_func_proto( + enum bpf_func_id func_id, const struct bpf_prog *prog); + /* Shared helpers among cBPF and eBPF. */ void bpf_user_rnd_init_once(void); u64 bpf_user_rnd_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5);