diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-11-12 18:39:28 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-11-12 18:39:57 -0800 |
commit | 904709f63b893b275a6d84654b47b0f81b3ca38e (patch) | |
tree | 013d598a2b1901aad298f7358bc1b016e91ed85e /kernel/trace/bpf_trace.c | |
parent | 0a58a65cc0b0ebabbcf3cdae7642e6db29648164 (diff) | |
parent | 53632e11194663b7d5b043a68648892e593dc102 (diff) |
Merge branch 'bpf: Enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP'
Martin KaFai says:
====================
This set is to allow the FENTRY/FEXIT/RAW_TP tracing program to use
bpf_sk_storage. The first two patches are a cleanup. The last patch is
tests. Patch 3 has the required kernel changes to
enable bpf_sk_storage for FENTRY/FEXIT/RAW_TP.
Please see individual patch for details.
v2:
- Rename some of the function prefix from sk_storage to bpf_sk_storage
- Use prefix check instead of substr check
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/trace/bpf_trace.c')
-rw-r--r-- | kernel/trace/bpf_trace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index e4515b0f62a8..cfce60ad1cb5 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -16,6 +16,7 @@ #include <linux/syscalls.h> #include <linux/error-injection.h> #include <linux/btf_ids.h> +#include <net/bpf_sk_storage.h> #include <uapi/linux/bpf.h> #include <uapi/linux/btf.h> @@ -1735,6 +1736,10 @@ tracing_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) return &bpf_skc_to_tcp_request_sock_proto; case BPF_FUNC_skc_to_udp6_sock: return &bpf_skc_to_udp6_sock_proto; + case BPF_FUNC_sk_storage_get: + return &bpf_sk_storage_get_tracing_proto; + case BPF_FUNC_sk_storage_delete: + return &bpf_sk_storage_delete_tracing_proto; #endif case BPF_FUNC_seq_printf: return prog->expected_attach_type == BPF_TRACE_ITER ? |