Skip to content
Commit 91f2dc68 authored by Feng Zhou's avatar Feng Zhou Committed by Daniel Borkmann
Browse files

bpf/btf: Fix is_int_ptr()

When tracing a kernel function with arg type is u32*, btf_ctx_access()
would report error: arg2 type INT is not a struct.

The commit bb6728d7 ("bpf: Allow access to int pointer arguments
in tracing programs") added support for int pointer, but did not skip
modifiers before checking it's type. This patch fixes it.

Fixes: bb6728d7

 ("bpf: Allow access to int pointer arguments in tracing programs")
Co-developed-by: default avatarChengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: default avatarChengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: default avatarFeng Zhou <zhoufeng.zf@bytedance.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20230410085908.98493-2-zhoufeng.zf@bytedance.com
parent 255f0e14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment