summaryrefslogtreecommitdiffstats
path: root/arch/s390/mm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-02-24 16:18:55 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-02-24 17:14:00 +0100
commit823002023da6d9124ed63bc622267c15ab2a7347 (patch)
treecd2b74ff1b6844cca9821d63dfd7180b0a452c06 /arch/s390/mm
parent9499934f70deac0cdb96aa2d90f2a0a2de69d80c (diff)
downloadop-kernel-dev-823002023da6d9124ed63bc622267c15ab2a7347.zip
op-kernel-dev-823002023da6d9124ed63bc622267c15ab2a7347.tar.gz
s390/uaccess: remove copy_from_user_real()
There is no user left, so remove it. It was also potentially broken, since the function didn't clear destination memory if copy_from_user() failed. Which would allow for information leaks. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r--arch/s390/mm/maccess.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c
index efe8ad0..2a2e354 100644
--- a/arch/s390/mm/maccess.c
+++ b/arch/s390/mm/maccess.c
@@ -152,32 +152,6 @@ out:
}
/*
- * Copy memory from user (virtual) to kernel (real)
- */
-int copy_from_user_real(void *dest, void __user *src, unsigned long count)
-{
- int offs = 0, size, rc;
- char *buf;
-
- buf = (char *) __get_free_page(GFP_KERNEL);
- if (!buf)
- return -ENOMEM;
- rc = -EFAULT;
- while (offs < count) {
- size = min(PAGE_SIZE, count - offs);
- if (copy_from_user(buf, src + offs, size))
- goto out;
- if (memcpy_real(dest + offs, buf, size))
- goto out;
- offs += size;
- }
- rc = 0;
-out:
- free_page((unsigned long) buf);
- return rc;
-}
-
-/*
* Check if physical address is within prefix or zero page
*/
static int is_swapped(unsigned long addr)
OpenPOWER on IntegriCloud