diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-15 15:53:50 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-15 15:58:26 -0700 |
commit | 9f42c8b3ebc80e8a544bcf726689d51c7e1e0fc8 (patch) | |
tree | 6b4c9543550d114d75fad4362c6ef526a0d24b77 /net | |
parent | ada6c1de9ecabcfc5619479bcd29a208f2e248a0 (diff) | |
parent | ab1973d3258aa8c40d153dc12bbb1aac56731e47 (diff) | |
download | op-kernel-dev-9f42c8b3ebc80e8a544bcf726689d51c7e1e0fc8.zip op-kernel-dev-9f42c8b3ebc80e8a544bcf726689d51c7e1e0fc8.tar.gz |
Merge branch 'bpf-share-helpers'
Alexei Starovoitov says:
====================
v1->v2: switched to init_user_ns from current_user_ns as suggested by Andy
Introduce new helpers to access 'struct task_struct'->pid, tgid, uid, gid, comm
fields in tracing and networking.
Share bpf_trace_printk() and bpf_get_smp_processor_id() helpers between
tracing and networking.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/filter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index d271c06..65ff107 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -1442,6 +1442,8 @@ sk_filter_func_proto(enum bpf_func_id func_id) return &bpf_tail_call_proto; case BPF_FUNC_ktime_get_ns: return &bpf_ktime_get_ns_proto; + case BPF_FUNC_trace_printk: + return bpf_get_trace_printk_proto(); default: return NULL; } @@ -1459,6 +1461,12 @@ tc_cls_act_func_proto(enum bpf_func_id func_id) return &bpf_l4_csum_replace_proto; case BPF_FUNC_clone_redirect: return &bpf_clone_redirect_proto; + case BPF_FUNC_get_current_pid_tgid: + return &bpf_get_current_pid_tgid_proto; + case BPF_FUNC_get_current_uid_gid: + return &bpf_get_current_uid_gid_proto; + case BPF_FUNC_get_current_comm: + return &bpf_get_current_comm_proto; default: return sk_filter_func_proto(func_id); } |