linux-stable/arch/arm
Ard Biesheuvel a1c510d0ad ARM: implement support for vmap'ed stacks
Wire up the generic support for managing task stack allocations via vmalloc,
and implement the entry code that detects whether we faulted because of a
stack overrun (or future stack overrun caused by pushing the pt_regs array)

While this adds a fair amount of tricky entry asm code, it should be
noted that it only adds a TST + branch to the svc_entry path. The code
implementing the non-trivial handling of the overflow stack is emitted
out-of-line into the .text section.

Since on ARM, we rely on do_translation_fault() to keep PMD level page
table entries that cover the vmalloc region up to date, we need to
ensure that we don't hit such a stale PMD entry when accessing the
stack. So we do a dummy read from the new stack while still running from
the old one on the context switch path, and bump the vmalloc_seq counter
when PMD level entries in the vmalloc range are modified, so that the MM
switch fetches the latest version of the entries.

Note that we need to increase the per-mode stack by 1 word, to gain some
space to stash a GPR until we know it is safe to touch the stack.
However, due to the cacheline alignment of the struct, this does not
actually increase the memory footprint of the struct stack array at all.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Keith Packard <keithpac@amazon.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
2021-12-03 15:11:33 +01:00
..
boot ARM: decompressor: disable stack protector 2021-12-03 15:11:24 +01:00
common Merge branches 'devel-stable' and 'misc' into for-linus 2021-11-02 09:04:22 +00:00
configs ARM: defconfig updates for 5.16 2021-11-03 17:07:02 -07:00
crypto
include ARM: implement support for vmap'ed stacks 2021-12-03 15:11:33 +01:00
kernel ARM: implement support for vmap'ed stacks 2021-12-03 15:11:33 +01:00
lib ARM: memset: clean up unwind annotations 2021-12-03 15:11:32 +01:00
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: SoC updates for v5.16 2021-11-03 16:48:32 -07:00
mach-axxia
mach-bcm Devicetree updates for v5.16: 2021-11-02 22:22:13 -07:00
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-digicolor
mach-dove ARM: dove: mark 'putc' as inline 2021-10-05 15:40:38 +02:00
mach-ep93xx ep93xx: clock: convert in-place to COMMON_CLK 2021-10-20 17:46:36 +02:00
mach-exynos rtc: s3c: remove HAVE_S3C_RTC in favor of direct dependencies 2021-10-17 19:15:12 +02:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi memblock: rename memblock_free to memblock_phys_free 2021-11-06 13:30:41 -07:00
mach-imx ARM development for 5.16: 2021-11-02 11:33:15 -07:00
mach-integrator clk: versatile: Rename ICST to CLK_ICST 2021-10-14 18:00:25 -07:00
mach-iop32x
mach-ixp4xx
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mstar
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 Updates for the interrupt subsystem: 2021-11-01 13:09:10 -07:00
mach-omap2 ARM: SoC updates for v5.16 2021-11-03 16:48:32 -07:00
mach-orion5x
mach-oxnas
mach-pxa
mach-qcom ARM: SoC drivers for 5.16 2021-11-03 17:00:52 -07:00
mach-rda
mach-realtek
mach-realview clk: versatile: Rename ICST to CLK_ICST 2021-10-14 18:00:25 -07:00
mach-rockchip
mach-rpc
mach-s3c ARM: SoC updates for v5.16 2021-11-03 16:48:32 -07:00
mach-s5pv210 rtc: s3c: remove HAVE_S3C_RTC in favor of direct dependencies 2021-10-17 19:15:12 +02:00
mach-sa1100 ARM: 9101/1: sa1100/assabet: convert LEDs to gpiod APIs 2021-10-25 13:11:54 +01:00
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32
mach-sunxi
mach-tegra
mach-uniphier
mach-ux500 clk: ux500: Add driver for the reset portions of PRCC 2021-10-26 18:06:05 -07:00
mach-versatile clk: versatile: Rename ICST to CLK_ICST 2021-10-14 18:00:25 -07:00
mach-vexpress clk: versatile: Rename ICST to CLK_ICST 2021-10-14 18:00:25 -07:00
mach-vt8500
mach-zynq
mm ARM fixes for 5.16-rc1: 2021-11-14 11:30:50 -08:00
net Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-11-01 19:59:46 -07:00
nwfpe
plat-omap
plat-orion
plat-pxa
plat-versatile
probes ARM development for 5.16: 2021-11-02 11:33:15 -07:00
tools futex,arm: Wire up sys_futex_waitv() 2021-10-07 13:51:12 +02:00
vdso
vfp
xen xen: allow pv-only hypercalls only with CONFIG_XEN_PV 2021-11-02 08:11:01 -05:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig ARM: implement support for vmap'ed stacks 2021-12-03 15:11:33 +01:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug
Makefile ARM: stackprotector: prefer compiler for TLS based per-task protector 2021-12-03 15:11:30 +01:00