[PATCH v1 1/1] riscv: Add RVV memset via multiarch/IFUNC

Peter Bergner bergner@tenstorrent.com
Fri Nov 7 06:11:08 GMT 2025


On 11/6/25 8:48 PM, Jeff Law wrote:
> IMHO that's probably the *only* way this can work reliably due to the 
> installation of the final target into the PLT as ifuncs get resolved as 
> well as the cached bits in the vDSO.  Once an ifunc is resolved, all 
> bets are off on prctl being able to undo that resolution.

Right, once a PLT has been resolved (ifunc or normal loader resolver),
there is no mechanism to force them to get reresolved.



>> I think the only solution that makes sense here, is for the kernel to modify
>> hwprobe so that it doesn't show vector (or some other extension) when prctl
>> has disabled vector (or some other extension).  I'm actually surprised it
>> doesn't already operate that way.
> Agreed.

We'll have to get the kernel people on board for this change.  I suppose
if they balk at making a change due to not wanting to change its behavior
because they think some code is dependent on the current behavior, we could
introduce a new RISCV_HWPROBE_KEY_* hwprobe key that would tell the kernel
to give us the extensions that are actually usable by userland software and
not the full list of extensions supported by the hw (enabled and disabled)
as it does now.

Peter




More information about the Libc-alpha mailing list