mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
0bb1fbffc6
Alexander noted that KFENCE only expects to handle faults from invalid page
table entries (i.e. translation faults), but arm64's fault handling logic will
call kfence_handle_page_fault() for other types of faults, including alignment
faults caused by unaligned atomics. This has the unfortunate property of
causing those other faults to be reported as "KFENCE: use-after-free",
which is misleading and hinders debugging.
Fix this by only forwarding unhandled translation faults to the KFENCE
code, similar to what x86 does already.
Alexander has verified that this passes all the tests in the KFENCE test
suite and avoids bogus reports on misaligned atomics.
Link: https://lore.kernel.org/all/20221102081620.1465154-1-zhongbaisong@huawei.com/
Fixes:
|
||
---|---|---|
.. | ||
cache.S | ||
context.c | ||
copypage.c | ||
dma-mapping.c | ||
extable.c | ||
fault.c | ||
flush.c | ||
hugetlbpage.c | ||
init.c | ||
ioremap.c | ||
kasan_init.c | ||
Makefile | ||
mmap.c | ||
mmu.c | ||
mteswap.c | ||
pageattr.c | ||
pgd.c | ||
physaddr.c | ||
proc.S | ||
ptdump_debugfs.c | ||
ptdump.c | ||
trans_pgd-asm.S | ||
trans_pgd.c |