Re: [PATCH bpf-next v3] libbpf: Report error when a negative kprobe offset is specified
From: patchwork-bot+netdevbpf
Date: Sun Apr 19 2026 - 08:11:04 EST
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>:
On Sat, 18 Apr 2026 23:09:44 -0400 you wrote:
> In attach_kprobe(), the parsing logic uses sscanf() to extract the
> target function name and offset from the section definition. Currently,
> if a user specifies a negative offset (e.g., SEC("kprobe/func+-100")),
> the input is not explicitly caught and reported as an error.
>
> This commit updates the logic to explicitly notify the user when a
> negative integer is provided. To facilitate this check, the offset
> variable is changed from unsigned long to long so that sscanf()
> can accurately capture a negative input for evaluation.
>
> [...]
Here is the summary with links:
- [bpf-next,v3] libbpf: Report error when a negative kprobe offset is specified
https://git.kernel.org/bpf/bpf-next/c/ad35d8018669
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html