]> git.hungrycats.org Git - linux/commit
arm64: errata: add module build workaround for erratum #843419
authorWill Deacon <will.deacon@arm.com>
Tue, 17 Mar 2015 12:15:02 +0000 (12:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 17:33:20 +0000 (19:33 +0200)
commitbf0cdf4bfb785129798bc42d6ee8e2558f0934da
treea067eda333905e7c279879bdee0c4ac15d81a1f6
parentae504f9787e587be8d8caa1d5ce809136def6ad6
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/Kconfig
arch/arm64/Makefile
arch/arm64/kernel/module.c