pkey.h 737 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Kernelspace interface to the pkey device driver
  4. *
  5. * Copyright IBM Corp. 2016,2019
  6. *
  7. * Author: Harald Freudenberger <[email protected]>
  8. *
  9. */
  10. #ifndef _KAPI_PKEY_H
  11. #define _KAPI_PKEY_H
  12. #include <linux/ioctl.h>
  13. #include <linux/types.h>
  14. #include <uapi/asm/pkey.h>
  15. /*
  16. * In-kernel API: Transform an key blob (of any type) into a protected key.
  17. * @param key pointer to a buffer containing the key blob
  18. * @param keylen size of the key blob in bytes
  19. * @param protkey pointer to buffer receiving the protected key
  20. * @return 0 on success, negative errno value on failure
  21. */
  22. int pkey_keyblob2pkey(const u8 *key, u32 keylen,
  23. struct pkey_protkey *protkey);
  24. #endif /* _KAPI_PKEY_H */