summaryrefslogtreecommitdiff
path: root/rust/helpers
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2025-06-16 17:00:30 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2025-06-29 13:12:02 +0200
commitee417a84d005f90b6c2e572dbad00a25f9fb7660 (patch)
tree305f359688889edb598fd45b39ffca4ba3f34b69 /rust/helpers
parent6fe0ea914d73a32b27db9eff5259e59c28633eac (diff)
s390/skey: Provide infrastructure for executing with non-default access key
The current assumption is that kernel code is always executed with access key zero, which means that storage key protection does not apply. However this assumption is not correct: cmpxchg_user_key() may be executed with a non-zero key; if then the storage key of the page which belongs to the cmpxchg_user_key() code contains a key with fetch-protection enabled the result is a protection exception. For several performance optimizations storage keys are not initialized on system boot. To keep these optimizations add infrastructure which allows to define code ranges within functions which are executed with a non-default key. When such code is executed such functions must explicitly call skey_regions_initialize(). This will initialize all storage keys belonging to such code ranges in a way that no protection exceptions happen when the code is executed with a non-default access key. Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'rust/helpers')
0 files changed, 0 insertions, 0 deletions