riscv: Enable bitops instrumentation
authorSamuel Holland <samuel.holland@sifive.com>
Thu, 1 Aug 2024 03:37:00 +0000 (20:37 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 19 Sep 2024 08:10:04 +0000 (01:10 -0700)
commit77514915b72c51ebc1c30a67a54d4a90ca2a4a39
treeea74d1f2a6d099ea216e5b17773d61b91f28c44d
parent58ff537109ac863d4ec83baf8413b17dcc10101c
riscv: Enable bitops instrumentation

Instead of implementing the bitops functions directly in assembly,
provide the arch_-prefixed versions and use the wrappers from
asm-generic to add instrumentation. This improves KASAN coverage and
fixes the kasan_bitops_generic() 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-3-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/bitops.h