summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@arm.com>2026-07-02 18:05:21 +0100
committerWill Deacon <will@kernel.org>2026-07-31 13:56:58 +0000
commitfcc5eaea2d234162dfb8258372dd897bc2a1b862 (patch)
tree2c4ce3863c19e38850361706e10165bff15c8c10 /tools/perf/scripts/python/export-to-sqlite.py
parent49f2413f9b55dd975fb7d874c1fd35cf6a7335c6 (diff)
perf: arm_spe: Make wakeup range check overflow safe
The current code checks whether the wakeup point is in the current writable range by comparing it with handle->head + handle->size. The perf AUX head is a monotonically increasing index, so that addition can overflow when head is close to ULONG_MAX. In that case, a wakeup point which is still inside the free space range can be missed. Use unsigned subtraction to compare the distance from head to wakeup against the handle->size. This can dismiss the issue when addition overflow. This is unlikely to happen in practice, but the change makes the watermark check logically correct. Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension") Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions