]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
s390/uaccess: introduce 'uaccesspt' kernel parameter
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 27 Jan 2014 09:25:39 +0000 (10:25 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 21 Feb 2014 07:50:17 +0000 (08:50 +0100)
The uaccesspt kernel parameter allows to enforce using the uaccess page
table walk variant. This is mainly for debugging purposes, so this mode
can also be enabled on machines which support the mvcos instruction.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/lib/uaccess_mvcos.c

index e2685ff2ec4b2c1a9801b5c3d131f46fac0d11ee..ae97b8df11aa12e154e3403fc080a603395d5346 100644 (file)
@@ -241,9 +241,22 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
 }
 EXPORT_SYMBOL(__strncpy_from_user);
 
+/*
+ * The uaccess page tabe walk variant can be enforced with the "uaccesspt"
+ * kernel parameter. This is mainly for debugging purposes.
+ */
+static int force_uaccess_pt __initdata;
+
+static int __init parse_uaccess_pt(char *__unused)
+{
+       force_uaccess_pt = 1;
+       return 0;
+}
+early_param("uaccesspt", parse_uaccess_pt);
+
 static int __init uaccess_init(void)
 {
-       if (IS_ENABLED(CONFIG_32BIT) || !test_facility(27))
+       if (IS_ENABLED(CONFIG_32BIT) || force_uaccess_pt || !test_facility(27))
                static_key_slow_dec(&have_mvcos);
        return 0;
 }