summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2026-09-22 11:59:58 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2026-10-06 17:02:48 +0100
commit1cd024f3f6ae5a349f06c51161e80101c8329610 (patch)
tree25f0a51bceb50268be7c3d5847c2152d6f6bbf9a /tools/perf/scripts/python/flamegraph.py
parenta3fcb14f5673f8127fbb40ce430bb9d1ff61db35 (diff)
kselftest/arm64/mte: Introduce MTE safe memory accessors
The MTE selftests assume that they can skip (expected) MTE faults by advancing the PC by 4 in mte_default_handler(), but this is not generally safe, as the faults are triggered from arbitrary library functions (e.g. memset() and memcpy()). For instance, memset() could be implemented as simple as: mov x3, x0 // copy pointer add x4, x0, x2 // calculate end loop: strb w1, [x3], #1 // faulting access cmp x3, x4 b.ne loop ret which leads to an infinite loop since X3 could not be updated. Or, it could be having advanced implementation (FEAT_MOPS): mov x3, x0 // copy pointer setp [x3]!, x2!, x1 // prologue setm [x3]!, x2!, x1 // main sete [x3]!, x2!, x1 // epilogue ret with faulting access at prologue advancing PC to main could lead to infinite loop due to main could be triggering unaligned access fault which kernel fixing up by advancing PC back to prologue. Instead of relying on arbitrary implementations of library functions introduce helpers to perform the faulting accesses, where those faults can safely be handled. Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions