[PATCH v2] riscv: Add sysctl to control discard of vstate during syscall
Florian Weimer
fweimer at redhat.com
Tue Aug 12 01:03:05 PDT 2025
* Drew Fustini:
>> I'm confused. Current glibc assumes that vector registers are preserved
>> across system calls because the assembler clobbers do not mention them.
>> Similar inline assembly probably has ended up in other projects, too.
>> It works by accident if glibc is compiled for a non-vector target, or if
>> it so happens that GCC never keeps vector registers alive across system
>> calls.
>
> I wasn't trying to make any ABI changes with this sysctl patch. The
> riscv kernel documentation states vector state is not preserved across
> syscalls. I am not trying to change that policy.
Oh, then glibc is just buggy in this area. I had no idea. If the
vector state is already clobbered, than the sysctl for experimentation
is fine.
Thanks,
Florian
More information about the linux-riscv
mailing list