]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: do not enforce strict 16 byte alignment to stack pointer
authorColin Ian King <colin.king@canonical.com>
Wed, 11 May 2016 16:56:54 +0000 (17:56 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 12 May 2016 13:20:49 +0000 (14:20 +0100)
commit3a92da10a098a09b77104e66ad3c70a865b558a9
treefd4dc45735731b36083579528999ae2ac53f230c
parent36077a3ee283c2ae23ebb04c35f5d4d2c4dfaf6d
arm64: do not enforce strict 16 byte alignment to stack pointer

copy_thread should not be enforcing 16 byte aligment and returning
-EINVAL. Other architectures trap misaligned stack access with SIGBUS
so arm64 should follow this convention, so remove the strict enforcement
check.

For example, currently clone(2) fails with -EINVAL when passing
a misaligned stack and this gives little clue to what is wrong. Instead,
it is arguable that a SIGBUS on the fist access to a misaligned stack
allows one to figure out that it is a misaligned stack issue rather
than trying to figure out why an unconventional (and undocumented)
-EINVAL is being returned.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/process.c