linux/arch/powerpc
Christophe Leroy c21f5a9ed8 powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX
When booting through OF, setup_disp_bat() does nothing because
disp_BAT are not set. By change, it used to work because BOOTX
buffer is mapped 1:1 at address 0x81000000 by the bootloader, and
btext_setup_display() sets virt addr same as phys addr.

But since commit 215b823707 ("powerpc/32s: set up an early static
hash table for KASAN."), a temporary page table overrides the
bootloader mapping.

This 0x81000000 is also problematic with the newly implemented
Kernel Userspace Access Protection (KUAP) because it is within user
address space.

This patch fixes those issues by properly setting disp_BAT through
a call to btext_prepare_BAT(), allowing setup_disp_bat() to
properly setup BAT3 for early bootx screen buffer access.

Reported-by: Mathieu Malaterre <malat@debian.org>
Fixes: 215b823707 ("powerpc/32s: set up an early static hash table for KASAN.")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-06-07 19:00:14 +10:00
..
boot treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 40 2019-05-24 17:27:12 +02:00
configs This pull request contains the following changes for MTD: 2019-05-12 17:57:52 -04:00
crypto treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
include powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX 2019-06-07 19:00:14 +10:00
kernel powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX 2019-06-07 19:00:14 +10:00
kvm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 114 2019-05-24 17:39:01 +02:00
lib powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
math-emu powerpc: math-emu: remove unneeded header search paths 2019-01-14 20:39:27 +11:00
mm powerpc/64s: __find_linux_pte() synchronization vs pmdp_invalidate() 2019-06-07 16:28:28 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2019-03-16 12:20:08 -07:00
oprofile Remove 'type' argument from access_ok() function 2019-01-03 18:57:57 -08:00
perf treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 112 2019-05-24 17:39:01 +02:00
platforms treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 118 2019-05-24 17:39:02 +02:00
purgatory powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
sysdev treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
tools powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
xmon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 76 2019-05-24 17:37:51 +02:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig mm: memblock: make keeping memblock memory opt-in rather than opt-out 2019-05-14 09:47:50 -07:00
Kconfig.debug powerpc/xmon: add read-only mode 2019-05-03 02:54:57 +10:00
Makefile treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00