Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe1cf9c0 authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Alistair Delva
Browse files

BACKPORT: kasan: initialize shadow to 0xff for tag-based mode

Use kasan_alloc_zeroed_page instead of defining kasan_alloc_raw_page.

(Upstream commit 080eb83f54cf5b96ae5b6ce3c1896e35c341aff9).

A tag-based KASAN shadow memory cell contains a memory tag, that
corresponds to the tag in the top byte of the pointer, that points to that
memory.  The native top byte value of kernel pointers is 0xff, so with
tag-based KASAN we need to initialize shadow memory to 0xff.

[cai@lca.pw: arm64: skip kmemleak for KASAN again\
  Link: http://lkml.kernel.org/r/20181226020550.63712-1-cai@lca.pw
Link: http://lkml.kernel.org/r/5cc1b789aad7c99cf4f3ec5b328b147ad53edb40.1544099024.git.andreyknvl@google.com


Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Reviewed-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: default avatarDmitry Vyukov <dvyukov@google.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarAndrey Konovalov <andreyknvl@google.com>
Bug: 128674696
Change-Id: I370390e529de29fee99820f3ae2fc3d0408379ef
parent 02e8a3fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment