src/nsexec: fix stack pointer alignment exception
authorZorro Lang <zlang@redhat.com>
Fri, 29 Sep 2017 16:49:25 +0000 (00:49 +0800)
committerEryu Guan <eguan@redhat.com>
Sun, 1 Oct 2017 11:24:21 +0000 (19:24 +0800)
commit1021cf17bced35bae60eb38338c36b33919a6c0a
treec92a59932ea0e1445c39d7cca8c39bbc87724cd6
parent8443ff29f23d909038b33c309eada5f370563769
src/nsexec: fix stack pointer alignment exception

When test g/317 or g/318 on ARM server, we got a kernel exception:

  kernel: nsexec[8203]: SP Alignment exception: pc=00000000004010a0 sp=00000000005200e8

nsexec gives an unaligned child stack address to clone() system
call sometimes. For making sure it's always aligned, use
"__attribute__((aligned))" extension of GCC (Thanks this suggestion
from Eric sandeen).

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/nsexec.c