linux/arch/arc
Eugeniy Paltsev a8c715b4dd ARC: mm: SIGSEGV userspace trying to access kernel virtual memory
As of today if userspace process tries to access a kernel virtual addres
(0x7000_0000 to 0x7ffff_ffff) such that a legit kernel mapping already
exists, that process hangs instead of being killed with SIGSEGV

Fix that by ensuring that do_page_fault() handles kenrel vaddr only if
in kernel mode.

And given this, we can also simplify the code a bit. Now a vmalloc fault
implies kernel mode so its failure (for some reason) can reuse the
@no_context label and we can remove @bad_area_nosemaphore.

Reproduce user test for original problem:

------------------------>8-----------------
 #include <stdlib.h>
 #include <stdint.h>

 int main(int argc, char *argv[])
 {
 	volatile uint32_t temp;

 	temp = *(uint32_t *)(0x70000000);
 }
------------------------>8-----------------

Cc: <stable@vger.kernel.org>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2019-05-20 10:09:10 -07:00
..
boot ARC: [hsdk] Make it easier to add PAE40 region to DTB 2019-04-02 12:11:01 -07:00
configs block: remove CONFIG_LBDAF 2019-04-06 10:48:35 -06:00
include ARC: fix build warnings 2019-05-20 10:09:10 -07:00
kernel ARC updates for 5.1-rc2 2019-03-20 11:01:52 -07:00
lib ARC: memset: fix build with L1_CACHE_SHIFT != 6 2019-04-08 08:41:44 -07:00
mm ARC: mm: SIGSEGV userspace trying to access kernel virtual memory 2019-05-20 10:09:10 -07:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-axs10x PCI: consolidate PCI config entry in drivers/pci 2018-11-23 11:45:34 +09:00
plat-eznps arch: arc: Kconfig: pedantic formatting 2019-03-11 22:03:18 -07:00
plat-hsdk ARCv2: support manual regfile save on interrupts 2019-02-21 11:03:18 -08:00
plat-sim ARC: [plat-sim] Include this platform unconditionally 2017-08-04 13:49:47 +05:30
plat-tb10x arc: select GPIOLIB directly 2016-04-26 14:07:59 +02:00
Kbuild
Kconfig locking/rwsem: Remove rwsem-spinlock.c & use rwsem-xadd.c for all archs 2019-04-03 14:50:52 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile ARCv2: Add explcit unaligned access support (and ability to disable too) 2019-02-25 12:10:58 -08:00