From: Simon Josefsson <simon@josefsson.org>
To: "Zack Weinberg" <zack@owlfolio.org>
Cc: <libc-alpha@sourceware.org>
Subject: Re: Maybe we should get rid of ifuncs
Date: Tue, 30 Apr 2024 10:42:03 +0200 [thread overview]
Message-ID: <87edanw8bo.fsf@kaka.sjd.se> (raw)
In-Reply-To: <D0RPG6348D0S.1F9SCYCGKZ3VI@owlfolio.org> (Zack Weinberg's message of "Tue, 23 Apr 2024 14:14:23 -0400")
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
"Zack Weinberg" <zack@owlfolio.org> writes:
> To figure out if this is a workable idea, questions for you all:
> (1) Are there other use cases for ifuncs that I don't know about?
> (2) Are there existing ifuncs that perform CPU-capability-based
> function selection that *could not* be replaced with an array of bit
> vectors like what I sketched in the previous paragraph?
Interesting take. I have recently looked at lib25519 and libmceliece
which uses ifuncs to select crypto primitives. While I think it may be
possible to rewrite it for something you suggest, I think libraries like
this suggests that some developer find the ifunc interface useful and
that rewriting things will require some discussion. Take this as a +0.9.
https://salsa.debian.org/debian/lib25519
https://salsa.debian.org/debian/libmceliece
Some relevant selector logic code:
https://salsa.debian.org/debian/libmceliece/-/blob/main/scripts-build/dispatch
https://salsa.debian.org/debian/libmceliece/-/blob/main/cpuid/amd64.c
/Simon
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]
prev parent reply other threads:[~2024-04-30 8:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 18:14 Zack Weinberg
2024-04-23 18:39 ` enh
2024-04-23 19:46 ` Palmer Dabbelt
2024-04-24 13:56 ` Zack Weinberg
2024-04-24 14:25 ` enh
2024-04-23 18:52 ` Sam James
2024-04-23 18:54 ` Florian Weimer
2024-04-24 13:53 ` Zack Weinberg
2024-04-23 19:26 ` Andreas Schwab
2024-04-24 13:54 ` Zack Weinberg
2024-04-24 1:41 ` Richard Henderson
2024-04-24 14:43 ` Zack Weinberg
2024-04-24 15:09 ` enh
2024-04-28 0:24 ` Peter Bergner
2024-05-02 2:59 ` Michael Meissner
2024-04-30 8:42 ` Simon Josefsson [this message]
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=87edanw8bo.fsf@kaka.sjd.se \
--to=simon@josefsson.org \
--cc=libc-alpha@sourceware.org \
--cc=zack@owlfolio.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).