diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-07-21 23:19:45 +0200 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2021-07-22 16:27:42 -0700 |
commit | 16c5900ba776c5acd6568abd60c40f948a96e496 (patch) | |
tree | b6cbeb71d9b283ae29d6deaf67adcd336d9a99f2 /kernel/bpf/local_storage.c | |
parent | 807b8f0e24e6004984094e1bcbbd2b297011a085 (diff) |
bpf: Fix pointer cast warning
kp->addr is a pointer, so it cannot be cast directly to a 'u64'
when it gets interpreted as an integer value:
kernel/trace/bpf_trace.c: In function '____bpf_get_func_ip_kprobe':
kernel/trace/bpf_trace.c:968:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
968 | return kp ? (u64) kp->addr : 0;
Use the uintptr_t type instead.
Fixes: 9ffd9f3ff719 ("bpf: Add bpf_get_func_ip helper for kprobe programs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210721212007.3876595-1-arnd@kernel.org
Diffstat (limited to 'kernel/bpf/local_storage.c')
0 files changed, 0 insertions, 0 deletions