Namhyung Kim
1dbd4215c7
perf lock contention: Add a missing NULL check
[ Upstream commit f3408580ba ]
I got a report for a failure in BPF verifier on a recent kernel with
perf lock contention command. It checks task->sighand->siglock without
checking if sighand is NULL or not. Let's add one.
; if (&curr->sighand->siglock == (void *)lock)
265: (79) r1 = *(u64 *)(r0 +2624) ; frame1: R0_w=trusted_ptr_task_struct(off=0,imm=0)
; R1_w=rcu_ptr_or_null_sighand_struct(off=0,imm=0)
266: (b7) r2 = 0 ; frame1: R2_w=0
267: (0f) r1 += r2
R1 pointer arithmetic on rcu_ptr_or_null_ prohibited, null-check it first
processed 164 insns (limit 1000000) max_states_per_insn 1 total_states 15 peak_states 15 mark_read 5
-- END PROG LOAD LOG --
libbpf: prog 'contention_end': failed to load: -13
libbpf: failed to load object 'lock_contention_bpf'
libbpf: failed to load BPF skeleton 'lock_contention_bpf': -13
Failed to load lock-contention BPF skeleton
lock contention BPF setup failed
lock contention did not detect any lock contention
Fixes: 1811e82767 ("perf lock contention: Track and show siglock with address")
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Song Liu <song@kernel.org>
Cc: bpf@vger.kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240409225542.1870999-1-namhyung@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-27 17:12:54 +02:00
..
2024-01-19 14:25:23 -08:00
2023-12-12 14:55:13 -03:00
2023-09-30 00:09:06 -07:00
2024-01-26 10:51:49 -03:00
2023-08-15 16:41:49 -03:00
2024-03-26 18:17:16 -04:00
2023-12-20 14:31:59 -03:00
2024-01-26 10:51:49 -03:00
2024-01-26 10:51:48 -03:00
2024-04-27 17:12:54 +02:00
2024-04-27 17:12:54 +02:00
2023-12-05 15:46:43 -03:00
2023-03-15 10:27:07 -03:00
2023-12-23 22:40:17 -03:00
2023-09-09 20:06:17 -07:00
2023-10-12 10:01:56 -07:00
2023-04-10 19:21:31 -03:00
2023-12-12 14:55:13 -03:00
2023-05-28 10:24:14 -03:00
2023-06-27 12:09:44 -07:00
2023-04-10 19:21:31 -03:00
2023-07-20 11:43:45 -03:00
2023-04-10 19:21:31 -03:00
2023-12-12 14:55:13 -03:00
2023-05-28 10:24:14 -03:00
2023-11-09 13:49:32 -03:00
2023-06-23 21:48:49 -07:00
2023-06-12 15:57:54 -03:00
2023-04-24 14:28:11 -03:00
2023-11-21 10:02:38 -08:00
2024-01-26 10:51:49 -03:00
2023-11-27 10:21:27 -03:00
2023-06-12 15:57:53 -03:00
2023-05-28 10:24:02 -03:00
2024-03-26 18:17:01 -04:00
2023-12-23 22:39:42 -03:00
2023-10-25 13:37:22 -07:00
2023-10-17 12:40:51 -07:00
2023-12-14 18:24:38 -03:00
2023-06-12 15:57:53 -03:00
2024-01-26 12:06:12 -03:00
2023-12-04 16:42:09 -03:00
2023-09-18 16:46:15 -07:00
2023-04-10 19:20:53 -03:00
2023-10-17 12:40:02 -07:00
2023-01-02 11:51:53 -03:00
2022-12-14 15:28:19 -03:00
2023-11-10 09:04:21 -03:00
2024-03-26 18:17:02 -04:00
2023-11-22 11:17:53 -08:00
2023-12-20 13:20:45 -03:00
2023-09-11 10:26:36 -03:00
2023-11-28 14:14:53 -03:00
2023-04-10 19:22:05 -03:00