Re: [PATCH 2/2] kasan/test: cover load_unaligned_zeropad()
From: Andrey Ryabinin
Date: Tue Oct 20 2026 - 13:11:31 EST
Qiliang Yuan <odys.yuan@xxxxxxxxx> 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@xxxxxxxxx>
Reviewed-by: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>