s390/uaccess: add missing page table walk range check
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 21 Nov 2013 15:22:17 +0000 (16:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 18:57:16 +0000 (10:57 -0800)
commit3df594a7ac9a732413ecaad15682945715df4443
tree04896e081d84adfaf66683aba22217c485157b5c
parent1a2d670b28befe626d50a39af579da44ecd22245
s390/uaccess: add missing page table walk range check

commit 71a86ef055f569b93bc6901f007bdf447dbf515f upstream.

When translating a user space address, the address must be checked against
the ASCE limit of the process. If the address is larger than the maximum
address that is reachable with the ASCE, an ASCE type exception must be
generated.

The current code simply ignored the higher order bits. This resulted in an
address wrap around in user space instead of an exception in user space.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/lib/uaccess_pt.c