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

Re: [XEN PATCH v3] xen/mm: address violations of MISRA C:2012 Rules 8.2 and 8.3


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 20 Oct 2023 08:35:48 +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=g6f2tYvHry2L4w9vq3Qucgn66j8enyLW3TNbGkOpySc=; b=ElcgNg7zhiv0CBJU+lRyW1M5tJo0L3Uqv+u4OxMtWptcf4/WIGWU3+/vC2JuqomfL3hezuEN9IZ3IcDZo17BVHefSAAe+2JM/Hxb39EQ4hHtHfFnAmeQgH9ioso3PY1wrFClfATnGehjnqySSWkMwPD2Qo1ZE3AkC5FgvdGztDFY6xuW6ECZk3Bgf55f8LcMoN4TFkGfreqHPTGw12BjgabWylrpxpWflUsJbQ/YxjWGdwE/IzBR/iapGstcgxJI20/JJ0u7CLJUiR+DCwn94cR6LHVnQ7DG/GV2vVGVL3gl1ekPz2OgJAiWO5kHqCW71/UrP3RpzgwVMVYtQwlpAg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RgC9vaELtMSmbLiHWBWNvSmn1UV3cGi+w8deceBSoqyJkOnQuqxW8vevEjkm0dtSZrbWVHg6YHnDlBSLAtok13QdxXv2MbVw7lvRbVo6nKIZdD/LB+IxeDlo9Twrxnsp+HvN86oRjmtPkjyTvnPIUsC2fxn/R/udwSst3FzEK2rC3x8ERZJslqCimzfXL8vBqM2P9bDZKXOudHChD1gdfv0fH3bQWWeabMvZIDdlnuFwTwsbud4wqW0wHuNmkODL/+kGYYTn4BYFLytBnqhvHaC8QsP6T0EktU/anixd8gYPhU5ob5umQ7kSej+/VahjyYdyqEK/4KQoSBOMQ98+LQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Federico Serafini <federico.serafini@xxxxxxxxxxx>, consulting@xxxxxxxxxxx, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Henry Wang <henry.wang@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 20 Oct 2023 06:36:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19.10.2023 18:26, Stefano Stabellini wrote:
> On Thu, 19 Oct 2023, Jan Beulich wrote:
>> On 19.10.2023 00:43, Stefano Stabellini wrote:
>>> On Mon, 16 Oct 2023, Jan Beulich wrote:
>>>> On 03.10.2023 17:24, Federico Serafini wrote:
>>>>> --- a/xen/arch/x86/mm.c
>>>>> +++ b/xen/arch/x86/mm.c
>>>>> @@ -5901,17 +5901,17 @@ int destroy_xen_mappings(unsigned long s, 
>>>>> unsigned long e)
>>>>>   * a problem.
>>>>>   */
>>>>>  void init_or_livepatch modify_xen_mappings_lite(
>>>>> -    unsigned long s, unsigned long e, unsigned int _nf)
>>>>> +    unsigned long s, unsigned long e, unsigned int nf)
>>>>>  {
>>>>> -    unsigned long v = s, fm, nf;
>>>>> +    unsigned long v = s, fm, flags;
>>>>
>>>> While it looks correct, I consider this an unacceptably dangerous
>>>> change: What if by the time this is to be committed some new use of
>>>> the local "nf" appears, without resulting in fuzz while applying the
>>>> patch? Imo this needs doing in two steps: First nf -> flags, then
>>>> _nf -> nf.
>>>
>>> Wouldn't it be sufficient for the committer to pay special attention
>>> when committing this patch? We are in code freeze anyway, the rate of
>>> changes affecting staging is low.
>>
>> Any kind of risk excludes a patch from being a 4.18 candidate, imo.
> 
> I agree on that. I think it is best to commit it for 4.19 when the tree
> opens.
> 
> 
>> That was the case in early RCs already, and is even more so now. Paying
>> special attention is generally a possibility, yet may I remind you that
>> committing in general is intended to be a purely mechanical operation?
> 
> Sure, and I am not asking for a general process change. I am only
> suggesting that this specific concern on this patch is best solved in
> the simplest way: by a committer making sure the patch is correct on
> commit. It is meant to save time for everyone.
> 
> Jan, if you are OK with it, we could just trust you to commit it the
> right away as the earliest opportunity.

If you can get Andrew or Roger to ack this patch in its present shape,
I won't stand in the way. I'm not going to ack the change without the
indicated split.

Jan



 


Rackspace

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