projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cae9dc3
)
kasan: adjust kasan_stack_oob for tag-based mode
author
Andrey Konovalov
<andreyknvl@google.com>
Fri, 7 Aug 2020 06:25:12 +0000
(23:25 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:28 +0000
(11:33 -0700)
Use OOB_TAG_OFF as access offset to land the access into the next granule.
Suggested-by: Walter Wu <walter-zh.wu@mediatek.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Elena Petrova <lenaptr@google.com>
Cc: Marco Elver <elver@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Link:
http://lkml.kernel.org/r/403b259f1de49a7a3694531c851ac28326a586a8.1596199677.git.andreyknvl@google.com
Link:
http://lkml.kernel.org/r/3063ab1411e92bce36061a96e25b651212e70ba6.1596544734.git.andreyknvl@google.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test_kasan.c
patch
|
blob
|
history
diff --git
a/lib/test_kasan.c
b/lib/test_kasan.c
index f362f26629381f15215d9712d8c69c5d03fb8885..53e953bb1d1daf21d14e570e7225fe0b5c900334 100644
(file)
--- a/
lib/test_kasan.c
+++ b/
lib/test_kasan.c
@@
-488,7
+488,7
@@
static noinline void __init kasan_global_oob(void)
static noinline void __init kasan_stack_oob(void)
{
char stack_array[10];
- volatile int i =
0
;
+ volatile int i =
OOB_TAG_OFF
;
char *p = &stack_array[ARRAY_SIZE(stack_array) + i];
pr_info("out-of-bounds on stack\n");