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

Re: [PATCH] xen/arm: Initialise memory type for struct kernel_info


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 24 Dec 2024 09:19:32 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=IheoD8T6WcmNHBP/Bf8uWiJ8G5C3kdzfrXuT7wmxoJw=; b=T74uB5NzefsxTZOtO/fycWvIdpVLzFnAJ5CffQGsK0mzFEZ0d2XyQNZLsksSwXG6/8kUQoV9G8irqEA9nJ/PSzYfVLrfYE/eoCs11ktol+TiWTJ/wCbHEpCF0iI/En1kmbobChGRifkdIjfpN+PaB5opXfmctaY0kReA+Z+KM+QWnt/TlToPP70jl0QSDw11l2l8oNgzZrpYQGzob6we2HTClBQlcA11rHEF0jDNUAD/LQAPMhOcVWhqNLay1FGlykxQCmkBU5DkiCGaHykRMrTbzrjHt2tSwuXZ2ouwZfn0IfMnukbDCIBlQRHP8KU6vkg5BbGKxZ7vEdINV+V32g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YsV+dursBR1/SezNDHnvcNzxmil0ZYBWodzakA1FuoxzV89UHphpmyx7UjMt8Xk/b8Mw6Ofvu7KtCbX5I69q0FmjNMlF55+eSIrSugpxUjMIF2rXxnlQCF6dl2ELUxCoTnq41ZjJk8tLuAHUQY3uqmC4HRPM1ma3BETimvRxzooIGqx6L+30To25LGERULEMaxn3OYCoBGZe4TmUVJF3lcYjlykOKeyqyzSHx2vOkrz3xjCGNxu3/bb14A/T30kte2Dcdc86GudLQ8mfJJVfVD0xEQRZ0g7ESAbtfF56VVaxjVeJIptf//cXTU9zO1sbyuIMOf+Pj3e1BtKhFlREQQ==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 24 Dec 2024 08:20:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 23/12/2024 11:52, Luca Fancellu wrote:
> 
> 
> Hi Julien and Michal,
> 
>> On 23 Dec 2024, at 10:45, Julien Grall <julien@xxxxxxx> wrote:
>>
>> Hi,
>>
>> On 23/12/2024 10:42, Michal Orzel wrote:
>>> On 23/12/2024 11:06, Julien Grall wrote:
>>>>
>>>>
>>>> Hi Michal,
>>>>
>>>> On 23/12/2024 07:58, Michal Orzel wrote:
>>>>>
>>>>>
>>>>> On 20/12/2024 16:19, Luca Fancellu wrote:
>>>>>>
>>>>>>
>>>>>> Commit a14593e3995a ("xen/device-tree: Allow region overlapping with
>>>>>> /memreserve/ ranges") introduced a type in the 'struct membanks_hdr'
>>>>>> but forgot to update the 'struct kernel_info' initialiser, while
>>>>>> it doesn't lead to failures because the field is not currently
>>>>>> used while managing kernel_info structures, it's good to have it
>>>>>> for completeness.
>>>>> The last part "good to have it" does not sound like we need a Fixes tag.
>>>>
>>>> Reading the discussion, it sounds like ".type" is not always set and
>>>> this is not properly documented. This means that in the future we may
>>>> write a patch that requires to use ".type" and needs backported.
>>>>
>>>> But this would depend on this patch which was not tagged appropriately.
>>>> Therefore, I would argue it needs a fixes tag (even though this is a
>>>> latent bug) or at least a backport request.
>>> Setting explicitly a type for structures not requiring it, does not seem 
>>> beneficial for me.
>>
>> I have to disagree. If we set type everywhere, then the developer doesn't 
>> need to think whether ".type" is garbagge or not.
> 
> So, my thought was to at least initialise it on the structures that goes 
> around in the codebase,
> gnttab in find_host_extended_regions and shm_heap_banks in static-shmem.c 
> usage are less
> spreaded.
> 
> However I have no objection to always initialise them all, so that anyone 
> sending patches that
> use them, don’t need to think if the field is initialised or not.
> 
> I’m currently on leave, is it ok to wait until new year if any change is 
> required?
Hi Luca, yes, please send a new revision once you're back.

~Michal




 


Rackspace

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