1
0
Fork 0
alistair23-linux/include
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 <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-15 15:53:50 -07:00
..
acpi ACPICA: remove duplicate u8 typedef 2015-04-28 23:58:54 +02:00
asm-generic TTY/Serial patches for 4.1-rc1 2015-04-21 09:33:10 -07:00
clocksource
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-04-15 10:42:15 -07:00
drm drm/radeon: add new bonaire pci id 2015-05-12 13:42:46 -04:00
dt-bindings net: phy: dp83867: Add TI dp83867 phy 2015-06-03 19:41:04 -07:00
keys
kvm
linux bpf: introduce current->pid, tgid, uid, gid, comm accessors 2015-06-15 15:53:50 -07:00
math-emu
media Merge branch 'patchwork' into v4l_for_linus 2015-04-21 06:12:35 -03:00
memory
misc
net netfilter: nf_tables_netdev: unregister hooks on net_device removal 2015-06-15 23:02:35 +02:00
pcmcia
ras
rdma IB/core: Fix unaligned accesses 2015-05-05 13:21:27 -04:00
rxrpc
scsi SCSI: add 1024 max sectors black list flag 2015-04-27 09:38:06 -07:00
soc
sound ASoC: Fixes for v4.1 2015-04-30 19:08:06 +02:00
target target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
trace Merge branch 'for-linus' of git://git.kernel.dk/linux-block 2015-06-03 16:35:00 -07:00
uapi bpf: introduce current->pid, tgid, uid, gid, comm accessors 2015-06-15 15:53:50 -07:00
video fbdev changes for v4.1 2015-04-20 15:16:25 -07:00
xen xen/events: don't bind non-percpu VIRQs with percpu chip 2015-05-19 19:55:36 +01:00
Kbuild