linux-stable/tools
Namhyung Kim 1e03a26959 perf record: Fix BTF type checks in the off-cpu profiling
[ Upstream commit 0e501a65d3 ]

The BTF func proto for a tracepoint has one more argument than the
actual tracepoint function since it has a context argument at the
begining.  So it should compare to 5 when the tracepoint has 4
arguments.

  typedef void (*btf_trace_sched_switch)(void *, bool, struct task_struct *, struct task_struct *, unsigned int);

Also, recent change in the perf tool would use a hand-written minimal
vmlinux.h to generate BTF in the skeleton.  So it won't have the info
of the tracepoint.  Anyway it should use the kernel's vmlinux BTF to
check the type in the kernel.

Fixes: b36888f71c ("perf record: Handle argument change in sched_switch")
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Song Liu <song@kernel.org>
Cc: Hao Luo <haoluo@google.com>
CC: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230922234444.3115821-1-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:52:10 +01:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 20:03:50 +02:00
bootconfig
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-13 09:42:30 +02:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-13 09:42:23 +02:00
iio tools: iio: iio_generic_buffer: Fix some integer type and calculation 2023-09-23 11:11:07 +02:00
include maple_tree: add GFP_KERNEL to allocations in mas_expected_entries() 2023-11-02 09:35:24 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Free btf_vmlinux when closing bpf_object 2023-09-23 11:11:03 +02:00
memory-model
objtool objtool: Propagate early errors 2023-11-20 11:51:50 +01:00
pci
pcmcia
perf perf record: Fix BTF type checks in the off-cpu profiling 2023-11-20 11:52:10 +01:00
power
rcu
scripts
spi
testing selftests/resctrl: Ensure the benchmark commands fits to its array 2023-11-20 11:52:03 +01:00
thermal
time
tracing
usb
verification
virtio
vm
wmi
Makefile