[PATCH] powerpc: Add missing registers to clobbers list for syscalls [BZ #27623]
Matheus Castanho
msc@linux.ibm.com
Mon Mar 29 13:27:08 GMT 2021
Andreas Schwab <schwab@linux-m68k.org> writes:
> On Mär 22 2021, Matheus Castanho via Libc-alpha wrote:
>
>> Some registers that can be clobbered by the kernel during a syscall are not
>> listed on the clobbers list in sysdeps/unix/sysv/linux/powerpc/sysdep.h.
>>
>> For syscalls using sc:
>> - XER is zeroed by the kernel on exit
>>
>> For syscalls using scv:
>> - XER is zeroed by the kernel on exit
>> - Different from the sc case, most CR fields can be clobbered (according to
>> the ELF ABI and the Linux kernel's syscall ABI for powerpc
>> (linux/Documentation/powerpc/syscall64-abi.rst)
>>
>> These are likely not causing issues today, but they should be added to the
>> clobbers list just in case things change on the kernel side in the future.
>
> What about INTERNAL_VSYSCALL_CALL_TYPE? Doesn't that clobber XER[CA]
> and CR1/5/6/7 like ordinary function calls?
>
> Andreas.
Yes, looks like they should be added to the clobbers list there too. I'll send
a v2 shortly.
--
Matheus Castanho
More information about the Libc-alpha
mailing list