]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - include/linux/compiler.h
compiler.h: Add read_word_at_a_time() function.
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Thu, 1 Feb 2018 18:00:49 +0000 (21:00 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Feb 2018 20:20:21 +0000 (12:20 -0800)
commit7f1e541fc8d57a143dd5df1d0a1276046e08c083
tree3a56c3f3dbf30506bd47b9af085f3c20863b4dee
parentbdb5ac801af3d81d36732c2f640d6a1d3df83826
compiler.h: Add read_word_at_a_time() function.

Sometimes we know that it's safe to do potentially out-of-bounds access
because we know it won't cross a page boundary.  Still, KASAN will
report this as a bug.

Add read_word_at_a_time() function which is supposed to be used in such
cases.  In read_word_at_a_time() KASAN performs relaxed check - only the
first byte of access is validated.

Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/compiler.h