* [PATCH bpf-next v5 0/2] Fix bpf_strnstr len error
@ 2025-08-29 16:30 Rong Tao
2025-08-29 19:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Rong Tao @ 2025-08-29 16:30 UTC (permalink / raw)
To: vmalik, andrii.nakryiko, ast, daniel
Cc: Rong Tao, Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman,
Song Liu, Yonghong Song, John Fastabend, KP Singh,
Stanislav Fomichev, Hao Luo, Jiri Olsa, Mykola Lysenko,
Shuah Khan,
open list:BPF [GENERAL] (Safe Dynamic Programs and Tools),
open list, open list:KERNEL SELFTEST FRAMEWORK
From: Rong Tao <rongtao@cestc.cn>
Fix bpf_strnstr() wrong 'len' parameter, bpf_strnstr("open", "open", 4)
should return 0 instead of -ENOENT. And fix a more general case when s2
is a suffix of the first len characters of s1.
Rong Tao (2):
bpf/helpers: bpf_strnstr: Exact match length
selftests/bpf: Add tests for bpf_strnstr
kernel/bpf/helpers.c | 9 ++++++++-
.../testing/selftests/bpf/progs/string_kfuncs_success.c | 8 ++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
---
v5: Add more commit message and change the patch 0001's comment;
v4: Add comment and more selftests;
https://lore.kernel.org/all/tencent_CBD40091C14056E8298BE3725B65EE156405@qq.com/
v3: Fix selftests/bpf error in v2, sorry about that;
https://lore.kernel.org/lkml/tencent_69BD268FBA201219240B51661D5E96A8D80A@qq.com/
v2: Follow Andrii Nakryiko's advise, fix the 'wrong fix';
https://lore.kernel.org/lkml/tencent_DF4DA83EEBFB9246E5E3357BB40911CCA005@qq.com/
v1: https://lore.kernel.org/lkml/tencent_65E5988AD52BEC280D22964189505CD6ED06@qq.com/
--
2.51.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next v5 0/2] Fix bpf_strnstr len error
2025-08-29 16:30 [PATCH bpf-next v5 0/2] Fix bpf_strnstr len error Rong Tao
@ 2025-08-29 19:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-29 19:00 UTC (permalink / raw)
To: Rong Tao
Cc: vmalik, andrii.nakryiko, ast, daniel, rongtao, andrii, martin.lau,
eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, mykolal, shuah, bpf, linux-kernel, linux-kselftest
Hello:
This series was applied to bpf/bpf.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Sat, 30 Aug 2025 00:30:16 +0800 you wrote:
> From: Rong Tao <rongtao@cestc.cn>
>
> Fix bpf_strnstr() wrong 'len' parameter, bpf_strnstr("open", "open", 4)
> should return 0 instead of -ENOENT. And fix a more general case when s2
> is a suffix of the first len characters of s1.
>
> Rong Tao (2):
> bpf/helpers: bpf_strnstr: Exact match length
> selftests/bpf: Add tests for bpf_strnstr
>
> [...]
Here is the summary with links:
- [bpf-next,v5,1/2] bpf/helpers: bpf_strnstr: Exact match length
(no matching commit)
- [bpf-next,v5,2/2] selftests/bpf: Add tests for bpf_strnstr
https://git.kernel.org/bpf/bpf/c/19139f45999a
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] 2+ messages in thread
end of thread, other threads:[~2025-08-29 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 16:30 [PATCH bpf-next v5 0/2] Fix bpf_strnstr len error Rong Tao
2025-08-29 19:00 ` 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;
as well as URLs for NNTP newsgroup(s).