Skip to content
Commit 5d61fc20 authored by Matheus Castanho's avatar Matheus Castanho
Browse files

powerpc: Add missing registers to clobbers list for syscalls [BZ #27623]



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)

The same should apply to vsyscalls, which effectively execute a function call
but are not currently adding these registers as clobbers either.

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.

Reported-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarRaphael M Zinsly <rzinsly@linux.ibm.com>
parent 5ad1a81c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment