Re: [PATCH 1/2] word-at-a-time: check the first byte in load_unaligned_zeropad()
From: Andrey Ryabinin
Date: Thu Oct 22 2026 - 10:33:59 EST
Qiliang Yuan <odys.yuan@xxxxxxxxx> writes:
> On Tue, 20 Oct 2026 12:58:54 -0400, Andrey Ryabinin wrote:
>>> + /* open-coded instrument_read(addr, 1), as in read_word_at_a_time() */
>>
>> Why it's open-coded ?
>
> For the same reason as read_word_at_a_time(): commit ece69af2ede1
> ("rwonce: handle KCSAN like KASAN in read_word_at_a_time()") open-coded
> it "to avoid having to pull the entire instrumented.h header into
> rwonce.h". I kept the six asm/word-at-a-time.h headers to the same two
> small headers, kasan-checks.h and kcsan-checks.h, rather than pulling in
> instrumented.h with linux/bug.h and kmsan-checks.h.
>
That concern is specific to rwonce.h being included from very low-level header
like compiler.h It doesn't cary over to word-at-a-time.h
> Thanks,
> Qiliang