[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>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 27 Jun 2023 10:09:32 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org 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
  • 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=R88fq9ogQ2owywQM64SA3x6PE4QsQk17DhiGpWWPvKQ=; b=KoqMLRec6F7QxR6cBIXMPdfk8MaqjE2NjSeQxc0u4Kz3MWF+jFaj0xRS+4d9QkKulPwZskgPNnQ20JaD4M1imo1g5Bkzqdx7n6mw0SQ2ZqoMH3ncLcNHDNg3NIz+RHm/jHSyG4OUpwY+SXHZuM+x4y8iZmOgES9kpkms2oqNM7Km2Y/C9ZLlk5/opJDYFB6x1yv4Tzhn8X8KaAp87dGqGM3OLQawv8G13xhr7k4nuT2V8j8Qye5fJzbe8+Yh04dbF+L0H4+bwp4ozIHd9MtyoBGfsZbBBLewgCfHIu7AccZRMwFg8d1Xr5VvSWfSx4tTyVkuLZtGo0sLTXjseSM8sA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DiUBxaGa++6XPm//dBkqg0PSp+Qhh2rtXAklfpGV9bCEcVx3WI348WVtuXFmzX7+oJ19QnQ8Ls1P7Bm1ymrzh64OQ46/pgeGm7uZZZbdCoMmV7f0W+9ktDLdO1AeMrNN452Iicm+oTFIIrj9RcVRPA6X66VtKj43hC8LB38ojji44TvmKJBWy8r+c9JJ3qX1c4/Yzh1ahS8dqN++EBdtntS7dIEctItKAs+k0607r81Jy4WlXiguaM4q11dlhWvzjlwl5N1HmhsRP80eZQeSTOGFz5uSFl18mVVJwcm3plyDuE1+k59yrzxoSN6tnX9zEUAN55Kk87OiJG383mPiAw==
  • Cc: <Luca.Fancellu@xxxxxxx>, <Henry.Wang@xxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 27 Jun 2023 08:10:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

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."

Other than that:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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