linux-sg2042/arch/arm
Thomas Garnier e33f8d3267 arm/syscalls: Optimize address limit check
Disable the generic address limit check in favor of an architecture
specific optimized implementation. The generic implementation using
pending work flags did not work well with ARM and alignment faults.

The address limit is checked on each syscall return path to user-mode
path as well as the irq user-mode return function. If the address limit
was changed, a function is called to report data corruption (stopping
the kernel or process based on configuration).

The address limit check has to be done before any pending work because
they can reset the address limit and the process is killed using a
SIGKILL signal. For example the lkdtm address limit check does not work
because the signal to kill the process will reset the user-mode address
limit.

Signed-off-by: Thomas Garnier <thgarnie@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Pratyush Anand <panand@redhat.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Will Drewry <wad@chromium.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-api@vger.kernel.org
Cc: Yonghong Song <yhs@fb.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1504798247-48833-4-git-send-email-keescook@chromium.org
2017-09-17 19:45:33 +02:00
..
boot ARM: arm64: Devicetree updates for v4.14 2017-09-10 20:54:48 -07:00
common arm: implement ->dma_supported instead of ->set_dma_mask 2017-06-28 06:54:49 -07:00
configs ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
crypto crypto: arm/aes - avoid expanded lookup tables in the final round 2017-08-04 09:27:25 +08:00
firmware
include Revert "arm/syscalls: Check address limit on user-mode return" 2017-09-17 19:45:33 +02:00
kernel arm/syscalls: Optimize address limit check 2017-09-17 19:45:33 +02:00
kvm KVM: arm: implements the kvm_arch_vcpu_in_kernel() 2017-08-08 10:57:43 +02:00
lib ARM: implement memset32 & memset64 2017-09-08 18:26:48 -07:00
mach-actions ARM: owl: smp: Drop bogus holding pen 2017-07-03 14:31:47 +02:00
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 2017-06-12 10:45:10 +02:00
mach-at91 The diff is dominated by the Allwinner A10/A20 SoCs getting converted to 2017-09-13 11:04:14 -07:00
mach-axxia
mach-bcm ARM: SoC platform updates 2017-07-04 14:34:51 -07:00
mach-berlin
mach-clps711x clocksource/drivers: Rename CLKSRC_OF to TIMER_OF 2017-06-14 12:01:03 +02:00
mach-cns3xxx ARM: remove duplicate 'const' annotations' 2017-05-19 10:12:55 +02:00
mach-davinci This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-digicolor
mach-dove mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
mach-ebsa110
mach-efm32
mach-ep93xx ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-exynos Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-footbridge
mach-gemini ARM: gemini: select pin controller 2017-08-05 23:48:29 +02:00
mach-highbank
mach-hisi ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-imx dma-mapping updates for 4.14: 2017-09-12 13:30:06 -07:00
mach-integrator
mach-iop13xx ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-06-28 15:13:55 -05:00
mach-iop32x
mach-iop33x
mach-ixp4xx This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx ARM/dmaengine: pl08x: pass reasonable memcpy settings 2017-05-24 09:44:32 +05:30
mach-mediatek ARM: mediatek: add MT7623a smp bringup code 2017-07-31 13:31:48 +02:00
mach-meson arm: meson: select the clock controller for Meson8 2017-06-09 11:15:36 -07:00
mach-mmp This pull request contains the following core changes: 2017-09-01 15:34:30 +02:00
mach-moxart clocksource/drivers/fttmr010: Merge Moxa into FTTMR010 2017-06-12 10:45:10 +02:00
mach-mv78xx0 ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-06-28 15:13:55 -05:00
mach-mvebu Merge branch 'next/cleanup' into next/soc 2017-09-05 20:29:46 -07:00
mach-mxs ARM: mxs: add support for I2SE Duckbill 2 boards 2017-04-10 21:25:50 +08:00
mach-netx
mach-nomadik
mach-nspire
mach-omap1 MTD changes for 4.14: 2017-09-09 14:48:21 -07:00
mach-omap2 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-orion5x mtd: nand: Rename nand.h into rawnand.h 2017-08-13 10:11:49 +02:00
mach-oxnas
mach-picoxcell
mach-prima2 ARM: sirf: mark sirfsoc_init_late as __maybe_unused 2017-07-27 22:57:44 +02:00
mach-pxa Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-qcom
mach-realview
mach-rockchip Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
mach-rpc ARM: rpc: rename RAM_SIZE macro 2017-07-27 22:57:38 +02:00
mach-s3c24xx ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
mach-s3c64xx dmaengine updates for 4.13-rc1 2017-07-08 12:36:50 -07:00
mach-s5pv210
mach-sa1100 ARM: sa1100: normalize clk API 2017-07-27 13:15:50 +02:00
mach-shmobile Merge branch 'next/cleanup' into next/soc 2017-09-05 20:29:46 -07:00
mach-socfpga
mach-spear dmaengine updates for 4.13-rc1 2017-07-08 12:36:50 -07:00
mach-sti
mach-stm32 ARM: stm32: Introduce MACH_STM32F469 flag 2017-06-18 20:10:27 -07:00
mach-sunxi clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mach-tango
mach-tegra ARM: SoC driver updates for v4.14 2017-09-10 20:40:00 -07:00
mach-u300 clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mach-uniphier
mach-ux500 ARM: ux500: don't select CPUFREQ_DT 2017-08-25 01:34:45 +02:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900 ARM: w90x900: normalize clk API 2017-07-27 22:57:36 +02:00
mach-zx
mach-zynq clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
mm Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
net arm: eBPF JIT compiler 2017-08-22 09:26:43 -07:00
nwfpe
oprofile
plat-iop
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: s3c24xx: Remove non-existing CONFIG_CPU_S3C2413 2017-07-20 07:17:43 +02:00
plat-versatile ARM: plat-versatile: remove stale clock header 2017-04-07 11:57:57 +02:00
probes arm: Prevent hotplug rwsem recursion 2017-05-26 10:10:46 +02:00
tools
vdso
vfp
xen This is the first pull request for the new dma-mapping subsystem 2017-07-06 19:20:54 -07:00
Kconfig Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm 2017-09-12 06:10:44 -07:00
Kconfig-nommu
Kconfig.debug Updates to for omap debug_ll code to use generic DEBUG_UART_8250 code. 2017-08-16 22:36:10 +02:00
Makefile ARM: Prepare Actions Semi S500 2017-06-21 18:08:41 +02:00