* [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset()
@ 2024-12-18 17:57 Jerome Marchand
2024-12-19 1:28 ` Yonghong Song
2024-12-19 12:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Jerome Marchand @ 2024-12-18 17:57 UTC (permalink / raw)
To: bpf, Andrii Nakryiko; +Cc: linux-kselftest, linux-kernel, Jerome Marchand
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: 4e9e07603ecd ("selftests/bpf: make use of PROCMAP_QUERY ioctl if available")
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
tools/testing/selftests/bpf/trace_helpers.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/bpf/trace_helpers.c b/tools/testing/selftests/bpf/trace_helpers.c
index 2d742fdac6b9..51fa29e0e083 100644
--- a/tools/testing/selftests/bpf/trace_helpers.c
+++ b/tools/testing/selftests/bpf/trace_helpers.c
@@ -293,6 +293,9 @@ static int procmap_query(int fd, const void *addr, __u32 query_flags, size_t *st
return 0;
}
#else
+
+#define PROCMAP_QUERY_VMA_EXECUTABLE 0x04
+
static int procmap_query(int fd, const void *addr, __u32 query_flags, size_t *start, size_t *offset, int *flags)
{
return -EOPNOTSUPP;
--
2.47.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset()
2024-12-18 17:57 [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset() Jerome Marchand
@ 2024-12-19 1:28 ` Yonghong Song
2024-12-19 12:27 ` Daniel Borkmann
2024-12-19 12:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Yonghong Song @ 2024-12-19 1:28 UTC (permalink / raw)
To: Jerome Marchand, bpf, Andrii Nakryiko; +Cc: linux-kselftest, linux-kernel
On 12/18/24 9:57 AM, Jerome Marchand wrote:
> 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: 4e9e07603ecd ("selftests/bpf: make use of PROCMAP_QUERY ioctl if available")
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset()
2024-12-19 1:28 ` Yonghong Song
@ 2024-12-19 12:27 ` Daniel Borkmann
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2024-12-19 12:27 UTC (permalink / raw)
To: Yonghong Song, Jerome Marchand, bpf, Andrii Nakryiko
Cc: linux-kselftest, linux-kernel
On 12/19/24 2:28 AM, Yonghong Song wrote:
> On 12/18/24 9:57 AM, Jerome Marchand wrote:
>> 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: 4e9e07603ecd ("selftests/bpf: make use of PROCMAP_QUERY ioctl if available")
>> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
>
> Acked-by: Yonghong Song <yonghong.song@linux.dev>
lgtm, I've wrapped this in an ifndef while applying.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset()
2024-12-18 17:57 [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset() Jerome Marchand
2024-12-19 1:28 ` Yonghong Song
@ 2024-12-19 12:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-12-19 12:30 UTC (permalink / raw)
To: Jerome Marchand; +Cc: bpf, andrii, linux-kselftest, linux-kernel
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Wed, 18 Dec 2024 18:57:24 +0100 you wrote:
> 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: 4e9e07603ecd ("selftests/bpf: make use of PROCMAP_QUERY ioctl if available")
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
>
> [...]
Here is the summary with links:
- selftests/bpf: Fix compilation error in get_uprobe_offset()
https://git.kernel.org/bpf/bpf/c/716f2bca1ce9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-19 12:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-18 17:57 [PATCH] selftests/bpf: Fix compilation error in get_uprobe_offset() Jerome Marchand
2024-12-19 1:28 ` Yonghong Song
2024-12-19 12:27 ` Daniel Borkmann
2024-12-19 12:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox