summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincenzo Frascino <vincenzo.frascino@arm.com>2021-02-04 18:32:53 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-05 11:03:47 -0800
commitb99acdcbfe3c8394ddd8b8d89d9bae2bbba4a459 (patch)
tree325e9a188b825c56a66b7ba52f07ead2e284e299 /lib
parent49c6631d3b4f61a7b5bb0453a885a12bfa06ffd8 (diff)
kasan: make addr_has_metadata() return true for valid addresses
Currently, addr_has_metadata() returns true for every address. An invalid address (e.g. NULL) passed to the function when, KASAN_HW_TAGS is enabled, leads to a kernel panic. Make addr_has_metadata() return true for valid addresses only. Note: KASAN_HW_TAGS support for vmalloc will be added with a future patch. Link: https://lkml.kernel.org/r/20210126134409.47894-3-vincenzo.frascino@arm.com Fixes: 2e903b91479782b7 ("kasan, arm64: implement HW_TAGS runtime") Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Leon Romanovsky <leonro@mellanox.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Naresh Kamboju <naresh.kamboju@linaro.org> Cc: "Paul E . McKenney" <paulmck@kernel.org> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions