]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf/arm-cmn: Reject unsupported hardware configurations
authorRobin Murphy <robin.murphy@arm.com>
Tue, 3 Feb 2026 14:07:29 +0000 (14:07 +0000)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:21:22 +0000 (07:21 -0500)
commit08c7eadd8a934a1968e1aeeee8b61b853b99fb3a
tree516c28f09bdeb300ac162f5950c4e509a3d6d9e7
parent500778df9e4c313190368908ff40c23948508e97
perf/arm-cmn: Reject unsupported hardware configurations

[ Upstream commit 36c0de02575ce59dfd879eb4ef63d53a68bbf9ce ]

So far we've been fairly lax about accepting both unknown CMN models
(at least with a warning), and unknown revisions of those which we
do know, as although things do frequently change between releases,
typically enough remains the same to be somewhat useful for at least
some basic bringup checks. However, we also make assumptions of the
maximum supported sizes and numbers of things in various places, and
there's no guarantee that something new might not be bigger and lead
to nasty array overflows. Make sure we only try to run on things that
actually match our assumptions and so will not risk memory corruption.

We have at least always failed on completely unknown node types, so
update that error message for clarity and consistency too.

Cc: stable@vger.kernel.org
Fixes: 7819e05a0dce ("perf/arm-cmn: Revamp model detection")
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm-cmn.c