[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601300935.DF5E50015A@keescook>
Date: Fri, 30 Jan 2026 09:35:52 -0800
From: Kees Cook <kees@...nel.org>
To: Feng Jiang <jiangfeng@...inos.cn>
Cc: palmer@...belt.com, aou@...s.berkeley.edu, alex@...ti.fr,
akpm@...ux-foundation.org, andy@...nel.org, ebiggers@...nel.org,
martin.petersen@...cle.com, herbert@...dor.apana.org.au,
samuel.holland@...ive.com, ajones@...tanamicro.com,
conor.dooley@...rochip.com, charlie@...osinc.com, nathan@...nel.org,
linusw@...nel.org, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v7 5/8] lib/string_kunit: extend benchmarks to strnlen()
and chr searches
On Fri, Jan 30, 2026 at 10:50:15AM +0800, Feng Jiang wrote:
> Extend the string benchmarking suite to include strnlen(), strchr(),
> and strrchr().
>
> For character search functions strchr() and strrchr(), the benchmark
> targets the NUL character. This ensures the entire string is scanned,
> providing a consistent measure of full-length processing efficiency
> comparable to strlen().
>
> Suggested-by: Andy Shevchenko <andy@...nel.org>
> Suggested-by: Eric Biggers <ebiggers@...nel.org>
> Signed-off-by: Feng Jiang <jiangfeng@...inos.cn>
Reviewed-by: Kees Cook <kees@...nel.org>
--
Kees Cook
Powered by blists - more mailing lists