diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-07-27 07:45:39 (GMT) |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-07-30 09:03:09 (GMT) |
commit | 008c2e8f247f0a8db1e8e26139da12f3a3abcda0 (patch) | |
tree | 2c3178fe37a4c4fb0dea576bef14b18802309476 /arch/s390/Kconfig | |
parent | f2c76e3b6f72c3fda290998109594dc490b8b087 (diff) | |
download | linux-fsl-qoriq-008c2e8f247f0a8db1e8e26139da12f3a3abcda0.tar.xz |
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>
Diffstat (limited to 'arch/s390/Kconfig')
0 files changed, 0 insertions, 0 deletions