Skip to content

Commit 716f2bc

Browse files
jeromemarchandborkmann
authored andcommitted
selftests/bpf: Fix compilation error in get_uprobe_offset()
In get_uprobe_offset(), the call to procmap_query() use the constant PROCMAP_QUERY_VMA_EXECUTABLE, even if PROCMAP_QUERY is not defined. Define PROCMAP_QUERY_VMA_EXECUTABLE when PROCMAP_QUERY isn't. Fixes: 4e9e076 ("selftests/bpf: make use of PROCMAP_QUERY ioctl if available") Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/bpf/20241218175724.578884-1-jmarchan@redhat.com
1 parent 29d44cc commit 716f2bc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/testing/selftests/bpf/trace_helpers.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,10 @@ static int procmap_query(int fd, const void *addr, __u32 query_flags, size_t *st
293293
return 0;
294294
}
295295
#else
296+
# ifndef PROCMAP_QUERY_VMA_EXECUTABLE
297+
# define PROCMAP_QUERY_VMA_EXECUTABLE 0x04
298+
# endif
299+
296300
static int procmap_query(int fd, const void *addr, __u32 query_flags, size_t *start, size_t *offset, int *flags)
297301
{
298302
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)