public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>,
	libc-alpha <libc-alpha@sourceware.org>,
	 "H. J. Lu" <hjl.tools@gmail.com>, X86 ML <x86@kernel.org>,
	 LKML <linux-kernel@vger.kernel.org>,
	"Bae, Chang Seok" <chang.seok.bae@intel.com>,
	 Florian Weimer <fweimer@redhat.com>,
	"Carlos O'Donell" <carlos@redhat.com>,
	Rich Felker <dalias@libc.org>
Subject: Re: Why does glibc use AVX-512?
Date: Fri, 26 Mar 2021 11:17:16 -0700	[thread overview]
Message-ID: <CALCETrWtvfADJsyp0pXCS+aq5WrewCXEFuMQGPhM5dnNFYWejQ@mail.gmail.com> (raw)
In-Reply-To: <20210326100620.GA25229@zn.tnic>

On Fri, Mar 26, 2021 at 3:08 AM Borislav Petkov <bp@alien8.de> wrote:
>
> On Thu, Mar 25, 2021 at 09:38:24PM -0700, Andy Lutomirski wrote:
> > I think we should seriously consider solutions in which, for new
> > tasks, XCR0 has new giant features (e.g. AMX) and possibly even
> > AVX-512 cleared, and programs need to explicitly request enablement.
>
> I totally agree with making this depend on an explicit user request,
> but...
>
> > This would allow programs to opt into not saving/restoring across
> > signals or to save/restore in buffers supplied when the feature is
> > enabled.  This has all kinds of pros and cons, and I'm not sure it's a
> > great idea.  But, in the absence of some change to the ABI, the
> > default outcome is that, on AMX-enabled kernels on AMX-enabled
> > hardware, the signal frame will be more than 8kB, and this will affect
> > *every* signal regardless of whether AMX is in use.
>
> ... what's stopping the library from issuing that new ABI call before it
> starts the app and get <insert fat feature here> automatically enabled
> for everything by default?
>
> And then we'll get the lazy FPU thing all over again.

At the end of the day, it's not the kernel's job to make userspace be
sane or to make users or programmers make the right decisions.  But it
is our job to make sure that it's even possible to make the system
work well, and we are responsible for making sure that old binaries
continue to work, preferably well, on new kernels and new hardware.

  reply	other threads:[~2021-03-26 18:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  4:38 Andy Lutomirski
2021-03-26 10:06 ` Borislav Petkov
2021-03-26 18:17   ` Andy Lutomirski [this message]
2021-03-26 12:12 ` Florian Weimer
2021-03-26 18:14   ` Andy Lutomirski
2021-03-26 19:34     ` Florian Weimer
2021-03-26 19:47       ` Andy Lutomirski
2021-03-26 20:06         ` Andrew Cooper
2021-03-26 20:35         ` Florian Weimer
2021-03-26 20:43           ` H.J. Lu
2021-03-26 20:48           ` Andy Lutomirski
2021-03-26 21:11             ` Florian Weimer
2021-03-26 21:21               ` Andy Lutomirski
2021-03-26 13:32 ` David Laight

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=CALCETrWtvfADJsyp0pXCS+aq5WrewCXEFuMQGPhM5dnNFYWejQ@mail.gmail.com \
    --to=luto@kernel.org \
    --cc=bp@alien8.de \
    --cc=carlos@redhat.com \
    --cc=chang.seok.bae@intel.com \
    --cc=dalias@libc.org \
    --cc=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.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).