arm64: switch to relative exception tables
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 1 Jan 2016 14:02:12 +0000 (15:02 +0100)
committerAlex Shi <alex.shi@linaro.org>
Wed, 11 May 2016 15:18:44 +0000 (23:18 +0800)
commit525787eea48f8c6a1630e6dab07313896cfc6b8d
tree93fe58ad5a764e79843fc5b6c4436da8ee213982
parent5f1dcb6d02a6f6dd104539a19f7db8a189ba4bb8
arm64: switch to relative exception tables

Instead of using absolute addresses for both the exception location
and the fixup, use offsets relative to the exception table entry values.
Not only does this cut the size of the exception table in half, it is
also a prerequisite for KASLR, since absolute exception table entries
are subject to dynamic relocation, which is incompatible with the sorting
of the exception table that occurs at build time.

This patch also introduces the _ASM_EXTABLE preprocessor macro (which
exists on x86 as well) and its _asm_extable assembly counterpart, as
shorthands to emit exception table entries.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 6c94f27ac847ff8ef15b3da5b200574923bd6287)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/include/asm/alternative.h
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/futex.h
arch/arm64/include/asm/uaccess.h
arch/arm64/include/asm/word-at-a-time.h
arch/arm64/kernel/armv8_deprecated.c
arch/arm64/mm/extable.c
scripts/sortextable.c