public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cc: 'GNU C Library' <libc-alpha@sourceware.org>
Subject: Re: [PATCH] AArch64: Check kernel version for SVE ifuncs
Date: Mon, 18 Mar 2024 12:46:44 +0100	[thread overview]
Message-ID: <8734snu5i3.fsf@oldenburg3.str.redhat.com> (raw)
In-Reply-To: <87frwskb7t.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Thu, 14 Mar 2024 17:52:06 +0100")

* Florian Weimer:

> * Wilco Dijkstra:
>
>> Hi Florian,
>>
>>> I generally prefer we fix the component that has the bug.  With that
>>> approach, you'd have to to use your distribution contacts to request a
>>> backport.
>>
>> The issue is present since SVE was added in 4.18 so it affects many
>> kernels.  It is unlikely to be easy to backport since it relies on
>> various other changes to how syscalls and register state is dealt
>> with.
>>
>> Originally it was thought to be OK - and it would be if you only ever
>> use SVE in vectorized loops. However using a few SVE instructions
>> everywhere in applications breaks that model. Plus all the security
>> features have increased the overhead of kernel traps in recent
>> years...
>
> Yes, that might be the case.
>
> Can we hold off merging is for a bit?  I want to cross-checks a few
> things internally before we go with the version check as proposed if
> that's possible.

I would suggest to check for version >= 6.2 || version == 5.14.0.  At
this point, people running 5.14 are very likely on the el9 kernel or a
derivative, and we have backported the upstream fix into it:

  arm64/sve: Leave SVE enabled on syscall if we don't context switch 
  <https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/564deeeb8038b29b91aafe2871c06aaa299145b1>

There are no plans to backport this into the el8 kernel that I know off,
and the window for such changes is more or less closed at this point, so
a similar check for 4.18.0 is not needed.

I understand that this makes the check even uglier, but that's the
nature of version checks. 8-(

Thanks,
Florian


  reply	other threads:[~2024-03-18 11:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 14:31 Wilco Dijkstra
2024-03-13 18:12 ` Adhemerval Zanella Netto
2024-03-13 19:25   ` Szabolcs Nagy
2024-03-13 19:55     ` Adhemerval Zanella Netto
2024-03-14  8:35       ` Szabolcs Nagy
2024-03-14 13:47         ` Adhemerval Zanella Netto
2024-03-14 14:26           ` Szabolcs Nagy
2024-03-14 14:28             ` Adhemerval Zanella Netto
2024-03-14  9:02       ` Florian Weimer
2024-03-13 18:39 ` Szabolcs Nagy
2024-03-13 19:31 ` Andrew Pinski
2024-03-13 20:44   ` Wilco Dijkstra
2024-03-14  9:06 ` Florian Weimer
2024-03-14 14:42   ` Wilco Dijkstra
2024-03-14 14:55     ` Florian Weimer
2024-03-14 15:38       ` Wilco Dijkstra
2024-03-14 16:52         ` Florian Weimer
2024-03-18 11:46           ` Florian Weimer [this message]
2024-03-18 14:22             ` Wilco Dijkstra

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=8734snu5i3.fsf@oldenburg3.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=Wilco.Dijkstra@arm.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).