"Zack Weinberg" 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