]> git.itanic.dy.fi Git - linux-stable/commit
mm: kasan: Skip unpoisoning of user pages
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 10 Jun 2022 15:21:39 +0000 (16:21 +0100)
committerWill Deacon <will@kernel.org>
Thu, 7 Jul 2022 09:48:37 +0000 (10:48 +0100)
commit70c248aca9e7efa85a6664d5ab56c17c326c958f
tree1cee0c376af4662b3f7bf8982187e3492dff1b63
parented0a6d1d973e9763989b44913ae1bd2a5d5d5777
mm: kasan: Skip unpoisoning of user pages

Commit c275c5c6d50a ("kasan: disable freed user page poisoning with HW
tags") added __GFP_SKIP_KASAN_POISON to GFP_HIGHUSER_MOVABLE. A similar
argument can be made about unpoisoning, so also add
__GFP_SKIP_KASAN_UNPOISON to user pages. To ensure the user page is
still accessible via page_address() without a kasan fault, reset the
page->flags tag.

With the above changes, there is no need for the arm64
tag_clear_highpage() to reset the page->flags tag.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Peter Collingbourne <pcc@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://lore.kernel.org/r/20220610152141.2148929-3-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/mm/fault.c
include/linux/gfp.h
mm/page_alloc.c