Re: [PATCH] rwonce: fix crash by removing READ_ONCE() for unaligned read

From: Linus Torvalds
Date: Wed Mar 26 2025 - 20:49:50 EST


On Wed, 26 Mar 2025 at 15:54, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
>
> > Put another way: I wonder what other cases may lurk around this all...
>
> That change has caused only one issue that I know of, which was fixed by
> commit d3f450533bbc ("efi: tpm: Avoid READ_ONCE() for accessing the
> event log"). I have not seen any since then until this point and I do
> daily boots of -next with LTO enabled on both of my arm64 test machines.

Ahh, ok. That makes me happier.

I guess unaligned READ_ONCE() code really shouldn't exist in generic
code anyway, since some architectures will fail any unaligned access.

But those architectures tend to not get a lot of testing (they are a
dying breed - good riddance), so "shouldn't exist" doesn't necessarily
equate to really not existing.

Linus