arm64: big-endian: don't treat code as data when copying sigret code
authorMatthew Leach <matthew.leach@arm.com>
Fri, 11 Oct 2013 13:52:14 +0000 (14:52 +0100)
committerVictor Kamensky <victor.kamensky@linaro.org>
Fri, 14 Mar 2014 01:27:51 +0000 (18:27 -0700)
commit5cf270ce3fbe6e8c493bce717418c62c00db13b3
treedbee89a475f6e68053566d759bbc1d227628aa0c
parenta443bff684c1abd8d95c7d3c634066db0ee29271
arm64: big-endian: don't treat code as data when copying sigret code

Currently the sigreturn compat code is copied to an offset in the
vectors table. When using a BE kernel this data will be stored in the
wrong endianess so when returning from a signal on a 32-bit BE system,
arbitrary code will be executed.

Instead of declaring the code inside a struct and copying that, use
the assembler's .byte directives to store the code in the correct
endianess regardless of platform endianess.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Matthew Leach <matthew.leach@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit a1d5ebaf8ccdd100f45042ce32c591867de04ac3)

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
arch/arm64/kernel/kuser32.S
arch/arm64/kernel/signal32.c
arch/arm64/kernel/vdso.c