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

Re: [PATCH 1/2] xen/dom0less: mark domain_p2m_set_allocation __init


  • To: Julien Grall <julien@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 14 May 2025 09:52:30 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • 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=xskFxAND+mKE9jnX/6RFcSqSC/GCZJP9IjwpEoUVXc0=; b=vwi+QO4j+bGWKyOq//E4ZYApxQffUsmPj7GQNMZyTeMKH2VsZvaZ077/JcqF8r4LU9UwMBDv7vbmBTraZPa8V9v0KH0A1/pQrgS9yfspanN7Y9o5kW1YzJWKGfaoh+fVvy1tlacgNQWPatVqwcpo+m1fJwUbLI73xZ2su3ZOOYcdPOmufUj2DNQuNp3CuSeKQM+bIR6nXXPUKGvUaL+Kv/DaEqy0hZmXJ9YcorB/0+817YFxIivkNCN4z/cwuIywWBKOsIFVdBgtxDydoZSRhp/j3It22is2mbfblPK/fJDp/z19tUpcKUrLRApUXuR9ChTbJXKGhW5RpYqp9Orldw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WYtQ30D6Otf0yL9iMv+AaJkJNDWZBZ4w0JGnJQBfX679o4mHf4XNcfCjSAsPGoil0jV19X1g7Fg2S39+wb+Razl/IjPmWyALThjF8ohHf2rFo/Pi/KRb3cBIp9wi6/Q2GZOoIOEhkKLw3OuGxPjssCexZBuYi5t9aOOYTLiVNaoMht63oDT0LRopMgDATIjjTbSVMZHsf31bGf+aZrFJKJwrYOKEpSJd7O2BG8vqNn1Oa2UPVm09ucfcdt0LLsZFjFtfLXRNy027J0kg+yMp0y9+e+Ec6Wb6lro+6SilkBv31oDHucVklt++f8imJ8M/bojrzdVASUv/pBYkvCePEQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Delivery-date: Wed, 14 May 2025 07:52:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 14/05/2025 09:37, Julien Grall wrote:
> Hi Michal,
> 
> On 14/05/2025 08:04, Orzel, Michal wrote:
>>
>>
>> On 14/05/2025 08:56, Jan Beulich wrote:
>>> On 14.05.2025 08:31, Orzel, Michal wrote:
>>>> On 14/05/2025 02:07, Stefano Stabellini wrote:
>>>>> On Tue, 13 May 2025, Stewart Hildebrand wrote:
>>>>>> All functions in dom0less-build.c should be __init.
>>>> Why? This patch is first in your series and by that time there is no build 
>>>> time
>>>> enforcement. Together with the Fixes tag it implies that this is somehow an
>>>> issue (i.e. build/runtime issue) other than inconsistency for which we 
>>>> surely
>>>> don't need Fixes tag.
>>>
>>> I disagree: Code not called post-init should be in .init.*. While not 
>>> formally
>>> a Misra violation (and wrongly so, I think), it imo effectively is: Such 
>>> code
>>> is otherwise unreachable post-init.
>> You have a point here, I agree. Although I don't think MISRA differentiates
>> between unreachable in general vs pre or post init. It defines it as code 
>> that
>> cannot be executed. It does not go into stages of runtime execution.
>>
>> I'm thinking how this is different from a function that is called e.g. only 
>> once
>> at specific point at runtime execution for which we did not come up with a
>> separate section?
> 
> Along with what Jan said, in general there is some relaxation for the 
> boot code. For instance, we could accept if it panic.
> 
> There is at least one of the place in domain_build.c which panic() and 
> the parsing is not meant to be fully robust. So this code either need to 
> be __init (as this was the intention from when the feature was created) 
> or you need to fully harden the code.
What is this place?

~Michal




 


Rackspace

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