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

Kees Cook kees at kernel.org
Fri Jan 30 09:34:42 PST 2026


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 at kernel.org>
> Signed-off-by: Feng Jiang <jiangfeng at kylinos.cn>

Reviewed-by: Kees Cook <kees at kernel.org>

-- 
Kees Cook



More information about the linux-riscv mailing list