diff options
author | Greg Joyce <gjoyce@linux.vnet.ibm.com> | 2023-10-04 15:19:55 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-10-17 09:10:06 -0600 |
commit | 96ff37ceb203426b1bcebbae42399686110b0130 (patch) | |
tree | 5258a3b0aabfe3d3659a6adb762255c65648ab81 | |
parent | b4e1353f465147e38b2cd5086d0c20b77dfc61ec (diff) |
block:sed-opal: SED Opal keystore
Add read and write functions that allow SED Opal keys to stored
in a permanent keystore.
Signed-off-by: Greg Joyce <gjoyce@linux.vnet.ibm.com>
Reviewed-by: Jonathan Derrick <jonathan.derrick@linux.dev>
Link: https://lore.kernel.org/r/20231004201957.1451669-2-gjoyce@linux.vnet.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | include/linux/sed-opal-key.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/sed-opal-key.h b/include/linux/sed-opal-key.h new file mode 100644 index 000000000000..0ca03054e8f6 --- /dev/null +++ b/include/linux/sed-opal-key.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * SED key operations. + * + * Copyright (C) 2023 IBM Corporation + * + * These are the accessor functions (read/write) for SED Opal + * keys. Specific keystores can provide overrides. + * + */ + +#include <linux/kernel.h> + +#ifdef CONFIG_PSERIES_PLPKS_SED +int sed_read_key(char *keyname, char *key, u_int *keylen); +int sed_write_key(char *keyname, char *key, u_int keylen); +#else +static inline +int sed_read_key(char *keyname, char *key, u_int *keylen) { + return -EOPNOTSUPP; +} +static inline +int sed_write_key(char *keyname, char *key, u_int keylen) { + return -EOPNOTSUPP; +} +#endif |