commit | 70585d9a09e0d89e28677ed3b25fa0fdf82e50d6 | [log] [tgz] |
---|---|---|
author | Andrey Konovalov <[email protected]> | Tue Dec 22 12:00:24 2020 -0800 |
committer | Alistair Delva <[email protected]> | Tue Jan 19 21:47:27 2021 -0800 |
tree | e83aaab56a45a9ed207eac8b1a2f0204a4b40027 | |
parent | 37f77a6fb323598a521012516cdcbbff98bb925b [diff] [blame] |
UPSTREAM: kasan: rename KASAN_SHADOW_* to KASAN_GRANULE_* [ Upstream commit 1f600626b3a9b77001b3ef90a79bf68c9f7e4cda ] This is a preparatory commit for the upcoming addition of a new hardware tag-based (MTE-based) KASAN mode. The new mode won't be using shadow memory, but will still use the concept of memory granules. Each memory granule maps to a single metadata entry: 8 bytes per one shadow byte for generic mode, 16 bytes per one shadow byte for software tag-based mode, and 16 bytes per one allocation tag for hardware tag-based mode. Rename KASAN_SHADOW_SCALE_SIZE to KASAN_GRANULE_SIZE, and KASAN_SHADOW_MASK to KASAN_GRANULE_MASK. Also use MASK when used as a mask, otherwise use SIZE. No functional changes. Link: https://lkml.kernel.org/r/939b5754e47f528a6e6a6f28ffc5815d8d128033.1606161801.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <[email protected]> Signed-off-by: Vincenzo Frascino <[email protected]> Reviewed-by: Marco Elver <[email protected]> Reviewed-by: Alexander Potapenko <[email protected]> Tested-by: Vincenzo Frascino <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Branislav Rankov <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Evgenii Stepanov <[email protected]> Cc: Kevin Brodsky <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Bug: 172318110 Signed-off-by: Andrey Konovalov <[email protected]> Change-Id: I195cb22714625685acf520eb62e661e636105fa0
diff --git a/lib/test_kasan_module.c b/lib/test_kasan_module.c index 62a8785..3b4cc77 100644 --- a/lib/test_kasan_module.c +++ b/lib/test_kasan_module.c
@@ -15,7 +15,7 @@ #include "../mm/kasan/kasan.h" -#define OOB_TAG_OFF (IS_ENABLED(CONFIG_KASAN_GENERIC) ? 0 : KASAN_SHADOW_SCALE_SIZE) +#define OOB_TAG_OFF (IS_ENABLED(CONFIG_KASAN_GENERIC) ? 0 : KASAN_GRANULE_SIZE) static noinline void __init copy_user_test(void) {