linux/arch/powerpc
Michael Ellerman 81d1b54dec powerpc/mm/radix: Fix small page at boundary when splitting
When we have CONFIG_STRICT_KERNEL_RWX enabled, we want to split the
linear mapping at the text/data boundary so we can map the kernel
text read only.

Currently we always use a small page at the text/data boundary, even
when that's not necessary:

  Mapped 0x0000000000000000-0x0000000000e00000 with 2.00 MiB pages
  Mapped 0x0000000000e00000-0x0000000001000000 with 64.0 KiB pages
  Mapped 0x0000000001000000-0x0000000040000000 with 2.00 MiB pages

This is because the check that the mapping crosses the __init_begin
boundary is too strict, it also returns true when we map exactly up to
the boundary.

So fix it to check that the mapping would actually map past
__init_begin, and with that we see:

  Mapped 0x0000000000000000-0x0000000040000000 with 2.00 MiB pages
  Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-10-20 13:26:47 +11:00
..
boot powerpc/boot: Build boot wrapper with optimisations 2018-10-13 22:21:25 +11:00
configs powerpc/config: Enable CONFIG_PRINTK_TIME 2018-10-03 15:40:06 +10:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 2018-10-20 13:26:47 +11:00
kernel powerpc/ftrace: Handle large kernel configs 2018-10-20 13:26:47 +11:00
kvm powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
lib powerpc: Add support for function error injection 2018-10-20 13:26:43 +11:00
math-emu
mm powerpc/mm/radix: Fix small page at boundary when splitting 2018-10-20 13:26:47 +11:00
net powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
oprofile powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
perf powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
platforms powerpc/pseries: Export raw per-CPU VPA data via debugfs 2018-10-20 13:26:47 +11:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev powerpc/sysdev/ipic: check primary_ipic NULL pointer before using it 2018-10-20 13:26:47 +11:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 2018-10-20 13:26:47 +11:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 2018-10-20 13:26:47 +11:00
Kconfig.debug powerpc: remove redundant 'default n' from Kconfig-s 2018-10-13 22:21:25 +11:00
Makefile powerpc: Move core kernel logic into arch/powerpc/Kbuild 2018-10-19 00:56:17 +11:00
Makefile.postlink