android_kernel_sony_sdm845/include/trace
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jesper Dangaard Brouer ab5aab1406 UPSTREAM: xdp: implement xdp_redirect_map for generic XDP
Using bpf_redirect_map is allowed for generic XDP programs, but the
appropriate map lookup was never performed in xdp_do_generic_redirect().

Instead the map-index is directly used as the ifindex.  For the
xdp_redirect_map sample in SKB-mode '-S', this resulted in trying
sending on ifindex 0 which isn't valid, resulting in getting SKB
packets dropped.  Thus, the reported performance numbers are wrong in
commit 24251c264798 ("samples/bpf: add option for native and skb mode
for redirect apps") for the 'xdp_redirect_map -S' case.

Before commit 109980b894e9 ("bpf: don't select potentially stale
ri->map from buggy xdp progs") it could crash the kernel.  Like this
commit also check that the map_owner owner is correct before
dereferencing the map pointer.  But make sure that this API misusage
can be caught by a tracepoint. Thus, allowing userspace via
tracepoints to detect misbehaving bpf_progs.

Fixes: 6103aa96ec07 ("net: implement XDP_REDIRECT for xdp generic")
Fixes: 24251c264798 ("samples/bpf: add option for native and skb mode for redirect apps")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sorayukii <sorayukii69@gmail.com>
2026-05-15 17:55:13 +07:00
..
events UPSTREAM: xdp: implement xdp_redirect_map for generic XDP 2026-05-15 17:55:13 +07:00
define_trace.h
perf.h BACKPORT: bpf: permit multiple bpf attachments for a single perf event 2019-12-12 15:49:12 -08:00
syscall.h
trace_events.h UPSTREAM: trace: add variant without spacing in trace_print_hex_seq 2026-05-15 17:54:49 +07:00