aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorWalter Wu <walter-zh.wu@mediatek.com>2020-08-06 23:24:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-07 11:33:28 -0700
commitf33a01492a24a276e0bc1c932bcefdb8c1125159 (patch)
treed1219d827b66e395056ddcdcc8ac6e0f45f6a7c0 /kernel/fork.c
parentkasan: remove kasan_unpoison_stack_above_sp_to() (diff)
downloadwireguard-linux-f33a01492a24a276e0bc1c932bcefdb8c1125159.tar.xz
wireguard-linux-f33a01492a24a276e0bc1c932bcefdb8c1125159.zip
lib/test_kasan.c: fix KASAN unit tests for tag-based KASAN
We use tag-based KASAN, then KASAN unit tests don't detect out-of-bounds memory access. They need to be fixed. With tag-based KASAN, the state of each 16 aligned bytes of memory is encoded in one shadow byte and the shadow value is tag of pointer, so we need to read next shadow byte, the shadow value is not equal to tag value of pointer, so that tag-based KASAN will detect out-of-bounds memory access. [walter-zh.wu@mediatek.com: use KASAN_SHADOW_SCALE_SIZE instead of 13] Link: http://lkml.kernel.org/r/20200708132524.11688-1-walter-zh.wu@mediatek.com Suggested-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Walter Wu <walter-zh.wu@mediatek.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrey Konovalov <andreyknvl@google.com> Acked-by: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Link: http://lkml.kernel.org/r/20200706115039.16750-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions