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

Re: xen (multiboot) binary gets corrupted ELF notes


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Feb 2023 13:53:21 +0100
  • 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=ZRQYmSh87Vw1h0q4Ice6jdtJ4Wzz8tkJkUXxp6vtqcQ=; b=h5ztjPg0+bYTj+pOToTA1wReaelII+dllmkCXbDe4Z3mMDAbU2Qjt9jlEpgxUU82UhoJyQOFFDRX3qHyGqgYHhnjyemKx8K97FxlVvFcWwsbTFiL7kg66/LsyLqPJFywJ5I7MWGRVjKcea76O3B296fJJN7BLvu822wEtd7MJ8jwW13i9uj20XbPo6tVQqwSaFHpPuzRgg7UhDvgGRNwUWSBUpsOPHSJmFPA3kvr5apMx26yPCJVDBFBngCkn4qwOXIFoQ6Fz7YiVdcEcXlAUQnIKxBzOOZ8MgDh4XoE39+8pkcIQ90CZARJ/PMzNpJ4z50rtD65Km7mFly8HnMbJw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f0QgDoc/w891Cq03qRPvBg2l/GSWrsSGUKXFcIsXP0lzPPOiGTHq0JOo0I7wYEBV7HPGXW90dEved3sI7+QUOadLJ7fyhNFQ+5xg4pL6FzmCeS7gu9YwSkUwMo0vACG/GuU7W2tphQxy5t49d+hKHsYGRU4CKg+GwyBtmTb1OojFXzy+tgIQgQeX82QJyBRvJUaikroYX0ouWIHDqJXJ+fMOPk6vxk+pTdZMwXOqaLjvrBfizJGRq6GTbUm8DbozeH6jIa5Moiuq4rI6qb8659WGaYCPc6JKfj55PKSMocPw3CacUuNoAojPxSUYLzgpkutQbA5u/GVo1Ty4FsVdIg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Mon, 13 Feb 2023 12:53:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.02.2023 12:14, Marek Marczykowski-Górecki wrote:
> Hi,
> 
> I'm getting some ELF note issues on multiboot binary
> specifically:
> xen/xen: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically 
> linked, BuildID[sha1]=f7d2c37a4ad599b268f2f2d94bff3776d12649b3, bad note 
> description size 0xc0010001, stripped
> 
> readelf additionally says:
> 
>     Displaying notes found in: .note
>       Owner                Data size  Description
>       GNU                  0x00000014 NT_GNU_BUILD_ID (unique build ID 
> bitstring)
>         Build ID: c5825a0d08edc4d11b1138fedca6b14ce8ba7302
>       (NONE)               0x00000004 Unknown note type: (0x00000020)
>        description data: 05 00 00 00 
>     readelf: xen/xen: Warning: note with invalid namesz and/or descsz found 
> at offset 0x34
>     readelf: xen/xen: Warning:  type: 0x4, namesize: 0x00554e47, descsize: 
> 0xc0010001, alignment: 4
> 
> Grub doesn't care, but launching such xen with kexec doesn't work.
> 
> Initially found when booting Xen via Heads: 
> https://openqa.qubes-os.org/tests/60151#step/install_startup/11
> 
> Andy says:
>> yeah, I've seen the same on XTF
>> binutil's recent elf notes for CET compatibility use an unsigned long
>> so they're not compatible when we build as 64bit and then re-package as 32
>> I think we need to strip all elf notes in mkelf32

Instead of complicating mkelf32 (we want to retain at least the build-id
note, after all, and for PVH_GUEST builds also .note.Xen) why don't we
discard the unwanted/unneeded notes then from the linker script, just
like we already do for xen.efi?

Jan



 


Rackspace

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