diff options
author | Will Deacon <will.deacon@arm.com> | 2015-03-17 12:15:02 +0000 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-09-30 11:00:04 +0200 |
commit | 86230818ac7bb48f7821d9c41d96a1233c4535c3 (patch) | |
tree | bc551c7406bbb570bd7416f2a051d5fb5258d0c6 /arch/arm64/Kconfig | |
parent | 3ebb37283c93282592beba3f01e46c8f8371dee8 (diff) | |
download | lwn-86230818ac7bb48f7821d9c41d96a1233c4535c3.tar.gz lwn-86230818ac7bb48f7821d9c41d96a1233c4535c3.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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch/arm64/Kconfig')
-rw-r--r-- | arch/arm64/Kconfig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index b07f9f356b87..c6ab435557b2 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -269,6 +269,22 @@ config SYSVIPC_COMPAT def_bool y depends on COMPAT && SYSVIPC +config ARM64_ERRATUM_843419 + bool "Cortex-A53: 843419: A load or store might access an incorrect address" + depends on MODULES + default y + help + This option builds kernel modules using the large memory model in + order to avoid the use of the ADRP instruction, which can cause + a subsequent memory access to use an incorrect address on Cortex-A53 + parts up to r0p4. + + Note that the kernel itself must be linked with a version of ld + which fixes potentially affected ADRP instructions through the + use of veneers. + + If unsure, say Y. + endmenu source "net/Kconfig" |