linux/arch
Heiko Carstens 008c2e8f24 s390/mm: fix fault handling for page table walk case
Make sure the kernel does not incorrectly create a SIGBUS signal during
user space accesses:

For user space accesses in the switched addressing mode case the kernel
may walk page tables and access user address space via the kernel
mapping. If a page table entry is invalid the function __handle_fault()
gets called in order to emulate a page fault and trigger all the usual
actions like paging in a missing page etc. by calling handle_mm_fault().

If handle_mm_fault() returns with an error fixup handling is necessary.
For the switched addressing mode case all errors need to be mapped to
-EFAULT, so that the calling uaccess function can return -EFAULT to
user space.

Unfortunately the __handle_fault() incorrectly calls do_sigbus() if
VM_FAULT_SIGBUS is set. This however should only happen if a page fault
was triggered by a user space instruction. For kernel mode uaccesses
the correct action is to only return -EFAULT.
So user space may incorrectly see SIGBUS signals because of this bug.

For current machines this would only be possible for the switched
addressing mode case in conjunction with futex operations.

Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-07-30 11:03:09 +02:00
..
alpha Merge branch 'pci/myron-pcibios_setup' into next 2012-07-05 15:31:05 -06:00
arm The common clk framework changes for 3.6 include a small number of core 2012-07-24 16:40:57 -07:00
avr32 fixups for signal breakage 2012-06-04 17:47:34 -04:00
blackfin Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-07-24 10:01:50 -07:00
c6x Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-07-24 10:01:50 -07:00
cris cris/PCI: factor out pcibios_setup() 2012-07-05 15:09:07 -06:00
frv frv/PCI: move fixup hooks from __init to __devinit 2012-06-12 09:10:55 -06:00
h8300 h8300/uaccess: add mising __clear_user() 2012-07-11 16:04:46 -07:00
hexagon hexagon: SMP: Remove call to ipi_call_lock()/ipi_call_unlock() 2012-06-05 17:27:11 +02:00
ia64 IOMMU Updates for Linux v3.6-rc1 2012-07-24 16:24:11 -07:00
m32r Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 11:22:15 -07:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2012-07-24 17:20:51 -07:00
microblaze PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
mips PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
mn10300 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 11:22:15 -07:00
openrisc new helper: signal_delivered() 2012-06-01 12:58:52 -04:00
parisc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
powerpc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
s390 s390/mm: fix fault handling for page table walk case 2012-07-30 11:03:09 +02:00
score new helper: signal_delivered() 2012-06-01 12:58:52 -04:00
sh Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-07-24 17:12:54 -07:00
sparc PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
tile PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
um Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-07-19 11:17:30 -07:00
unicore32 PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
x86 IOMMU Updates for Linux v3.6-rc1 2012-07-24 16:24:11 -07:00
xtensa PCI changes for the 3.6 merge window: 2012-07-24 16:17:07 -07:00
.gitignore
Kconfig Merge branch 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-05-25 09:18:59 -07:00