]> Git Repo - linux.git/commit
kasan, vmalloc: reset tags in vmalloc functions
authorAndrey Konovalov <[email protected]>
Fri, 25 Mar 2022 01:11:04 +0000 (18:11 -0700)
committerLinus Torvalds <[email protected]>
Fri, 25 Mar 2022 02:06:47 +0000 (19:06 -0700)
commit4aff1dc4fb3a5a3be96b6ad8db8348d3e877d7d0
tree209e2448248bedcaef370b432b72cbb68989dbf6
parent579fb0ac085be2015529a5f7bd1061899a6374de
kasan, vmalloc: reset tags in vmalloc functions

In preparation for adding vmalloc support to SW/HW_TAGS KASAN, reset
pointer tags in functions that use pointer values in range checks.

vread() is a special case here.  Despite the untagging of the addr pointer
in its prologue, the accesses performed by vread() are checked.

Instead of accessing the virtual mappings though addr directly, vread()
recovers the physical address via page_address(vmalloc_to_page()) and
acceses that.  And as page_address() recovers the pointer tag, the
accesses get checked.

Link: https://lkml.kernel.org/r/046003c5f683cacb0ba18e1079e9688bb3dca943.1643047180.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <[email protected]>
Acked-by: Marco Elver <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Evgenii Stepanov <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Collingbourne <[email protected]>
Cc: Vincenzo Frascino <[email protected]>
Cc: Will Deacon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmalloc.c
This page took 0.050558 seconds and 4 git commands to generate.