linux/arch/arm
Steven Rostedt (Google) 4ed308c445 ftrace: Have architectures opt-in for mcount build time sorting
First S390 complained that the sorting of the mcount sections at build
time caused the kernel to crash on their architecture. Now PowerPC is
complaining about it too. And also ARM64 appears to be having issues.

It may be necessary to also update the relocation table for the values
in the mcount table. Not only do we have to sort the table, but also
update the relocations that may be applied to the items in the table.

If the system is not relocatable, then it is fine to sort, but if it is,
some architectures may have issues (although x86 does not as it shifts all
addresses the same).

Add a HAVE_BUILDTIME_MCOUNT_SORT that an architecture can set to say it is
safe to do the sorting at build time.

Also update the config to compile in build time sorting in the sorttable
code in scripts/ to depend on CONFIG_BUILDTIME_MCOUNT_SORT.

Link: https://lore.kernel.org/all/944D10DA-8200-4BA9-8D0A-3BED9AA99F82@linux.ibm.com/
Link: https://lkml.kernel.org/r/20220127153821.3bc1ac6e@gandalf.local.home

Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Yinan Liu <yinan@linux.alibaba.com>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com> [arm64]
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Fixes: 72b3942a17 ("scripts: ftrace - move the sort-processing in ftrace_init")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-27 19:15:44 -05:00
..
boot Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
common
configs mm: remove cleancache 2022-01-22 08:33:38 +02:00
crypto lib/crypto: blake2s: include as built-in 2022-01-07 00:25:25 +01:00
include bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
kernel proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: Add of_node_put() before goto 2021-12-08 14:01:16 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-digicolor
mach-dove arm: ioremap: Replace pci_ioremap_io() usage by pci_remap_iospace() 2021-12-07 17:36:16 +00:00
mach-ep93xx
mach-exynos ARM: samsung: Remove HAVE_S3C2410_I2C and use direct dependencies 2021-11-21 17:46:18 +01:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx: remove dead left-over from i.MX{27,31,35} removal 2021-11-21 16:38:41 +08:00
mach-integrator
mach-iop32x arm: ioremap: Replace pci_ioremap_io() usage by pci_remap_iospace() 2021-12-07 17:36:16 +00:00
mach-ixp4xx ARM: ixp4xx: remove dead configs CPU_IXP43X and CPU_IXP46X 2021-12-06 02:18:25 +01:00
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mstar
mach-mv78xx0 arm: ioremap: Replace pci_ioremap_io() usage by pci_remap_iospace() 2021-12-07 17:36:16 +00:00
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1
mach-omap2
mach-orion5x arm: ioremap: Replace pci_ioremap_io() usage by pci_remap_iospace() 2021-12-07 17:36:16 +00:00
mach-oxnas
mach-pxa spi: pxa2xx: Get rid of unused ->cs_control() 2021-11-29 12:19:59 +00:00
mach-qcom
mach-rda
mach-realtek
mach-realview
mach-rockchip ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up 2021-11-21 18:24:31 +01:00
mach-rpc
mach-s3c ARM: samsung: Remove HAVE_S3C2410_I2C and use direct dependencies 2021-11-21 17:46:18 +01:00
mach-s5pv210 ARM: samsung: Remove HAVE_S3C2410_I2C and use direct dependencies 2021-11-21 17:46:18 +01:00
mach-sa1100
mach-shmobile ARM: shmobile: rcar-gen2: Add missing of_node_put() 2021-11-15 09:58:53 +01:00
mach-socfpga ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE 2021-11-18 16:19:40 -06:00
mach-spear
mach-sti
mach-stm32
mach-sunxi
mach-tegra
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zynq
mm kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases() 2022-01-22 08:33:36 +02:00
net bpf, docs: Prune all references to "internal BPF" 2021-11-30 10:52:11 -08:00
nwfpe
plat-omap
plat-orion
plat-pxa
plat-versatile
probes
tools mm/mempolicy: wire up syscall set_mempolicy_home_node 2022-01-15 16:30:30 +02:00
vdso
vfp
xen arm/xen: Read extended regions from DT and init Xen resource 2022-01-06 09:53:41 +01:00
Kbuild
Kconfig ftrace: Have architectures opt-in for mcount build time sorting 2022-01-27 19:15:44 -05:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug Kbuild updates for v5.17 2022-01-19 11:15:19 +02:00
Makefile ARM fixes for 5.16-rc1: 2021-11-14 11:30:50 -08:00