diff options
author | Will Deacon <will.deacon@arm.com> | 2015-03-17 12:15:02 +0000 |
---|---|---|
committer | Luis Henriques <luis.henriques@canonical.com> | 2015-10-06 11:52:29 +0100 |
commit | 9ecac394a8e84e5a5440f423d349722bc8d85b47 (patch) | |
tree | 6677ea9ae0c2599562a586b825ed3aabe5d7f6a1 /arch/arm64/Makefile | |
parent | f510ff5a26b864baa6c83e1366eb9a75c0827aa0 (diff) | |
download | linux-stable-9ecac394a8e84e5a5440f423d349722bc8d85b47.tar.gz linux-stable-9ecac394a8e84e5a5440f423d349722bc8d85b47.tar.bz2 linux-stable-9ecac394a8e84e5a5440f423d349722bc8d85b47.zip |
arm64: errata: add module build workaround for erratum #843419
commit df057cc7b4fa59e9b55f07ffdb6c62bf02e99a00 upstream.
Cortex-A53 processors <= r0p4 are affected by erratum #843419 which can
lead to a memory access using an incorrect address in certain sequences
headed by an ADRP instruction.
There is a linker fix to generate veneers for ADRP instructions, but
this doesn't work for kernel modules which are built as unlinked ELF
objects.
This patch adds a new config option for the erratum which, when enabled,
builds kernel modules with the mcmodel=large flag. This uses absolute
addressing for all kernel symbols, thereby removing the use of ADRP as
a PC-relative form of addressing. The ADRP relocs are removed from the
module loader so that we fail to load any potentially affected modules.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'arch/arm64/Makefile')
-rw-r--r-- | arch/arm64/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 8185a913c5ed..be8b36304ac1 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -34,6 +34,10 @@ comma = , CHECKFLAGS += -D__aarch64__ +ifeq ($(CONFIG_ARM64_ERRATUM_843419), y) +CFLAGS_MODULE += -mcmodel=large +endif + # Default value head-y := arch/arm64/kernel/head.o |