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

Re: [PATCH 5/6] x86/cpu-policy: Disentangle X86_NR_FEAT and FEATURESET_NR_ENTRIES


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 11 May 2023 08:46:17 +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=6DP1NEdlleLZ9Cmuz6iiZkkzUin637+Fbq4aY7GaIro=; b=GISGOXU3qzbjvOpQJWPOTowE48I2VfmEXok7HWI8JlF0HhJH5EqAfE4LN2u8T8VTKzWkx5HQYm6UVxdqvC7n1hxcHr5IGmc/zebb+I5jS9bO6JBeXfc5nWFwZ03ke5+uwWFtkgrEtSAv/QT6Q2VBaahk/6XIRBsLwBr0a0McZ/ZXgxyWVc6nWgnI8aKFLUc09PkqYbaIIh8RG7drsVgKHNivEHpFmerJuc8KB5s5ErOgGYeHsQi+oeesQCP4x6cBcKKzJhOKZZmbjV6NG7Hgi3m3yzHcpwOUee6ehbhrLeQVSy0+pSGqWsGMD16saiQyhOm3EVCqPq/8ojNwPrq1xQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iHSjgonNZklH8hC0/yH5+pKLgoozss5Cv2E5wf/sjrmzCc/rCdUOQPOJpM7QPS1T2RonikoqoNwlXhm6WzuQ1KEPVIKRuDSPm72LJ5kqfO8mnvjfj2XGzu6m4ihPSqVriQJbfiiBniAk7xokvrWqouCX0EHAFety1h2Ieb4+LeGPtyAoY1/sajdrv3Wk65/64TPm1JnaPVqmu+DbllszkseHB7J88QEAQnc2Sty8rqK7mQLf2cLj79SHFzoHiIaWXrHK17uZzneQ3EogS3u6G0U9MGIBMWO14pY2sKet6CU5zrbVSRvbj5+3b1L74h2/v/1hdxgckLpYmsrFINHu3w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 11 May 2023 06:46:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.05.2023 22:13, Andrew Cooper wrote:
> On 09/05/2023 3:24 pm, Jan Beulich wrote:
>> On 09.05.2023 16:03, Andrew Cooper wrote:
>>> On 08/05/2023 8:45 am, Jan Beulich wrote:
>>>> On 04.05.2023 21:39, Andrew Cooper wrote:
>>>>> When adding new words to a featureset, there is a reasonable amount of
>>>>> boilerplate and it is preforable to split the addition into multiple 
>>>>> patches.
>>>>>
>>>>> GCC 12 spotted a real (transient) error which occurs when splitting 
>>>>> additions
>>>>> like this.  Right now, FEATURESET_NR_ENTRIES is dynamically generated 
>>>>> from the
>>>>> highest numeric XEN_CPUFEATURE() value, and can be less than what the
>>>>> FEATURESET_* constants suggest the length of a featureset bitmap ought to 
>>>>> be.
>>>>>
>>>>> This causes the policy <-> featureset converters to genuinely access
>>>>> out-of-bounds on the featureset array.
>>>>>
>>>>> Rework X86_NR_FEAT to be related to FEATURESET_* alone, allowing it
>>>>> specifically to grow larger than FEATURESET_NR_ENTRIES.
>>>>>
>>>>> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>> While, like you, I could live with the previous patch even if I don't
>>>> particularly like it, I'm not convinced of the route you take here.
>>> It's the route you tentatively agreed to in
>>> https://lore.kernel.org/xen-devel/a282c338-98ab-6c3f-314b-267a5a82bad1@xxxxxxxx/
>> Right. Yet I deliberately said "may be the best" there, as something
>> better might turn up. And getting the two numbers to always agree, as
>> suggested, might end up being better.
> 
> Then don't write "yes" if what you actually mean is "I'd prefer a
> different option if possible", which is a "no".
> 
> I cannot read your mind, and we both know I do not have time to waste on
> this task.
> 
> And now I have to go and spend yet more time doing it differently.

I'm sorry for that. Yet please also allow for me to re-consider an earlier
voiced view, once I see things in more detail.

Jan



 


Rackspace

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