aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGravatar Shung-Hsi Yu <shung-hsi.yu@suse.com> 2024-02-02 17:55:58 +0800
committerGravatar Martin KaFai Lau <martin.lau@kernel.org> 2024-02-02 14:14:03 -0800
commita68b50f47bec8bd6a33b07b7e1562db2553981a7 (patch)
tree319c590302cf34ab5eae788a6b59f698fe848f09 /tools
parentMerge branch 'improvements-for-tracking-scalars-in-the-bpf-verifier' (diff)
downloadlinux-a68b50f47bec8bd6a33b07b7e1562db2553981a7.tar.gz
linux-a68b50f47bec8bd6a33b07b7e1562db2553981a7.tar.bz2
linux-a68b50f47bec8bd6a33b07b7e1562db2553981a7.zip
selftests/bpf: trace_helpers.c: do not use poisoned type
After commit c698eaebdf47 ("selftests/bpf: trace_helpers.c: Optimize kallsyms cache") trace_helpers.c now includes libbpf_internal.h, and thus can no longer use the u32 type (among others) since they are poison in libbpf_internal.h. Replace u32 with __u32 to fix the following error when building trace_helpers.c on powerpc: error: attempt to use poisoned "u32" Fixes: c698eaebdf47 ("selftests/bpf: trace_helpers.c: Optimize kallsyms cache") Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20240202095559.12900-1-shung-hsi.yu@suse.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/trace_helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/trace_helpers.c b/tools/testing/selftests/bpf/trace_helpers.c
index 4faa898ff7fc..27fd7ed3e4b0 100644
--- a/tools/testing/selftests/bpf/trace_helpers.c
+++ b/tools/testing/selftests/bpf/trace_helpers.c
@@ -271,7 +271,7 @@ ssize_t get_uprobe_offset(const void *addr)
* addi r2,r2,XXXX
*/
{
- const u32 *insn = (const u32 *)(uintptr_t)addr;
+ const __u32 *insn = (const __u32 *)(uintptr_t)addr;
if ((((*insn & OP_RT_RA_MASK) == ADDIS_R2_R12) ||
((*insn & OP_RT_RA_MASK) == LIS_R2)) &&