]> git.ipfire.org Git - thirdparty/linux.git/commit
riscv: Omit optimized string routines when using KASAN
authorSamuel Holland <samuel.holland@sifive.com>
Thu, 1 Aug 2024 03:36:59 +0000 (20:36 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 19 Sep 2024 08:10:00 +0000 (01:10 -0700)
commit58ff537109ac863d4ec83baf8413b17dcc10101c
tree9bd118c81ca4582e270c84a880b298c195e35b1e
parent8400291e289ee6b2bf9779ff1c83a291501f017b
riscv: Omit optimized string routines when using KASAN

The optimized string routines are implemented in assembly, so they are
not instrumented for use with KASAN. Fall back to the C version of the
routines in order to improve KASAN coverage. This fixes the
kasan_strings() unit test.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240801033725.28816-2-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/string.h
arch/riscv/kernel/riscv_ksyms.c
arch/riscv/lib/Makefile
arch/riscv/lib/strcmp.S
arch/riscv/lib/strlen.S
arch/riscv/lib/strncmp.S
arch/riscv/purgatory/Makefile