diff options
| author | Hannes Reinecke <[email protected]> | 2023-08-24 16:39:08 +0200 |
|---|---|---|
| committer | Keith Busch <[email protected]> | 2023-10-11 10:11:54 -0700 |
| commit | 9d77eb52778499a97cab662aa96de4e2e4fa72d3 (patch) | |
| tree | b51a19b9742dacf3ff3b48bb7ed80d28259f6b4c /include | |
| parent | ccd3129aca286c41616afe357e3494c5b43350a0 (diff) | |
nvme-keyring: register '.nvme' keyring
Register a '.nvme' keyring to hold keys for TLS and DH-HMAC-CHAP and
add a new config option NVME_KEYRING.
We need a separate keyring for NVMe as the configuration is done
via individual commands (eg for configfs), and the usual per-session
or per-process keyrings can't be used.
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/nvme-keyring.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/nvme-keyring.h b/include/linux/nvme-keyring.h new file mode 100644 index 000000000000..32bd264a71e6 --- /dev/null +++ b/include/linux/nvme-keyring.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023 Hannes Reinecke, SUSE Labs + */ + +#ifndef _NVME_KEYRING_H +#define _NVME_KEYRING_H + +#ifdef CONFIG_NVME_KEYRING + +key_serial_t nvme_keyring_id(void); +int nvme_keyring_init(void); +void nvme_keyring_exit(void); + +#else + +static inline key_serial_t nvme_keyring_id(void) +{ + return 0; +} +static inline int nvme_keyring_init(void) +{ + return 0; +} +static inline void nvme_keyring_exit(void) {} + +#endif /* !CONFIG_NVME_KEYRING */ +#endif /* _NVME_KEYRING_H */ |