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

Re: [PATCH 8/9] xen/arm: Allow the user to build Xen with USBAN


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 28 Jun 2023 22:16:06 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=YL+8vO1fPuHLtr+haOPeUDb5vAQltYsrQHcAvuNg/aE=; b=VU9MswOXK3EY/0cSLlMAXlmtPMGTmJONquMn/Nt6JVTVJGsZCDZP/L8jEYw+Upl5CcTfjZ1zD2V8tKdgfmB1p76gdfvBBEzHuPT+0BAd6VPgzdcY39FQveVAdIZoKtS8kuVUn50zShTMEnqx70KoNDVCc1reFbKxZfWqY75k/adyfrsXNpNtTqt/9dWmn1JpHLBLg0UGtDqJeIHr93NQNsrSxYV6W4Jr0dF/5meazDlYs6Fc9LhyuRgbyXatXDYAkCVVjHuOegP2yUeBLV/Y0LC7ADGZS4uXOVLfPyaRPnprczuwFEn3gDkpUcEzmGS+n0N1a7TJhFzWoG4/TUi0Tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GTzfgDISrDMYgDyR3972AqI0U5HCchRly27fn1syYQN41ITAcdwVsFS7SbyPJgRqdoYSEZvme6Ui6iTdeCo5Of+Iagm6A8arYrnJfk+VN7midsiaCq6zqz4jXKIU+r8EWEj0P0D18DTBuJslCR0KgAegEeWAoiuRlWza26C7LcWq3Aa59IMg2XDtukdayYrwJXXYMg2tF0mlzqTyEMTtczWumojgSmXP06nmrT1WbNavXxAQxzzVreS2io1bBSGoNeAq8ELYTsCRvIPwDHNeRYup3DdNnWvTv2ycB4Nsi33cJz3qURHXuteSk5qQZyK7nH1BytPjWQsG053L5p4lqA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 28 Jun 2023 22:16:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZqCVKqSS9NESvYkiMqVhGapxYkq+dCvMAgAFCKgCAAmPbgIAAGvUA
  • Thread-topic: [PATCH 8/9] xen/arm: Allow the user to build Xen with USBAN


> On 28 Jun 2023, at 21:39, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 27/06/2023 09:09, Michal Orzel wrote:
>> Hi Julien,
>> On 26/06/2023 14:56, Julien Grall wrote:
>>> 
>>> 
>>> Hi,
>>> 
>>> On 26/06/2023 12:56, Michal Orzel wrote:
>>>> 
>>>> 
>>>> On 25/06/2023 22:49, Julien Grall wrote:
>>>>> 
>>>>> 
>>>>> From: Julien Grall <jgrall@xxxxxxxxxx>
>>>>> 
>>>>> UBSAN has been enabled a few years ago on x86 but was never
>>>>> enabled on Arm because the final binary is bigger than 2MB (
>>>>> the maximum we can currently handled).
>>>>> 
>>>>> With the recent rework, it is now possible to grow Xen over 2MB.
>>>>> So there is no more roadblock to enable Xen other than increasing
>>>>> the reserved area.
>>>>> 
>>>>> On my setup, for arm32, the final binaray was very close to 4MB.
>>>>> Furthermore, one may want to enable USBAN and GCOV which would put
>>>>> the binary well-over 4MB (both features require for some space).
>>>>> Therefore, increase the size to 8MB which should us some margin.
>>>>> 
>>>>> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
>>>>> 
>>>>> ----
>>>>> 
>>>>> The drawback with this approach is that we are adding 6 new
>>>>> page-table (3 for boot and 3 for runtime) that are statically
>>>>> allocated. So the final Xen binary will be 24KB bigger when
>>>>> neither UBSAN nor GCOV.
>>>>> 
>>>>> If this is not considered acceptable, then we could make the
>>>>> size of configurable in the Kconfig and decide it based on the
>>>>> features enabled.
>>>> Both of these features are enabled only in a debug build of Xen, so
>>>> another option would be to increase Xen size only for a debug build.
>>> 
>>> At least UBSAN can be selected without DEBUG. For that you need to add
>>> EXPERT.
>>> 
>>> Anyway, from your comment, it is not clear to me whether you dislike the
>>> existing approach (and why) or you are OK with the increase.
>> Sorry, I was traveling and did not have time to complete review.
>> I cannot see why increasing the size would be problematic so it is ok. That 
>> said, it could be
>> a good idea to write some comment above XEN_VIRT_SIZE, that this value is 
>> somewhat exaggerated,
>> so that we are on the safe side at the time of activating features like 
>> UBSAN/GCOV.
> 
> Sure. I will add a comment in this patch. For ...
> 
>> Also, it would be nice to update comments in head.S of both arm32 and arm64 
>> above
>> GLOBAL(start) that were left stating:
>> "All of text+data+bss must fit in 2MB, or the initial pagetable code below 
>> will need adjustment."
> 
> ... this one, I am thinking to drop the comments in patch #5. They don't make 
> sense anymore as we can now in theory deal with Xen up to the size of a L2 
> mapping (1GB for 4KB).
> 
>> Other than that:
>> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> 
> Thanks.
> 
> Cheers,
> 
> -- 
> Julien Grall

Hi Julien,

Don’t know if it was pointed out before, but the commit message has a typo 
s/USBAN/UBSAN/

Cheers,
Luca



 


Rackspace

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