ed0a6d1d97
__kasan_unpoison_pages() colours the memory with a random tag and stores it in page->flags in order to re-create the tagged pointer via page_to_virt() later. When the tag from the page->flags is read, ensure that the in-memory tags are already visible by re-ordering the page_kasan_tag_set() after kasan_unpoison(). The former already has barriers in place through try_cmpxchg(). On the reader side, the order is ensured by the address dependency between page->flags and the memory access. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com> Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com> Link: https://lore.kernel.org/r/20220610152141.2148929-2-catalin.marinas@arm.com Signed-off-by: Will Deacon <will@kernel.org> |
||
---|---|---|
.. | ||
Makefile | ||
common.c | ||
generic.c | ||
hw_tags.c | ||
init.c | ||
kasan.h | ||
quarantine.c | ||
report.c | ||
report_generic.c | ||
report_hw_tags.c | ||
report_sw_tags.c | ||
report_tags.c | ||
shadow.c | ||
sw_tags.c | ||
tags.c |