Hi Stefano,

> On Sep 26, 2023, at 07:04, Stefano Stabellini <[email protected]> wrote:
> 
> Adding Henry as this issue is currently causing gitlab-ci failures. I
> think we should fix it as soon as possible to get clearer results for
> the 4.18 release. (This comment applies to the rest of the series as
> well).

Thanks, the CI should indeed be fixed asap.

> 
> 
> On Mon, 25 Sep 2023, Shawn Anastasio wrote:
>> When building for Power with CONFIG_DEBUG unset, a compiler error gets
>> raised inside page_alloc.c's node_to_scrub function, likely due to the
>> increased optimization level:
>> 
>> common/page_alloc.c: In function 'node_to_scrub.part.0':
>> common/page_alloc.c:1217:29: error: array subscript 1 is above array
>>            bounds of 'long unsigned int[1]' [-Werror=array-bounds]
>> 1217 |         if ( node_need_scrub[node] )
>> 
>> It appears that this is a false positive, given that in practice
>> cycle_node should never return a node ID >= MAX_NUMNODES as long as the
>> architecture's node_online_map is properly defined and initialized, so
>> this additional bounds check is only to satisfy GCC.
>> 
>> Signed-off-by: Shawn Anastasio <[email protected]>
> 
> Acked-by: Stefano Stabellini <[email protected]>

Release-acked-by: Henry Wang <[email protected]>

Kind regards,
Henry

> 
> 
>> ---
>> xen/common/page_alloc.c | 3 +++
>> 1 file changed, 3 insertions(+)
>> 
>> diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
>> index 35d9a26fa6..6df2a223e1 100644
>> --- a/xen/common/page_alloc.c
>> +++ b/xen/common/page_alloc.c
>> @@ -1211,6 +1211,9 @@ static unsigned int node_to_scrub(bool get_node)
>>         } while ( !cpumask_empty(&node_to_cpumask(node)) &&
>>                   (node != local_node) );
>> 
>> +        if ( node >= MAX_NUMNODES )
>> +            break;
>> +
>>         if ( node == local_node )
>>             break;
>> 
>> --
>> 2.30.2
>> 


Reply via email to