Re: [PATCH] xen/arm: Avoid integer overflow using MIDR_IMPLEMENTOR_MASK

2022-02-25 Thread Julien Grall
Hi, On 25/02/2022 10:59, Andrew Cooper wrote: On 25/02/2022 10:54, Julien Grall wrote: Hi Michal, On 25/02/2022 08:38, Michal Orzel wrote: 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 imp

Re: [PATCH] xen/arm: Avoid integer overflow using MIDR_IMPLEMENTOR_MASK

2022-02-25 Thread Andrew Cooper
On 25/02/2022 10:54, Julien Grall wrote: > Hi Michal, > > On 25/02/2022 08:38, Michal Orzel wrote: >> 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_

Re: [PATCH] xen/arm: Avoid integer overflow using MIDR_IMPLEMENTOR_MASK

2022-02-25 Thread Julien Grall
Hi Michal, On 25/02/2022 08:38, Michal Orzel wrote: 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 macr

[PATCH] xen/arm: Avoid integer overflow using MIDR_IMPLEMENTOR_MASK

2022-02-25 Thread Michal Orzel
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 --- xen/arch/arm/incl