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

Re: [PATCH] x86: make hypervisor build with gcc11


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 27 May 2021 10:48:16 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=XQqVaxQLPw9y9kMPbzlGNFefFRnsW32OmqEdEk3O22Y=; b=NGL5idLh5MgIoxz4VWJ2lxYu3D/LwHAAhRQVZL6x5XaO6d4PKeuqLUYTZnEtQu5bid5KMTC9YfCPlS1MC7vQ7SeDqus45zbMQm+NFdT73GleU8Qq6X43vT7ahjrclWOLiihGCM8YCIErSWxKPO7GVX70LpHNBhzj4oY5XOOhwSnllIjZeoSH308ui1XA6hqbegmAdwo47f5+3YOhveQIyw6Vv2jlUivpUdPV6tzfunTqa2SC3xrnehWbMLUJXMVOAwQX+wQafmu+uWddS2stOeLvjJKuLiPw29NqnfAlzqvhk+/r8w2raGAYuibbLOUlzQPjWJxqcYbfGBPBExkzrw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R9g/rvRQqWY5aFhH30Cqk1YnvprtrSho+zCLM4wO3X+ZHejp6ihiAsXDLIsGfE4d0lv2nOpMdD1AGWNC3jobj6r4/OgFfO8mhxVu/m+3e6ibG1F+4peg0Y7FOnsMB3GrNqCfs8XBaIL7X+u+e+RcCnXoDC4ANpH6tHzSSxVxRvqZ9n+cFk9+2SEWxNMExwunIaFwxPQSDZ4YOJzIcDpxZ0fzHLjbJy8yb/zEGlOKcEEg/lJWyA4PUGZBvdKDbGqGb6zuLV1dvlvlhH2+mJXuW2gUd+SOBunS8JN2581rfJMl+QprpDHE8f+PtW7nafKqNJXY/97NhECQYGon/Sh3iw==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 27 May 2021 08:48:32 +0000
  • Ironport-hdrordr: A9a23:cR+ELqwhKKPFRfSGemC2KrPw2r1zdoMgy1knxilNoHxuH/BwWf rPoB17726TtN91YhsdcL+7V5VoLUmzyXcx2/hyAV7AZniAhILLFvAA0WKK+VSJdxEWtNQtsJ uIG5IUNDSaNykfsS+V2miF+9ZL+qj5zEir792usUuEm2tRGtBdBwQSMHfqLqVvLjM2fKbQjP Cnl7d6TzzLQwVuUu2LQkMrcsLkvNPxmJfvcXc9dmIaAFnnt0LS1FbieSLopCsjbw==
  • Ironport-sdr: 7bmBOuYlJZzYUcFZkl6m+TJ2wbMpjiHV3wGxbSmzzPEtsBeMeUhQ/eK5KEXea5yUss8LZ5zvqj o7E4dV37AqT1cC83BO7/hQLtB4HqJ6oJZERyDlZZufgISpIzGyWUgO0X46P/f6bH+mLM4oY+nR NNbEmJSCosd+yAvG66L1+SkCdI04rcPuffjKaOwgdW3rVFhfe64EKa50WEjua4WZcAGllnJCzg actelCFBHcDmE05STmuANBwuLSdHDMMGsVZQH8UcEtrYltCtkveHZELIJeKhD5HonGhDZOahER /NA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, May 19, 2021 at 05:39:50PM +0200, Jan Beulich wrote:
> Gcc 11 looks to make incorrect assumptions about valid ranges that
> pointers may be used for addressing when they are derived from e.g. a
> plain constant. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100680.
> 
> Utilize RELOC_HIDE() to work around the issue, which for x86 manifests
> in at least
> - mpparse.c:efi_check_config(),
> - tboot.c:tboot_probe(),
> - tboot.c:tboot_gen_frametable_integrity(),
> - x86_emulate.c:x86_emulate() (at -O2 only).
> The last case is particularly odd not just because it only triggers at
> higher optimization levels, but also because it only affects one of at
> least three similar constructs. Various "note" diagnostics claim the
> valid index range to be [0, 2⁶³-1].
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

This is all quite ugly, but I don't have any recommendation short of
getting gcc fixed (or being able to disable those heuristics).

> 
> --- a/tools/tests/x86_emulator/x86-emulate.c
> +++ b/tools/tests/x86_emulator/x86-emulate.c
> @@ -8,6 +8,13 @@
>  
>  #define ERR_PTR(val) NULL
>  
> +/* See gcc bug 100680, but here don't bother making this version dependent. 
> */

Might be worth also referencing 99578 which seems to be the parent
bug? (as 100680 has been closed as a duplicate)

Thanks, Roger.



 


Rackspace

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