linux/mm/kasan
Peter Collingbourne c275c5c6d5 kasan: disable freed user page poisoning with HW tags
Poisoning freed pages protects against kernel use-after-free. The
likelihood of such a bug involving kernel pages is significantly higher
than that for user pages. At the same time, poisoning freed pages can
impose a significant performance cost, which cannot always be justified
for user pages given the lower probability of finding a bug. Therefore,
disable freed user page poisoning when using HW tags. We identify
"user" pages via the flag set GFP_HIGHUSER_MOVABLE, which indicates
a strong likelihood of not being directly accessible to the kernel.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Link: https://linux-review.googlesource.com/id/I716846e2de8ef179f44e835770df7e6307be96c9
Link: https://lore.kernel.org/r/20210602235230.3928842-5-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-06-04 19:32:21 +01:00
..
common.c kasan: use separate (un)poison implementation for integrated init 2021-06-04 19:32:21 +01:00
generic.c kasan: init memory in kasan_(un)poison for HW_TAGS 2021-04-30 11:20:41 -07:00
hw_tags.c kasan: disable freed user page poisoning with HW tags 2021-06-04 19:32:21 +01:00
init.c kasan: fix incorrect arguments passing in kasan_add_zero_shadow 2021-01-24 10:34:52 -08:00
kasan.h mm: fix typos in comments 2021-05-07 00:26:35 -07:00
Makefile kasan, arm64: implement HW_TAGS runtime 2020-12-22 12:55:08 -08:00
quarantine.c mm: fix typos in comments 2021-05-07 00:26:35 -07:00
report_generic.c mm/kasan: switch from strlcpy to strscpy 2021-04-30 11:20:41 -07:00
report_hw_tags.c kasan: prefix global functions with kasan_ 2021-02-24 13:38:30 -08:00
report_sw_tags.c kasan: prefix global functions with kasan_ 2021-02-24 13:38:30 -08:00
report.c kasan, arm64: tests supports for HW_TAGS async mode 2021-04-11 10:57:45 +01:00
shadow.c mm: fix typos in comments 2021-05-07 00:26:35 -07:00
sw_tags.c kasan: init memory in kasan_(un)poison for HW_TAGS 2021-04-30 11:20:41 -07:00