Alexei Starovoitov
ffeedafbf0
bpf: introduce current->pid, tgid, uid, gid, comm accessors
...
eBPF programs attached to kprobes need to filter based on
current->pid, uid and other fields, so introduce helper functions:
u64 bpf_get_current_pid_tgid(void)
Return: current->tgid << 32 | current->pid
u64 bpf_get_current_uid_gid(void)
Return: current_gid << 32 | current_uid
bpf_get_current_comm(char *buf, int size_of_buf)
stores current->comm into buf
They can be used from the programs attached to TC as well to classify packets
based on current task fields.
Update tracex2 example to print histogram of write syscalls for each process
instead of aggregated for all.
Signed-off-by: Alexei Starovoitov <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2015-06-15 15:53:50 -07:00
..
bpf_helpers.h
bpf: introduce current->pid, tgid, uid, gid, comm accessors
2015-06-15 15:53:50 -07:00
bpf_load.c
samples/bpf: bpf_tail_call example for tracing
2015-05-21 17:07:59 -04:00
bpf_load.h
samples/bpf: Add simple non-portable kprobe filter example
2015-04-02 13:25:50 +02:00
libbpf.c
samples/bpf: Add simple non-portable kprobe filter example
2015-04-02 13:25:50 +02:00
libbpf.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2015-04-15 09:00:47 -07:00
Makefile
samples/bpf: bpf_tail_call example for networking
2015-05-21 17:07:59 -04:00
sock_example.c
samples/bpf: Add simple non-portable kprobe filter example
2015-04-02 13:25:50 +02:00
sockex1_kern.c
samples: bpf: add skb->field examples and tests
2015-03-15 22:02:28 -04:00
sockex1_user.c
samples: bpf: add skb->field examples and tests
2015-03-15 22:02:28 -04:00
sockex2_kern.c
samples: bpf: add skb->field examples and tests
2015-03-15 22:02:28 -04:00
sockex2_user.c
samples: bpf: add skb->field examples and tests
2015-03-15 22:02:28 -04:00
sockex3_kern.c
bpf: allow programs to write to certain skb fields
2015-06-07 02:01:33 -07:00
sockex3_user.c
samples/bpf: bpf_tail_call example for networking
2015-05-21 17:07:59 -04:00
tcbpf1_kern.c
bpf: make programs see skb->data == L2 for ingress and egress
2015-06-07 02:01:33 -07:00
test_maps.c
samples: bpf: relax test_maps check
2015-01-26 17:20:40 -08:00
test_verifier.c
bpf: allow programs to write to certain skb fields
2015-06-07 02:01:33 -07:00
tracex1_kern.c
samples/bpf: Add simple non-portable kprobe filter example
2015-04-02 13:25:50 +02:00
tracex1_user.c
samples/bpf: Add simple non-portable kprobe filter example
2015-04-02 13:25:50 +02:00
tracex2_kern.c
bpf: introduce current->pid, tgid, uid, gid, comm accessors
2015-06-15 15:53:50 -07:00
tracex2_user.c
bpf: introduce current->pid, tgid, uid, gid, comm accessors
2015-06-15 15:53:50 -07:00
tracex3_kern.c
samples/bpf: Add IO latency analysis (iosnoop/heatmap) tool
2015-04-02 13:25:51 +02:00
tracex3_user.c
samples/bpf: Add IO latency analysis (iosnoop/heatmap) tool
2015-04-02 13:25:51 +02:00
tracex4_kern.c
samples/bpf: Add kmem_alloc()/free() tracker tool
2015-04-02 13:25:51 +02:00
tracex4_user.c
samples/bpf: Add kmem_alloc()/free() tracker tool
2015-04-02 13:25:51 +02:00
tracex5_kern.c
samples/bpf: bpf_tail_call example for tracing
2015-05-21 17:07:59 -04:00
tracex5_user.c
samples/bpf: bpf_tail_call example for tracing
2015-05-21 17:07:59 -04:00