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)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 25 Oct 2013 14:59:37 +0000 (15:59 +0100)
commita1d5ebaf8ccdd100f45042ce32c591867de04ac3
tree8f47a40eabb63ca19ec96936fd808537824c0b25
parent55b89540b0d8d031f90e3d711ec0df3f797ecc61
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>
arch/arm64/kernel/kuser32.S
arch/arm64/kernel/signal32.c
arch/arm64/kernel/vdso.c