Re: [PATCH v7 1/8] lib/string_kunit: add correctness test for strlen()

From: Kees Cook

Date: Fri Jan 30 2026 - 12:39:15 EST


On Fri, Jan 30, 2026 at 10:50:11AM +0800, Feng Jiang wrote:
> Add a KUnit test for strlen() to verify correctness across
> different string lengths and memory alignments. Use vmalloc()
> to place the NUL character at the page boundary to ensure
> over-reads are detected.
>
> Suggested-by: Kees Cook <kees@xxxxxxxxxx>
> Signed-off-by: Feng Jiang <jiangfeng@xxxxxxxxxx>

Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook