linux-stable/arch/arm64
Ard Biesheuvel 3fd00beb14 arm64/module: revert to unsigned interpretation of ABS16/32 relocations
Commit 1cf24a2cc3

  ("arm64/module: deal with ambiguity in PRELxx relocation ranges")

updated the overflow checking logic in the relocation handling code to
ensure that PREL16/32 relocations don't overflow signed quantities.

However, the same code path is used for absolute relocations, where the
interpretation is the opposite: the only current use case for absolute
relocations operating on non-native word size quantities is the CRC32
handling in the CONFIG_MODVERSIONS code, and these CRCs are unsigned
32-bit quantities, which are now being rejected by the module loader
if bit 31 happens to be set.

So let's use different ranges for quanties subject to absolute vs.
relative relocations:
- ABS16/32 relocations should be in the range [0, Uxx_MAX)
- PREL16/32 relocations should be in the range [Sxx_MIN, Sxx_MAX)
- otherwise, print an error since no other 16 or 32 bit wide data
  relocations are currently supported.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-05-28 15:15:53 +01:00
..
boot arm64: dts: sprd: Add clock properties for serial devices 2019-05-16 14:43:33 -07:00
configs ARM: SoC defconfig updates 2019-05-16 09:35:26 -07:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2019-05-06 20:15:06 -07:00
include arm64: insn: Add BUILD_BUG_ON() for invalid masks 2019-05-24 14:58:30 +01:00
kernel arm64/module: revert to unsigned interpretation of ABS16/32 relocations 2019-05-28 15:15:53 +01:00
kvm * ARM: support for SVE and Pointer Authentication in guests, PMU improvements 2019-05-17 10:33:30 -07:00
lib arm64: Makefile: Replace -pg with CC_FLAGS_FTRACE 2019-04-09 10:34:59 +01:00
mm arm64: errata: Add workaround for Cortex-A76 erratum #1463225 2019-05-23 11:38:10 +01:00
net bpf, arm64: use more scalable stadd over ldxr / stxr loop in xadd 2019-04-26 18:53:40 -07:00
xen
Kconfig arm64: Kconfig: Make ARM64_PSEUDO_NMI depend on BROKEN for now 2019-05-24 14:58:19 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-19 10:58:45 -07:00
Makefile kasan, arm64: adjust shadow size for tag-based mode 2018-12-28 12:11:43 -08:00