mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
5835437609
Samuel Holland <samuel.holland@sifive.com> says: This series fixes two areas where uninstrumented assembly routines caused gaps in KASAN coverage on RISC-V, which were caught by KUnit tests. The KASAN KUnit test suite passes after applying this series. This series fixes the following test failures: # kasan_strings: EXPECTATION FAILED at mm/kasan/kasan_test.c:1520 KASAN failure expected in "kasan_int_result = strcmp(ptr, "2")", but none occurred # kasan_strings: EXPECTATION FAILED at mm/kasan/kasan_test.c:1524 KASAN failure expected in "kasan_int_result = strlen(ptr)", but none occurred not ok 60 kasan_strings # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1531 KASAN failure expected in "set_bit(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1533 KASAN failure expected in "clear_bit(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1535 KASAN failure expected in "clear_bit_unlock(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1536 KASAN failure expected in "__clear_bit_unlock(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1537 KASAN failure expected in "change_bit(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1543 KASAN failure expected in "test_and_set_bit(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1545 KASAN failure expected in "test_and_set_bit_lock(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1546 KASAN failure expected in "test_and_clear_bit(nr, addr)", but none occurred # kasan_bitops_generic: EXPECTATION FAILED at mm/kasan/kasan_test.c:1548 KASAN failure expected in "test_and_change_bit(nr, addr)", but none occurred not ok 61 kasan_bitops_generic Samuel Holland (2): riscv: Omit optimized string routines when using KASAN riscv: Enable bitops instrumentation arch/riscv/include/asm/bitops.h | 43 ++++++++++++++++++--------------- arch/riscv/include/asm/string.h | 2 ++ arch/riscv/kernel/riscv_ksyms.c | 3 --- arch/riscv/lib/Makefile | 2 ++ arch/riscv/lib/strcmp.S | 1 + arch/riscv/lib/strlen.S | 1 + arch/riscv/lib/strncmp.S | 1 + arch/riscv/purgatory/Makefile | 2 ++ 8 files changed, 32 insertions(+), 23 deletions(-) * b4-shazam-merge: riscv: Enable bitops instrumentation riscv: Omit optimized string routines when using KASAN Link: https://lore.kernel.org/r/20240801033725.28816-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> |
||
---|---|---|
.. | ||
compat_vdso | ||
pi | ||
probes | ||
tests | ||
vdso | ||
vendor_extensions | ||
.gitignore | ||
acpi_numa.c | ||
acpi.c | ||
alternative.c | ||
asm-offsets.c | ||
cacheinfo.c | ||
cfi.c | ||
compat_signal.c | ||
compat_syscall_table.c | ||
copy-unaligned.h | ||
copy-unaligned.S | ||
cpu_ops_sbi.c | ||
cpu_ops_spinwait.c | ||
cpu_ops.c | ||
cpu-hotplug.c | ||
cpu.c | ||
cpufeature.c | ||
crash_dump.c | ||
crash_save_regs.S | ||
efi-header.S | ||
efi.c | ||
elf_kexec.c | ||
entry.S | ||
fpu.S | ||
ftrace.c | ||
head.h | ||
head.S | ||
hibernate-asm.S | ||
hibernate.c | ||
image-vars.h | ||
irq.c | ||
jump_label.c | ||
kernel_mode_fpu.c | ||
kernel_mode_vector.c | ||
kexec_relocate.S | ||
kgdb.c | ||
machine_kexec_file.c | ||
machine_kexec.c | ||
Makefile | ||
Makefile.syscalls | ||
mcount-dyn.S | ||
mcount.S | ||
module-sections.c | ||
module.c | ||
paravirt.c | ||
patch.c | ||
perf_callchain.c | ||
perf_regs.c | ||
process.c | ||
ptrace.c | ||
reset.c | ||
return_address.c | ||
riscv_ksyms.c | ||
sbi-ipi.c | ||
sbi.c | ||
setup.c | ||
signal.c | ||
smp.c | ||
smpboot.c | ||
soc.c | ||
stacktrace.c | ||
suspend_entry.S | ||
suspend.c | ||
sys_hwprobe.c | ||
sys_riscv.c | ||
syscall_table.c | ||
time.c | ||
traps_misaligned.c | ||
traps.c | ||
unaligned_access_speed.c | ||
vdso.c | ||
vector.c | ||
vendor_extensions.c | ||
vmcore_info.c | ||
vmlinux-xip.lds.S | ||
vmlinux.lds.S |