aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/intel-pt-events.py
diff options
context:
space:
mode:
authorRussell Currey <[email protected]>2023-03-10 05:08:34 +0000
committerMichael Ellerman <[email protected]>2023-03-15 09:48:53 +0000
commitf2c7e3562b4c4f1699acc1538ebf3e75f5cced35 (patch)
tree47bd1b89309b063318d2f045f2ae3a85878021da /tools/perf/scripts/python/intel-pt-events.py
parentpowerpc/pseries: RTAS work area requires GENERIC_ALLOCATOR (diff)
downloadkernel-f2c7e3562b4c4f1699acc1538ebf3e75f5cced35.tar.gz
kernel-f2c7e3562b4c4f1699acc1538ebf3e75f5cced35.zip
powerpc/mm: Fix false detection of read faults
To support detection of read faults with Radix execute-only memory, the vma_is_accessible() check in access_error() (which checks for PROT_NONE) was replaced with a check to see if VM_READ was missing, and if so, returns true to assert the fault was caused by a bad read. This is incorrect, as it ignores that both VM_WRITE and VM_EXEC imply read on powerpc, as defined in protection_map[]. This causes mappings containing VM_WRITE or VM_EXEC without VM_READ to misreport the cause of page faults, since the MMU is still allowing reads. Correct this by restoring the original vma_is_accessible() check for PROT_NONE mappings, and adding a separate check for Radix PROT_EXEC-only mappings. Fixes: 395cac7752b9 ("powerpc/mm: Support execute-only memory on the Radix MMU") Reported-by: Michal Suchánek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Tested-by: Benjamin Gray <[email protected]> Signed-off-by: Russell Currey <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions