]> xenbits.xensource.com Git - xen.git/commit
xen/arm: Avoid overflow using MIDR_IMPLEMENTOR_MASK
authorMichal Orzel <michal.orzel@arm.com>
Thu, 5 May 2022 11:59:06 +0000 (13:59 +0200)
committerJulien Grall <jgrall@amazon.com>
Mon, 16 May 2022 17:20:40 +0000 (18:20 +0100)
commitaa1cba100bff84b211f27639bd6efeaf7e701bcc
tree145c0da9ab77130d3b8f9f850918b5e3e4e5897d
parent17060df97c4db79f50ec50a3eda8381a13026356
xen/arm: Avoid overflow using MIDR_IMPLEMENTOR_MASK

Value of macro MIDR_IMPLEMENTOR_MASK exceeds the range of integer
and can lead to overflow. Currently there is no issue as it is used
in an expression implicitly casted to u32 in MIDR_IS_CPU_MODEL_RANGE.
To avoid possible problems, fix the macro.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Link: https://lore.kernel.org/r/20220426070603.56031-1-michal.orzel@arm.com
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/include/asm/processor.h