linux-stable/arch/arm64
Mark Rutland bd8b21d3dd arm64: module: rework special section handling
When we load a module, we have to perform some special work for a couple
of named sections. To do this, we iterate over all of the module's
sections, and perform work for each section we recognize.

To make it easier to handle the unexpected absence of a section, and to
make the section-specific logic easer to read, let's factor the section
search into a helper. Similar is already done in the core module loader,
and other architectures (and ideally we'd unify these in future).

If we expect a module to have an ftrace trampoline section, but it
doesn't have one, we'll now reject loading the module. When
ARM64_MODULE_PLTS is selected, any correctly built module should have
one (and this is assumed by arm64's ftrace PLT code) and the absence of
such a section implies something has gone wrong at build time.

Subsequent patches will make use of the new helper.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Torsten Duwe <duwe@suse.de>
Tested-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Tested-by: Torsten Duwe <duwe@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
2019-11-06 14:17:31 +00:00
..
boot ARM: dts: sunxi: Revert phy-names removal for ECHI and OHCI 2019-10-04 14:37:03 +02:00
configs arm64/ARM: configs: Change CONFIG_REMOTEPROC from m to y 2019-09-30 11:48:00 -07:00
crypto crypto: arm64/aes-neonbs - implement ciphertext stealing for XTS 2019-09-09 17:35:39 +10:00
include arm64 fixes for -rc3 2019-10-09 09:27:22 -07:00
kernel arm64: module: rework special section handling 2019-11-06 14:17:31 +00:00
kvm KVM/arm fixes for 5.4, take #1 2019-10-03 12:08:50 +02:00
lib Merge branch 'for-next/atomics' into for-next/core 2019-08-30 12:55:39 +01:00
mm arm64: mm: fix spurious fault detection 2019-10-07 11:07:16 +01:00
net arm64: bpf: optimize modulo operation 2019-09-03 15:44:40 +02:00
xen xen/efi: have a common runtime setup function 2019-10-02 10:31:07 -04:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64: Kconfig: Make CONFIG_COMPAT_VDSO a proper Kconfig option 2019-10-07 13:32:15 +01:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.platforms arm64: exynos: Enable exynos-chipid driver 2019-09-04 22:43:26 +02:00
Makefile arm64: Kconfig: Make CONFIG_COMPAT_VDSO a proper Kconfig option 2019-10-07 13:32:15 +01:00