Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56f15e51 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

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: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7385d0a5
Loading
Loading
Loading
Loading
+14 −1
Original line number Original line Diff line number Diff line
@@ -241,9 +241,22 @@ long __strncpy_from_user(char *dst, const char __user *src, long count)
}
}
EXPORT_SYMBOL(__strncpy_from_user);
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)
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);
		static_key_slow_dec(&have_mvcos);
	return 0;
	return 0;
}
}