[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86: make hypervisor build with gcc11
On 27.05.2021 10:48, Roger Pau Monné wrote: > 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> Thanks. > This is all quite ugly, but I don't have any recommendation short of > getting gcc fixed (or being able to disable those heuristics). Indeed. >> --- 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) Anyone going there will immediately find the xref to that supposed parent bug. Personally I'm not convinced of it truly being a duplicate. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |