[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_A23159E297D62A89AF24A3EA881106A44208@qq.com>
Date: Thu, 28 Aug 2025 10:52:01 +0800
From: Rong Tao <rtoax@...mail.com>
To: andrii.nakryiko@...il.com,
ast@...nel.org,
daniel@...earbox.net
Cc: rtoax@...mail.com,
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>,
Viktor Malik <vmalik@...hat.com>,
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: [bpf-next v2 0/2] bpf/helpers: 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 | 4 +++-
tools/testing/selftests/bpf/progs/string_kfuncs_success.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
---
v2: Follow Andrii Nakryiko's advise, fix the 'wrong fix';
v1: https://lore.kernel.org/lkml/tencent_65E5988AD52BEC280D22964189505CD6ED06@qq.com/
--
2.51.0
Powered by blists - more mailing lists