linux/include/trace
Kohei Enju 3bfcf39608 net: validate skb->napi_id in RX tracepoints
Since commit 2bd82484bb ("xps: fix xps for stacked devices"),
skb->napi_id shares storage with sender_cpu. RX tracepoints using
net_dev_rx_verbose_template read skb->napi_id directly and can therefore
report sender_cpu values as if they were NAPI IDs.

For example, on the loopback path this can report 1 as napi_id, where 1
comes from raw_smp_processor_id() + 1 in the XPS path:

  # bpftrace -e 'tracepoint:net:netif_rx_entry{ print(args->napi_id); }'
  # taskset -c 0 ping -c 1 ::1

Report only valid NAPI IDs in these tracepoints and use 0 otherwise.

Fixes: 2bd82484bb ("xps: fix xps for stacked devices")
Signed-off-by: Kohei Enju <kohei@enjuk.jp>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://patch.msgid.link/20260420105427.162816-1-kohei@enjuk.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-04-22 20:15:50 -07:00
..
events net: validate skb->napi_id in RX tracepoints 2026-04-22 20:15:50 -07:00
misc NFSD: Remove NFSERR_EAGAIN 2026-01-02 13:43:41 -05:00
stages tracing: Use explicit array size instead of sentinel elements in symbol printing 2026-03-12 12:15:53 +01:00
bpf_probe.h
define_custom_trace.h
define_trace.h
perf.h tracing: perf: Have perf tracepoint callbacks always disable preemption 2026-01-30 10:43:35 -05:00
syscall.h
trace_custom_events.h
trace_events.h tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast 2026-01-30 10:44:11 -05:00