]> git.baikalelectronics.ru Git - kernel.git/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)
commitb422805884f5f81ebdfa63b03efb2bcea23e4a55
tree1cee0c376af4662b3f7bf8982187e3492dff1b63
parente6d7d8129b34097a8d739472192f4d930cbcaad1
mm: kasan: Skip unpoisoning of user pages

Commit f90f1d0a9925 ("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