summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarl Mehltretter <kmehltretter@gmail.com>2026-09-21 21:36:28 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2026-10-14 17:19:53 +0100
commit41a3f4bc3e4ae4722fd24743bf3f286cea14e3dc (patch)
treee14cb34840fde2dc62743731033222ee2f733e6a /scripts
parent74f79365839720bdb0c6bb4fe85c5b2a929ff5d1 (diff)
ARM: 9520/1: cacheinfo: avoid out-of-bounds write in populate_cache_leaves()
populate_cache_leaves() advances its bounds-checking index once per cache level, but split instruction/data caches consume two entries. CLIDR-based allocation supplies enough entries. Early allocation from the device tree can supply fewer and expose an out-of-bounds write. Count each written leaf and stop before a split level that does not fit. This prepares ARM for DT-based early allocation and matches commit 875d742cf532 ("arm64: cacheinfo: Avoid out-of-bounds write to cacheinfo array"). Assisted-by: LLM Fixes: a9ff94477836 ("ARM: 9433/2: implement cacheinfo support") Cc: stable@vger.kernel.org Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://lore.kernel.org/r/20260912195552.76673-2-kmehltretter@gmail.com/ Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions