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

Re: [PATCH RFC] EFI: strip xen.efi when putting it on the EFI partition


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 2 May 2022 16:47:30 +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=yNSnwbDFNW80Qg18oRehe5rlgCqT1OFew7OLyEXIXBo=; b=OEQTg9Re48D1aMk2YjG1Ig4d1SfBBQ3dUeKUNPxHhyxIHEpC8KnUnkLD8nzxQYc+HyrR7v7abVz0jISKW7dUNH9CrpxR5QKIERzECf3BhMAShPFLdq19cJVbPxjC8UqUcy7SUFxpjR5W6pjJdaeA8KbEhN5VYTtYyQIyoarT7iqfVeDznlNp+lsK4+r2fjH2wCeUFEgPgFrX9+K0zCHFnHJglDDhcgYFec5Gk3q69lPluFMEOpcKgIOZ1mUQ8LWtWTQOtKRRoW1ANS0jpNFadCqdqYIKW6PMyOl4UPkkOQRMd1Vb61xFKerPIoe3H07fXEk3cvgDu1aXw71KNW5f6w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aZkcp/OgSsPF00cva184R+AspJ6LpfiRUVZvxmP0h5alXdnWuupoEf75hfoKu7ZxZTSV/E8fEFdB7xQJ7ReSntpUqvGPQmYkc7fjbA3ZXcV7gVeyWzg9ZD0bOU9Q61cFmZjF7EhbPCuaccYBBCMCwXAJB9gRQXmdHsekCq1vN/v8Jl/ndTvtMWf1CP43l6IOZ8KqTZOyTQnf78E0fqZn+wBIsubl9QOu1Sl/u/y5KCebjfgtYqNqbsIiPzQERTvEUqnVO5oNnEwTZbZTQkDWL0kzDRSU5suWdlUXWqnvSz/vzMu9+q0bWwU98SXi8Ru8UyfVh1zRvY1WL7zE7KWT0w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 02 May 2022 14:47:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.04.2022 12:46, Jan Beulich wrote:
> With debug info retained, xen.efi can be quite large. Unlike for xen.gz
> there's no intermediate step (mkelf32 there) involved which would strip
> debug info kind of as a side effect. While the installing of xen.efi on
> the EFI partition is an optional step (intended to be a courtesy to the
> developer), adjust it also for the purpose of documenting what distros
> would be expected to do during boot loader configuration (which is what
> would normally put xen.efi into the EFI partition).
> 
> Model the control over stripping after Linux'es module installation,
> except that the stripped executable is constructed in the build area
> instead of in the destination location. This is to conserve on space
> used there - EFI partitions tend to be only a few hundred Mb in size.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> RFC: GNU strip 2.38 appears to have issues when acting on a PE binary:
>      - the new file positions of the sections do not respect the file
>        alignment specified by the header (a resulting looks to work on
>        one EFI implementation where I did actually try it, but I don't
>        think we can rely on that),
>      - file name symbols are also stripped; while there is a separate
>        --keep-file-symbols option (which I would have thought to be on
>        by default anyway), its use makes no difference.

Update to these items: The first one turned out to be an issue with a
not-yet-upstream patch that I've been carrying for a long time. I've
fixed that up, and will submit that patch (perhaps together with
further ones) in due course. Apart from that the list of remarks now
is

- file name symbols are also stripped; while there is a separate
  --keep-file-symbols option (which I would have thought to be on by
  default anyway), its use so far makes no difference,
- the string table grows in size, when one would expect it to shrink,
- linker version is changed in and timestamp zapped from the header.

Locally I have draft patches for all of these issues, but this means
stripping won't work overly well until at least 2.39.

Jan




 


Rackspace

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