[PATCH v7 3/8] lib/string_kunit: add correctness test for strrchr()
Kees Cook
kees at kernel.org
Fri Jan 30 09:34:58 PST 2026
On Fri, Jan 30, 2026 at 10:50:13AM +0800, Feng Jiang wrote:
> Add a KUnit test for strrchr() 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