aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-01-27 04:25:39 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-02-21 02:50:17 -0500
commit56f15e518cfdc732bd4e4da90e0c9cf2fc4e7c1b (patch)
treee86068ef02db989769aedb3e495d444e3f7d62eb
parent7385d0a550813c912094c5df22aeeb463712300e (diff)
s390/uaccess: introduce 'uaccesspt' kernel parameter
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>
-rw-r--r--arch/s390/lib/uaccess_mvcos.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/s390/lib/uaccess_mvcos.c b/arch/s390/lib/uaccess_mvcos.c
index e2685ff2ec4b..ae97b8df11aa 100644
--- a/arch/s390/lib/uaccess_mvcos.c
+++ b/arch/s390/lib/uaccess_mvcos.c
@@ -241,9 +241,22 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
241} 241}
242EXPORT_SYMBOL(__strncpy_from_user); 242EXPORT_SYMBOL(__strncpy_from_user);
243 243
244/*
245 * The uaccess page tabe walk variant can be enforced with the "uaccesspt"
246 * kernel parameter. This is mainly for debugging purposes.
247 */
248static int force_uaccess_pt __initdata;
249
250static int __init parse_uaccess_pt(char *__unused)
251{
252 force_uaccess_pt = 1;
253 return 0;
254}
255early_param("uaccesspt", parse_uaccess_pt);
256
244static int __init uaccess_init(void) 257static int __init uaccess_init(void)
245{ 258{
246 if (IS_ENABLED(CONFIG_32BIT) || !test_facility(27)) 259 if (IS_ENABLED(CONFIG_32BIT) || force_uaccess_pt || !test_facility(27))
247 static_key_slow_dec(&have_mvcos); 260 static_key_slow_dec(&have_mvcos);
248 return 0; 261 return 0;
249} 262}