s390/pkey: Introduce new API for random protected key verification
Introduce a new ioctl API and in-kernel API to verify if a random protected key is still valid. A protected key is invalid when its wrapping key verification pattern does not match the verification pattern of the LPAR. Each time an LPAR is activated, a new LPAR wrapping key is generated and the wrapping key verification pattern is updated. Both APIs are described in detail in the header files arch/s390/include/asm/pkey.h and arch/s390/include/uapi/asm/pkey.h. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com> Reviewed-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
af504452d1
commit
cb26b9ff71
@@ -117,4 +117,12 @@ int pkey_verifykey(const struct pkey_seckey *seckey,
|
||||
*/
|
||||
int pkey_genprotkey(__u32 keytype, struct pkey_protkey *protkey);
|
||||
|
||||
/*
|
||||
* In-kernel API: Verify an (AES) protected key.
|
||||
* @param protkey pointer to buffer containing the protected key to verify
|
||||
* @return 0 on success, negative errno value on failure. In case the protected
|
||||
* key is not valid -EKEYREJECTED is returned
|
||||
*/
|
||||
int pkey_verifyprotkey(const struct pkey_protkey *protkey);
|
||||
|
||||
#endif /* _KAPI_PKEY_H */
|
||||
|
Reference in New Issue
Block a user