Skip to content
Commit 1c9bb1a0 authored by Paul Mackerras's avatar Paul Mackerras
Browse files

[POWERPC] Fix register save area alignment for swapcontext syscall



For 32-bit processes, the getcontext side of the swapcontext system
call (i.e. the saving of the context when the first argument is
non-NULL) has to set the ctx->uc_mcontext.uc_regs pointer to the place
where it saves the registers.  Which it does, but it doesn't ensure
that the pointer is 16-byte aligned.  16-byte alignment is needed
because the Altivec/VMX registers are saved in there, and they need to
be on a 16-byte boundary.

This fixes it by ensuring the appropriate alignment of the pointer.
This issue was pointed out by Jakub Jelinek.

Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bb63ab13
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment