Skip to content

Commit 56f15e5

Browse files
heicarstMartin Schwidefsky
authored andcommitted
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>
1 parent 7385d0a commit 56f15e5

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎arch/s390/lib/uaccess_mvcos.c‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,22 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
241241
}
242242
EXPORT_SYMBOL(__strncpy_from_user);
243243

244+
/*
245+
* The uaccess page tabe walk variant can be enforced with the "uaccesspt"
246+
* kernel parameter. This is mainly for debugging purposes.
247+
*/
248+
static int force_uaccess_pt __initdata;
249+
250+
static int __init parse_uaccess_pt(char *__unused)
251+
{
252+
force_uaccess_pt = 1;
253+
return 0;
254+
}
255+
early_param("uaccesspt", parse_uaccess_pt);
256+
244257
static int __init uaccess_init(void)
245258
{
246-
if (IS_ENABLED(CONFIG_32BIT) || !test_facility(27))
259+
if (IS_ENABLED(CONFIG_32BIT) || force_uaccess_pt || !test_facility(27))
247260
static_key_slow_dec(&have_mvcos);
248261
return 0;
249262
}

0 commit comments

Comments
 (0)