linux/arch/s390
Heiko Carstens ea81531de2 s390/uaccess: fix page table walk
When translating user space addresses to kernel addresses the follow_table()
function had two bugs:

- PROT_NONE mappings could be read accessed via the kernel mapping. That is
  e.g. putting a filename into a user page, then protecting the page with
  PROT_NONE and afterwards issuing the "open" syscall with a pointer to
  the filename would incorrectly succeed.

- when walking the page tables it used the pgd/pud/pmd/pte primitives which
  with dynamic page tables give no indication which real level of page tables
  is being walked (region2, region3, segment or page table). So in case of an
  exception the translation exception code passed to __handle_fault() is not
  necessarily correct.
  This is not really an issue since __handle_fault() doesn't evaluate the code.
  Only in case of e.g. a SIGBUS this code gets passed to user space. If user
  space can do something sane with the value is a different question though.

To fix these issues don't use any Linux primitives. Only walk the page tables
like the hardware would do it, however we leave quite some checks away since
we know that we only have full size page tables and each index is within bounds.

In theory this should fix all issues...

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-04-02 08:53:08 +02:00
..
appldata s390/time: rename tod clock access functions 2013-02-14 15:55:10 +01:00
boot
crypto
hypfs fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
include s390/uaccess: fix page table walk 2013-04-02 08:53:08 +02:00
kernel s390/mm: fix vmemmap size calculation 2013-03-05 10:21:35 +01:00
kvm Merge tag 'kvm-3.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2013-02-24 13:07:18 -08:00
lib s390/uaccess: fix page table walk 2013-04-02 08:53:08 +02:00
math-emu
mm s390/mm: ignore change bit for vmemmap 2013-02-28 09:37:06 +01:00
net s390/bpf,jit: add vlan tag support 2013-02-14 15:55:20 +01:00
oprofile s390/irq: remove split irq fields from /proc/stat 2013-01-08 10:57:07 +01:00
pci hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
defconfig
Kbuild
Kconfig Select VIRT_TO_BUS directly where needed 2013-03-12 11:16:40 -07:00
Kconfig.debug
Makefile s390: use -fPIC for module compile 2013-01-12 18:49:26 +01:00