Skip to content
Commit 432b1cc7 authored by Janis Schoetterl-Glausch's avatar Janis Schoetterl-Glausch Committed by Vasily Gorbik
Browse files

s390/uaccess: Add copy_from/to_user_key functions



Add copy_from/to_user_key functions, which perform storage key checking.
These functions can be used by KVM for emulating instructions that need
to be key checked.
These functions differ from their non _key counterparts in
include/linux/uaccess.h only in the additional key argument and must be
kept in sync with those.

Since the existing uaccess implementation on s390 makes use of move
instructions that support having an additional access key supplied,
we can implement raw_copy_from/to_user_key by enhancing the
existing implementation.

Signed-off-by: default avatarJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Reviewed-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Acked-by: default avatarJanosch Frank <frankja@linux.ibm.com>
Link: https://lore.kernel.org/r/20220211182215.2730017-2-scgl@linux.ibm.com


Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 602bf168
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment