diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2018-02-01 21:00:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-31 08:28:44 +0300 |
commit | 8ac9e068f85abc5cf4ec52fffd162bfdd3c9c343 (patch) | |
tree | 7b5a4eac791dc1cf928170f08648f564273eb26f /lib | |
parent | 21b1e01dea2c8c6cd2dfc362c298ac7c654c6dc1 (diff) | |
download | linux-8ac9e068f85abc5cf4ec52fffd162bfdd3c9c343.tar.xz |
compiler.h: Add read_word_at_a_time() function.
[ Upstream commit 7f1e541fc8d57a143dd5df1d0a1276046e08c083 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions