[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_0682AB14BD5A8D0623CA1B440881665D5F0A@qq.com>
Date: Fri, 29 Aug 2025 10:12:18 +0800
From: Rong Tao <rtoax@...mail.com>
To: andrii.nakryiko@...il.com,
ast@...nel.org,
daniel@...earbox.net,
vmalik@...hat.com
Cc: Rong Tao <rongtao@...tc.cn>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>,
Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>,
Mykola Lysenko <mykolal@...com>,
Shuah Khan <shuah@...nel.org>,
bpf@...r.kernel.org (open list:BPF [GENERAL] (Safe Dynamic Programs and Tools)),
linux-kernel@...r.kernel.org (open list),
linux-kselftest@...r.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
Subject: [PATCH bpf-next v4 0/2] Fix bpf_strnstr len error
From: Rong Tao <rongtao@...tc.cn>
Fix bpf_strnstr() wrong 'len' parameter, bpf_strnstr("open", "open", 4)
should return 0 instead of -ENOENT.
Rong Tao (2):
bpf/helpers: bpf_strnstr: Exact match length
selftests/bpf: Add tests for bpf_strnstr
kernel/bpf/helpers.c | 10 +++++++++-
.../selftests/bpf/progs/string_kfuncs_success.c | 8 ++++++--
2 files changed, 15 insertions(+), 3 deletions(-)
---
v4: Add comment and more selftests;
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
Powered by blists - more mailing lists