Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/arm
Imre Deak 1d2127123d ARM: 5742/1: ARM: add debug check for invalid kernel page faults
According to the following in arch/arm/mm/fault.c page faults from
kernel mode are invalid if mmap_sem is already held and there is
no exception handler defined for the faulting instruction:

/*
 * As per x86, we may deadlock here.  However, since the kernel only
 * validly references user space from well defined areas of the code,
 * we can bug out early if this is from code which shouldn't.
 */
if (!down_read_trylock(&mm->mmap_sem)) {
	if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
		goto no_context;

Since mmap_sem can be held at arbitrary times by another thread this
also means that any page faults from kernel mode are invalid if no
exception handler is defined for them, regardless whether mmap_sem is
held at the time of fault.

To easier detect code that can trigger the above error, add a check
also for the case where mmap_sem is acquired. As this has an overhead
make it a VM debug check.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-10-05 17:55:55 +01:00
..
boot kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
common ARM: 5735/1: sa1111: CodingStyle cleanups 2009-10-02 22:32:33 +01:00
configs Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/xscaleiop 2009-10-02 22:31:04 +01:00
include/asm ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
kernel ARM: 5727/1: Pass IFSR register to do_PrefetchAbort() 2009-10-02 22:34:32 +01:00
lib Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6 2009-09-19 13:47:57 +01:00
mach-aaec2000
mach-at91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-25 07:22:11 -07:00
mach-bcmring ARM: 5733/1: fix bcmring compile error 2009-10-01 16:26:16 +01:00
mach-clps711x
mach-davinci ARM: includecheck fix: mach-davinci, board-dm365-evm.c 2009-09-28 18:06:20 +01:00
mach-ebsa110
mach-ep93xx ep93xx video driver platform support 2009-09-23 07:39:51 -07:00
mach-footbridge
mach-gemini
mach-h720x
mach-integrator ARM: Fix section mismatch warning in Integrator pci_v3 2009-09-28 18:04:32 +01:00
mach-iop13xx Merge branch 'iop-raid6' into async-tx-next 2009-09-08 17:53:57 -07:00
mach-iop32x iop3xx: ATU and PCI memory configuration corrected 2009-08-18 13:48:35 -07:00
mach-iop33x iop3xx: ATU and PCI memory configuration corrected 2009-08-18 13:48:35 -07:00
mach-ixp4xx ixp4xx: arch_idle() documentation fixup 2009-09-21 19:20:03 +02:00
mach-ixp23xx
mach-ixp2000
mach-kirkwood Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
mach-ks8695 ARM: 5637/1: [KS8695] Don't reference CLOCK_TICK_RATE in drivers 2009-08-05 22:06:56 +01:00
mach-l7200
mach-lh7a40x
mach-loki
mach-mmp [ARM] pxa: add PWM devices support for pxa168/910 2009-06-05 10:32:06 +08:00
mach-msm
mach-mv78xx0 [ARM] orion: convert gpio to use gpiolib 2009-06-08 13:04:57 -04:00
mach-mx1 ARM: mxc: Fix i2c_board_info definitions 2009-08-14 12:40:37 +02:00
mach-mx2 mx21ads: Fix framebuffer platform data 2009-08-14 12:41:16 +02:00
mach-mx3 Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
mach-mx25 Freescale i.MX25 PDK (3ds) board support 2009-08-14 12:40:43 +02:00
mach-mxc91231 MXC: add iomux pins configuration support for MXC91231 2009-08-14 12:40:47 +02:00
mach-netx netx: Use get_irqnr_preamble to initialize base register 2009-08-13 20:34:36 +02:00
mach-nomadik mtd: OneNand support for Nomadik 8815 SoC (on NHK8815 board) 2009-09-20 06:00:27 -07:00
mach-ns9xxx const: constify remaining file_operations 2009-10-01 16:11:11 -07:00
mach-omap1 omap: Fix wrong jtag_id for 850 2009-09-24 16:23:13 -07:00
mach-omap2 omap: Fix wrong condition check in while loop for mailbox and iommu2 2009-09-28 09:21:26 -07:00
mach-orion5x [ARM] orion5x: Add LaCie NAS 2Big Network support 2009-09-08 14:10:35 -04:00
mach-pnx4008
mach-pxa Merge branch 'master' into for-linus 2009-09-22 21:01:40 +01:00
mach-realview ARM: 5720/1: Move MMCI header to amba include dir 2009-09-22 20:49:04 +01:00
mach-rpc
mach-s3c24a0/include/mach ARM: S3C: move s3c_device_nand from plat-s3c24xx to plat-s3c 2009-07-31 00:10:24 +01:00
mach-s3c2400
mach-s3c2410 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2412 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2440 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c2442 [ARM] GTA02: build fixes (s3c2410_nand_set usage) 2009-06-24 00:10:46 +01:00
mach-s3c2443
mach-s3c6400 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s3c6410 ARM: S3C: Add missing selection of S3C_DEV_NAND in machine Kconfigs. 2009-09-17 10:12:28 +01:00
mach-s5pc100 ARM: S5PC100: Board and configuration file 2009-08-16 23:40:39 +01:00
mach-sa1100 ARM: Remove unused CONFIG SA1100_H3XXX 2009-09-28 18:06:20 +01:00
mach-shark
mach-stmp37xx [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-stmp378x [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-u300 ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3 2009-10-01 16:26:15 +01:00
mach-versatile ARM: 5720/1: Move MMCI header to amba include dir 2009-09-22 20:49:04 +01:00
mach-w90x900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2009-09-14 17:56:51 -07:00
mm ARM: 5742/1: ARM: add debug check for invalid kernel page faults 2009-10-05 17:55:55 +01:00
nwfpe
oprofile
plat-iop Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/xscaleiop 2009-10-02 22:31:04 +01:00
plat-mxc spi: add SPI driver for most known i.MX SoCs 2009-09-23 07:39:43 -07:00
plat-omap omap: Fix MMC gpio_wp for BeagleBoard C2 and above 2009-09-24 16:23:17 -07:00
plat-orion [ARM] Kirkwood: __init requires linux/init.h 2009-08-24 11:55:59 -04:00
plat-pxa [ARM] pxa/dma: add debugfs entries 2009-09-10 18:49:29 +08:00
plat-s3c ARM: s3c: fix check of index into s3c_gpios[] 2009-09-19 12:14:06 +01:00
plat-s3c24xx s3cmci: add better support for no card detect or write protect available 2009-10-01 16:11:15 -07:00
plat-s3c64xx Merge branch 'next-s3c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux 2009-09-18 20:55:56 +01:00
plat-s5pc1xx ARM: S5PC100: Kconfigs and Makefiles 2009-08-16 23:35:19 +01:00
plat-stmp3xxx ARM: STMP3xxx: deallocation with negative index of descriptors[] 2009-09-19 12:14:05 +01:00
tools [ARM] Update mach-types 2009-09-18 21:42:01 +01:00
vfp Thumb-2: Implement the unified VFP support 2009-07-24 12:32:57 +01:00
Kconfig ARM: 5580/2: ARM TCM (Tightly-Coupled Memory) support v3 2009-09-15 22:11:05 +01:00
Kconfig-nommu
Kconfig.debug Thumb-2: Add Thumb-2 support to the build files 2009-07-24 12:33:02 +01:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2009-09-23 15:37:02 -07:00