summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-02-25 09:10:23 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-02-28 09:37:12 +0100
commit066c4373599211ab0e1425586b8df6f1e932d97e (patch)
treeb1ccc220714494e034092dbe583c0c46cbca3591 /drivers
parents390/uaccess: fix strncpy_from_user string length check (diff)
downloadlinux-066c4373599211ab0e1425586b8df6f1e932d97e.tar.xz
linux-066c4373599211ab0e1425586b8df6f1e932d97e.zip
s390/uaccess: fix kernel ds access for page table walk
When the kernel resides in home space and the mvcos instruction is not available uaccesses for kernel ds happen via simple strnlen() or memcpy() calls. This however can break badly, since uaccesses in kernel space may fail as well, especially if CONFIG_DEBUG_PAGEALLOC is turned on. To fix this implement strnlen_kernel() and copy_in_kernel() functions which can only be used by the page table uaccess functions. These two functions detect invalid memory accesses and return the correct length of processed data.. Both functions are more or less a copy of the std variants without sacf calls. Fixes ipl crashes on 31 bit machines as well on 64 bit machines without mvcos. Caused by changing the default address space of the kernel being home space. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions