kernel-hacking-2024-linux-s.../kernel/trace
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
..
blktrace.c
bpf_trace.c bpf: introduce current->pid, tgid, uid, gid, comm accessors 2015-06-15 15:53:50 -07:00
ftrace.c Some clean ups and small fixes, but the biggest change is the addition 2015-04-14 10:49:03 -07:00
Kconfig Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-14 14:37:47 -07:00
Makefile bpf: Fix the build on BPF_SYSCALL=y && !CONFIG_TRACING kernels, make it more configurable 2015-04-02 16:28:06 +02:00
power-traces.c
ring_buffer.c ring-buffer: Remove duplicate use of '&' in recursive code 2015-03-30 13:36:31 -04:00
ring_buffer_benchmark.c ring-buffer-benchmark: Fix the wrong sched_priority of producer 2015-06-11 09:27:58 -04:00
rpm-traces.c
trace.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
trace.h Some clean ups and small fixes, but the biggest change is the addition 2015-04-14 10:49:03 -07:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_entries.h tracing: %pF is only for function pointers 2015-03-25 08:57:22 -04:00
trace_event_perf.c
trace_events.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00
trace_events_filter.c
trace_events_filter_test.h
trace_events_trigger.c
trace_export.c tracing: remove ftrace:function TRACE_EVENT_FL_USE_CALL_FILTER flag 2015-03-25 08:57:23 -04:00
trace_functions.c
trace_functions_graph.c This adds three fixes for the tracing code. 2015-04-22 11:27:36 -07:00
trace_irqsoff.c
trace_kdb.c
trace_kprobe.c Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-04-14 14:37:47 -07:00
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Make ftrace_print_array_seq compute buf_len 2015-05-06 23:03:23 -04:00
trace_output.h
trace_printk.c
trace_probe.c trace: Don't use __weak in header files 2015-03-25 08:57:23 -04:00
trace_probe.h Some clean ups and small fixes, but the biggest change is the addition 2015-04-14 10:49:03 -07:00
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest.c
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c tracing: remove use of seq_printf return value 2015-04-15 16:35:25 -07:00
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-26 17:22:07 -07:00