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

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


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 27 Sep 2023 09:03:33 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=jTQc2OKIPjsQ2o3qDMfhRALZbpLsKGyi1YWIc+IEfaM=; b=aPSX164Jaxek4icatZOi91eia4ia1GvHAyl2IvF743sdvUqAIFr/y4aO3sZabMTaDzw7rDBsdVYLqDH+FnZkmBMpE+h+R+H0oC0AsxEdAPjQKeZ5gwzA9H6YaOPUuFkR/NaNuRg+fKqsGNPTHLfSKflYHHoGxxMMP2avdVS9oXiyipBaRF3qCpTRbFV35ciYTMgsBSFJN6Yjaf1oexEuKt8sXXwR920jwTkMEYYbbu72dGY3go+L21S/M3IJa39VLlSwt0fMrhRMrUCYLoeACNS3+F3eWLIQiQSnPE7vK7QfdyHeAHj3Y7BdryfBQ+vvMCIUU2VKAoaVzavBsqLGyA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MZ0sZVI74q2DBIXXPbdxoQIdrVWgunGmq9OssZydSKY1TQjaH4alTsJGKwKic4dZXy0PQ8aaI2rVhyyKlU28QMxX34y027ac4JiuPM0DwGkVn0fercSl8vvtAZgZNjU9ckWLDo2p09Uhs8tbZ9fVud/uopar3uO8J5UkWGbdkjZAVc71oqijBXZgW8AJMRSVMDMK9cyrMMqjmA/On0ybUPfYrCoh8zxykDLnj1qIyqTDeiVCHKaHIFx8ceDGOpHkw2KciqOLvTH9GYdSznTb9BUL1S2t9wvM7QpC1waMOL94dOIg9jyWt4xZrqUrFL+GAPUP3ZaRBaUIvKtc8x84WQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 27 Sep 2023 07:04:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.09.2023 08:32, Jan Beulich wrote:
> On 27.09.2023 00:37, Shawn Anastasio wrote:
>> --- a/xen/common/page_alloc.c
>> +++ b/xen/common/page_alloc.c
>> @@ -1211,6 +1211,14 @@ static unsigned int node_to_scrub(bool get_node)
>>          } while ( !cpumask_empty(&node_to_cpumask(node)) &&
>>                    (node != local_node) );
>>
>> +        /*
>> +         * In practice `node` will always be within MAX_NUMNODES, but GCC 
>> can't
>> +         * always see that, so an explicit check is necessary to avoid 
>> tripping
>> +         * its out-of-bounds array access warning (-Warray-bounds).
>> +         */
>> +        if ( node >= MAX_NUMNODES )
>> +            break;
>> +
>>          if ( node == local_node )
>>              break;
> 
> My comment on v1 wasn't addressed, either verbally or by a code change.

I have to apologize, you did respond, and I didn't spot the response earlier
on. I'm not happy about the added code, but at least it has a comment now.
Hence I guess I simply withdraw my objection, so the change can go in.

Jan

> Imo
> that would move us a tiny step closer to what Andrew was asking for as well.
> 
> Jan
> 




 


Rackspace

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