diff options
| author | Andrey Konovalov <[email protected]> | 2023-01-24 21:35:26 +0100 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-02-02 22:33:29 -0800 |
| commit | 420ef683b5217338bc679c33fd9361b52f53a526 (patch) | |
| tree | d0a3990ce49fdf21c86b671c42d308d28693102b /tools/perf/scripts/python/flamegraph.py | |
| parent | 2e126aa29007353f069c3bab5c2cf52d231cd3ae (diff) | |
kasan: reset page tags properly with sampling
The implementation of page_alloc poisoning sampling assumed that
tag_clear_highpage resets page tags for __GFP_ZEROTAGS allocations.
However, this is no longer the case since commit 70c248aca9e7 ("mm: kasan:
Skip unpoisoning of user pages").
This leads to kernel crashes when MTE-enabled userspace mappings are used
with Hardware Tag-Based KASAN enabled.
Reset page tags for __GFP_ZEROTAGS allocations in post_alloc_hook().
Also clarify and fix related comments.
[[email protected]: update comment]
Link: https://lkml.kernel.org/r/5dbd866714b4839069e2d8469ac45b60953db290.1674592780.git.andreyknvl@google.com
Link: https://lkml.kernel.org/r/24ea20c1b19c2b4b56cf9f5b354915f8dbccfc77.1674592496.git.andreyknvl@google.com
Fixes: 44383cef54c0 ("kasan: allow sampling page_alloc allocations for HW_TAGS")
Signed-off-by: Andrey Konovalov <[email protected]>
Reported-by: Peter Collingbourne <[email protected]>
Tested-by: Peter Collingbourne <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Marco Elver <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions