linux/arch/arm
Ard Biesheuvel 5c6360ee4a ARM: 8988/1: mmu: fix crash in EFI calls due to p4d typo in create_mapping_late()
Commit

  84e6ffb2c4 ("arm: add support for folded p4d page tables")

updated create_mapping_late() to take folded P4Ds into account when
creating mappings, but inverted the p4d_alloc() failure test, resulting
in no mapping to be created at all.

When the EFI rtc driver subsequently tries to invoke the EFI GetTime()
service, the memory regions covering the EFI data structures are missing
from the page tables, resulting in a crash like

  Unable to handle kernel paging request at virtual address 5ae0cf28
  pgd = (ptrval)
  [5ae0cf28] *pgd=80000040205003, *pmd=00000000
  Internal error: Oops: 207 [#1] SMP THUMB2
  Modules linked in:
  CPU: 0 PID: 7 Comm: kworker/u32:0 Not tainted 5.7.0+ #92
  Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015
  Workqueue: efi_rts_wq efi_call_rts
  PC is at efi_call_rts+0x94/0x294
  LR is at efi_call_rts+0x83/0x294
  pc : [<c0b4f098>]    lr : [<c0b4f087>]    psr: 30000033
  sp : e6219ef0  ip : 00000000  fp : ffffe000
  r10: 00000000  r9 : 00000000  r8 : 30000013
  r7 : e6201dd0  r6 : e6201ddc  r5 : 00000000  r4 : c181f264
  r3 : 5ae0cf10  r2 : 00000001  r1 : e6201dd0  r0 : e6201ddc
  Flags: nzCV  IRQs on  FIQs on  Mode SVC_32  ISA Thumb  Segment none
  Control: 70c5383d  Table: 661cc840  DAC: 00000001
  Process kworker/u32:0 (pid: 7, stack limit = 0x(ptrval))
  ...
  [<c0b4f098>] (efi_call_rts) from [<c0448219>] (process_one_work+0x16d/0x3d8)
  [<c0448219>] (process_one_work) from [<c0448581>] (worker_thread+0xfd/0x408)
  [<c0448581>] (worker_thread) from [<c044ca7b>] (kthread+0x103/0x104)
  ...

Fixes: 84e6ffb2c4 ("arm: add support for folded p4d page tables")
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
2020-07-21 16:32:56 +01:00
..
boot ARM: OMAP fixes for v5.8 2020-06-28 14:57:14 -07:00
common
configs ARM: defconfig updates fopr 5.8 2020-06-04 19:54:15 -07:00
crypto Merge branch 'rwonce/rework' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux 2020-06-10 14:46:54 -07:00
include efi/libstub: arm: Print CPU boot mode and MMU state at boot 2020-06-17 15:29:11 +02:00
kernel ARM: 8987/1: VDSO: Fix incorrect clock_gettime64 2020-07-21 16:32:55 +01:00
lib mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
mach-actions ARM: actions: Drop unneeded select of COMMON_CLK 2020-05-15 23:27:37 +02:00
mach-alpine ARM: alpine: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:37 +02:00
mach-artpec
mach-asm9260 ARM: asm9260: Drop unneeded select of GENERIC_CLOCKEVENTS 2020-05-15 23:27:37 +02:00
mach-aspeed ARM: aspeed: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:37 +02:00
mach-at91
mach-axxia
mach-bcm ARM: bcm: Select ARM_TIMER_SP804 for ARCH_BCM_NSP 2020-06-14 15:09:49 -07:00
mach-berlin ARM: berlin: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:37 +02:00
mach-clps711x ARM: clps711x: Drop unneeded select of multi-platform selected options 2020-05-15 23:27:37 +02:00
mach-cns3xxx
mach-davinci ARM: davinci: fix build failure without I2C 2020-05-28 12:35:00 +02:00
mach-digicolor
mach-dove
mach-ebsa110 mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mach-efm32
mach-ep93xx
mach-exynos
mach-footbridge treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx6: add missing put_device() call in imx6q_suspend_init() 2020-06-24 09:25:39 +08:00
mach-integrator mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
mach-iop32x mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mach-ixp4xx mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mach-keystone mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: mediatek: Replace <linux/clk-provider.h> by <linux/of_clk.h> 2020-05-15 22:55:06 +02:00
mach-meson
mach-milbeaut
mach-mmp This time around we have 4 lines of diff in the core framework, removing a 2020-06-10 11:42:19 -07:00
mach-moxart
mach-mv78xx0
mach-mvebu ARM: mvebu: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:38 +02:00
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1
mach-omap2 Fixes for omaps for v5.8 2020-06-28 14:41:55 +02:00
mach-orion5x
mach-oxnas ARM: oxnas: make ox820_boot_secondary static 2020-05-12 10:29:33 +02:00
mach-picoxcell
mach-prima2 ARM: prima2: Drop unneeded select of HAVE_SMP 2020-05-15 23:27:38 +02:00
mach-pxa ARM: pxa: remove Compulab pxa2xx boards 2020-05-26 00:10:57 +02:00
mach-qcom
mach-rda
mach-realtek
mach-realview VExpress modularization 2020-05-15 23:04:40 +02:00
mach-rockchip
mach-rpc
mach-s3c24xx
mach-s3c64xx
mach-s5pv210
mach-sa1100 mm: pgtable: add shortcuts for accessing kernel PMD and PTE 2020-06-09 09:39:13 -07:00
mach-shmobile ARM: shmobile: r8a7742: Basic SoC support 2020-04-28 10:13:58 +02:00
mach-socfpga ARM: socfpga: Drop unneeded select of PCI_DOMAINS_GENERIC 2020-05-15 23:27:38 +02:00
mach-spear
mach-sti Revert "ARM: sti: Implement dummy L2 cache's write_sec" 2020-06-28 14:46:54 +02:00
mach-stm32
mach-sunxi
mach-tango
mach-tegra mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
mach-u300
mach-uniphier
mach-ux500
mach-versatile VExpress modularization 2020-05-15 23:04:40 +02:00
mach-vexpress Revert "ARM: vexpress: Don't select VEXPRESS_CONFIG" 2020-05-28 12:30:33 +02:00
mach-vt8500 ARM: Remove redundant CLKDEV_LOOKUP selects 2020-05-05 12:33:57 -07:00
mach-zx
mach-zynq mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
mm ARM: 8988/1: mmu: fix crash in EFI calls due to p4d typo in create_mapping_late() 2020-07-21 16:32:56 +01:00
net bpf, arm: Optimize ALU ARSH K using asr immediate instruction 2020-05-04 17:04:42 +02:00
nwfpe
oprofile
plat-omap
plat-orion
plat-pxa
plat-samsung
plat-versatile
probes
tools vfs: add faccessat2 syscall 2020-05-14 16:44:25 +02:00
vdso
vfp
xen arm/xen: remove the unused macro GRANT_TABLE_PHYSADDR 2020-06-29 16:16:06 -07:00
Kconfig Kbuild updates for v5.8 (2nd) 2020-06-13 13:29:16 -07:00
Kconfig-nommu
Kconfig.debug treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile Kbuild updates for v5.8 2020-06-06 12:00:25 -07:00