public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Nix <nix@esperi.org.uk>
To: "Andreas K. Hüttel via Libc-alpha" <libc-alpha@sourceware.org>
Cc: "Florian Weimer" <fweimer@redhat.com>,
	"Andreas K. Hüttel" <dilfridge@gentoo.org>,
	"Joseph Myers" <joseph@codesourcery.com>
Subject: Re: [PATCH v2] x86: Require full ISA support for x86-64 level marker [BZ #27318]
Date: Mon, 08 Feb 2021 13:35:29 +0000	[thread overview]
Message-ID: <87zh0e3cny.fsf@esperi.org.uk> (raw)
In-Reply-To: <6586609.jJDZkT8p0M@farino> ("Andreas K. =?utf-8?Q?H=C3=BCtte?= =?utf-8?Q?l?= via Libc-alpha"'s message of "Fri, 05 Feb 2021 00:55:34 +0200")

On 4 Feb 2021, Andreas K. Hüttel via Libc-alpha outgrape:
> Also, is Sandy Bridge the only case where this happens?

Definitely not. Thank goodness I spotted this thread: I just nearly
wrecked my (32-bit) AMD Geode firewall (built with -march=geode)
installing 2.33, because it is showing up with this totally wrong
ABI-needed stamp:

Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x0000000c	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 ISA needed: x86-64-v2

merely because it is built on a Broadwell CPU (Geodes are a bit too slow
to build glibc these days, and also this Geode has no compiler
installed). (My GCC is GCC 10.2 built with -march=native, but obviously
the -march=geode used at glibc compilation time usually overrides this
perfectly well and glibc works fine.)

It seems to me that this brings back the same problem we used to have
with the --enable-kernel option, where specifying a minimum kernel
version that was too high would lead to all binaries failing to execute,
only worse: if you *do* upgrade and not keep the old shared libraries
around to sln to (and don't have a statically-linked busybox shell or
something to recover), you can't recover by merely starting a suitable
kernel: you have to *physically upgrade the processor*, which is
probably impossible. (Or boot off an emergency rescue disk or something,
and recover from there). This despite the fact that a 32-bit x86 glibc
is not going to be using any of the (by definition x86-64-specific)
facilities that the ISA level is checking for, so it's not even
preventing execution for a good reason! (We don't even use SSE math on
x86-32, do we?)

Worse yet, because this is looking at the CPU ID, tests in a compilation
container are going to pass: even tests in a virtual machine will
probably pass, only to fail disastrously as soon as you install on the
real hardware.

  parent reply	other threads:[~2021-02-08 13:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 21:51 [PATCH] " H.J. Lu
2021-02-02 23:11 ` Joseph Myers
2021-02-02 23:16   ` H.J. Lu
2021-02-03 14:14     ` Joseph Myers
2021-02-03 15:09       ` [PATCH v2] " H.J. Lu
2021-02-04 10:38         ` Florian Weimer
2021-02-04 13:22           ` H.J. Lu
2021-02-04 22:55             ` Andreas K. Hüttel
2021-02-04 23:09               ` H.J. Lu
2021-02-07 10:27                 ` Florian Weimer
2021-02-07 15:05                   ` H.J. Lu
2021-02-08 15:06                     ` Florian Weimer
2021-02-08 16:09                       ` H.J. Lu
2021-02-09  0:29                         ` [PATCH v3] x86: Disable " H.J. Lu
2021-02-22 10:40                           ` Florian Weimer
2021-02-22 12:51                             ` H.J. Lu
2021-02-22 13:51                               ` Florian Weimer
2021-03-01 16:07                                 ` Florian Weimer
2021-03-01 18:00                                   ` H.J. Lu
2021-03-01 18:06                                     ` Florian Weimer
2021-03-01 19:09                                       ` H.J. Lu
2021-03-03 13:37                                         ` [PATCH v4] x86: Set minimum " H.J. Lu
2021-03-05 19:43                                           ` Florian Weimer
2021-03-06 15:23                                             ` [PATCH v5] " H.J. Lu
2021-03-06 15:42                                               ` Florian Weimer
2021-03-06 15:58                                                 ` [2.33][PATCH] " H.J. Lu
2021-02-08 13:35               ` Nix [this message]
2021-02-03  9:29 ` [PATCH] x86: Require full ISA support for " Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zh0e3cny.fsf@esperi.org.uk \
    --to=nix@esperi.org.uk \
    --cc=dilfridge@gentoo.org \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).