linux/arch/powerpc
Aneesh Kumar K.V 6457f42eb3 powerpc/mm: Drop VM_BUG_ON in get_region_id()
We call get_region_id() without validating the ea value. That means
with a wrong ea value we hit the BUG as below.

  kernel BUG at arch/powerpc/include/asm/book3s/64/hash.h:129!
  Oops: Exception in kernel mode, sig: 5 [#1]
  LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries
  CPU: 0 PID: 3937 Comm: access_tests Not tainted 5.1.0
  ....
  NIP [c00000000007ba20] do_slb_fault+0x70/0x320
  LR [c00000000000896c] data_access_slb_common+0x15c/0x1a0

Fix this by removing the VM_BUG_ON. All callers make sure the returned
region id is valid and error out otherwise.

Fixes: 0034d395f8 ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range")
Reported-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2019-05-17 00:40:01 +10:00
..
boot powerpc/boot: Fix missing check of lseek() return value 2019-05-03 02:54:57 +10:00
configs powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
crypto powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
include powerpc/mm: Drop VM_BUG_ON in get_region_id() 2019-05-17 00:40:01 +10:00
kernel powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
kvm powerpc updates for 5.2 2019-05-10 05:29:27 -07: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/mm: Fix crashes with hugepages & 4K pages 2019-05-15 11:13:35 +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 powerpc/perf: Trace imc PMU functions 2019-05-03 02:55:00 +10:00
platforms powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
purgatory powerpc: disable KASAN instrumentation on early/critical files. 2019-05-03 01:20:26 +10:00
sysdev powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
tools powerpc/tools/checkpatch: Ignore DT_SPLIT_BINDING_PATCH 2018-12-04 19:45:01 +11:00
xmon powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
Kbuild powerpc: Add -Werror at arch/powerpc level 2018-10-19 00:56:17 +11:00
Kconfig powerpc updates for 5.2 2019-05-10 05:29:27 -07:00
Kconfig.debug powerpc/xmon: add read-only mode 2019-05-03 02:54:57 +10:00
Makefile powerpc: vdso: Make vdso32 installation conditional in vdso_install 2019-04-20 22:02:12 +10:00
Makefile.postlink