kernel_optimize_test/kernel/trace
Yonghong Song af7ec13833 bpf: Add bpf_skc_to_tcp6_sock() helper
The helper is used in tracing programs to cast a socket
pointer to a tcp6_sock pointer.
The return value could be NULL if the casting is illegal.

A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added
so the verifier is able to deduce proper return types for the helper.

Different from the previous BTF_ID based helpers,
the bpf_skc_to_tcp6_sock() argument can be several possible
btf_ids. More specifically, all possible socket data structures
with sock_common appearing in the first in the memory layout.
This patch only added socket types related to tcp and udp.

All possible argument btf_id and return value btf_id
for helper bpf_skc_to_tcp6_sock() are pre-calculcated and
cached. In the future, it is even possible to precompute
these btf_id's at kernel build time.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200623230809.3988195-1-yhs@fb.com
2020-06-24 18:37:59 -07:00
..
blktrace.c blktrace: fix endianness for blk_log_remap() 2020-06-04 21:23:38 -06:00
bpf_trace.c bpf: Add bpf_skc_to_tcp6_sock() helper 2020-06-24 18:37:59 -07:00
fgraph.c
ftrace_internal.h
ftrace.c Tracing updates for 5.8: 2020-06-09 10:06:18 -07:00
Kconfig Tracing updates for 5.8: 2020-06-09 10:06:18 -07:00
kprobe_event_gen_test.c
Makefile Rebase locking/kcsan to locking/urgent 2020-06-11 20:02:46 +02:00
power-traces.c
preemptirq_delay_test.c
ring_buffer_benchmark.c
ring_buffer.c
rpm-traces.c
synth_event_gen_test.c
trace_benchmark.c
trace_benchmark.h
trace_boot.c
trace_branch.c
trace_clock.c
trace_dynevent.c
trace_dynevent.h
trace_entries.h
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c
trace_events_hist.c tracing: Move synthetic events to a separate file 2020-06-01 08:23:22 -04:00
trace_events_inject.c
trace_events_synth.c tracing: Move synthetic events to a separate file 2020-06-01 08:23:22 -04:00
trace_events_trigger.c
trace_events.c tracing: Add hist_debug trace event files for histogram debugging 2020-06-01 08:22:30 -04:00
trace_export.c
trace_functions_graph.c
trace_functions.c
trace_hwlat.c
trace_irqsoff.c
trace_kdb.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_kprobe.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-13 16:27:13 -07:00
trace_mmiotrace.c
trace_nop.c
trace_output.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
trace_output.h
trace_preemptirq.c x86/entry: Rename trace_hardirqs_off_prepare() 2020-06-11 15:15:24 +02:00
trace_printk.c
trace_probe_tmpl.h
trace_probe.c
trace_probe.h tracing/probe: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c trace: fix an incorrect __user annotation on stack_trace_sysctl 2020-06-08 10:13:56 -04:00
trace_stat.c
trace_stat.h
trace_synth.h tracing: Move synthetic events to a separate file 2020-06-01 08:23:22 -04:00
trace_syscalls.c
trace_uprobe.c tracing/probe: Fix bpf_task_fd_query() for kprobes and uprobes 2020-06-09 11:10:12 -07:00
trace.c Tracing updates for 5.8: 2020-06-09 10:06:18 -07:00
trace.h tracing: Add hist_debug trace event files for histogram debugging 2020-06-01 08:22:30 -04:00
tracing_map.c
tracing_map.h