[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] xen/common: Add NUMA node id bounds check to page_alloc.c/node_to_scrub


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 26 Sep 2023 00:06:36 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1CvPs8vClVwnyo1YF7qGgDOLlYOvNqERXAgAVll3sxI=; b=cFT5vT3IMN6mzXSZZhvlSk7VT7yfpilqrUQsZ8b1Xehm1Qzw1W/x3V+Nb8Uhxq+xt4R3+wwsrX3gHpPaZvof/v3ivPo6cqxxYA4YUBRJEQxnP9FslFNN5PbrsA5McLoDBYsKWINqeDw3ny/lThmCLxeUEgscwu7RSzlErcz9ja9ZMbNXzdgBqEuISusgW3eZSfuL8TPyhJO8aB0pSQuwjqhKYWdzdrOWb/HmRX4hcmXo88qVUXeVmo6kpY+/ZV21bIpa20smv1WexZUiqXmT6vEVvoVhE9hf+F9uzqYxnSyv/wRSUHCRurRihoN+6LkwDF4zSe/r9ye/R5JjQBHPGA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LUBezNCUR4mc8nrRsx+vfAVDG3JC3nh0cWYtyu4f9eE0NvMUZbdv1mL3lCtuohV+WpDW7iLeeI1rnpoLrWNQfag9ImPSSTVnVAXnm6g2X8HNVpS/x/bDV4snEYww9mMgH7anFmXpM851E0UlnB7WfVoBqKgjkljuxWqLIQGJMlRL4rErKWOkYYAfmpoSKf3k6PLYusmsqMmf5GhE6YNtZJwHDPbUy0BUVsCp+Z3AAcVU+msJO4ZzO/SQ/GKYxsucYRzGWcOv8nyGMi9lvA9Cikz0efv4CvDzzwrSegtwk656TqVS6pTivO9fFQ9IqgEWEpYhiN8M1o2xv7xKW+bQYg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 26 Sep 2023 00:07:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZ8AGkc54vz/eFtkqxZbyiTL5NFLAsKWSAgAARLIA=
  • Thread-topic: [PATCH 3/3] xen/common: Add NUMA node id bounds check to page_alloc.c/node_to_scrub

Hi Stefano,

> On Sep 26, 2023, at 07:04, Stefano Stabellini <sstabellini@xxxxxxxxxx> 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 <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> 
> Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

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
>> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.