[PATCH 2/2] kasan/test: cover load_unaligned_zeropad()

Andrey Ryabinin ryabinin.a.a at gmail.com
Tue Oct 20 10:05:57 PDT 2026


Qiliang Yuan <odys.yuan at gmail.com> writes:

> On architectures with CONFIG_DCACHE_WORD_ACCESS, load_unaligned_zeropad()
> does the word loads of the dcache name compare and of path name
> hashing.
>
> None of the KASAN test cases reads memory through it, so nothing
> noticed that KASAN did not check these loads at all.
>
> Add a case that reads a freed object through load_unaligned_zeropad()
> and expects a report. Skip it with hardware tag-based KASAN, since
> arm64 turns tag checking off for this load:
>
>   kasan_load_unaligned_zeropad, x86_64, generic KASAN
>   without "word-at-a-time: check the first byte in
>   load_unaligned_zeropad()"                                 FAILED
>   with it                                                   PASSED
>
> Signed-off-by: Qiliang Yuan <odys.yuan at gmail.com>

Reviewed-by: Andrey Ryabinin <ryabinin.a.a at gmail.com>



More information about the linux-riscv mailing list