On Thu, Jan 25, 2018 at 12:32 AM, Dmitry Vyukov dvyukov@google.com wrote:
On Wed, Jan 24, 2018 at 6:52 PM, Linus Torvalds torvalds@linux-foundation.org wrote:
So I'd *much* rather have some way to tell KASAN that word-at-a-time is going on. Because that approach definitely makes a difference in other places.
The other option was to use READ_ONCE_NOCHECK().
How about just using the same accessor that we do for the dcache case. That gives a reasonable example of the whole word-at-a-time model, and should be good.
COMPLETELY UNTESTED patch attached. This needs to be verified.
It does limit the word-at-a-time code to the architectures that select both HAVE_EFFICIENT_UNALIGNED_ACCESS and DCACHE_WORD_ACCESS, but that seems a reasonable choice anyway.
Linus