From: gjoyce@linux.vnet.ibm.com
To: linux-block@vger.kernel.org, axboe@kernel.dk
Cc: gjoyce@linux.vnet.ibm.com, nayna@linux.ibm.com,
ndesaulniers@google.com, nathan@kernel.org, okozina@redhat.com,
jarkko@kernel.org, jonathan.derrick@linux.dev,
brking@linux.vnet.ibm.com, akpm@linux-foundation.org,
msuchanek@suse.de, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v8 1/3] block:sed-opal: SED Opal keystore
Date: Wed, 4 Oct 2023 15:19:55 -0500 [thread overview]
Message-ID: <20231004201957.1451669-2-gjoyce@linux.vnet.ibm.com> (raw)
In-Reply-To: <20231004201957.1451669-1-gjoyce@linux.vnet.ibm.com>
From: Greg Joyce <gjoyce@linux.vnet.ibm.com>
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>
---
include/linux/sed-opal-key.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 include/linux/sed-opal-key.h
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
--
gjoyce@linux.vnet.ibm.com
next prev parent reply other threads:[~2023-10-04 20:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 20:19 [PATCH v8 0/3] generic and PowerPC SED Opal keystore gjoyce
2023-10-04 20:19 ` gjoyce [this message]
2023-10-04 20:19 ` [PATCH v8 2/3] block: sed-opal: keystore access for SED Opal keys gjoyce
2023-10-04 20:19 ` [PATCH v8 3/3] powerpc/pseries: PLPKS SED Opal keystore support gjoyce
2023-10-17 15:09 ` [PATCH v8 0/3] generic and PowerPC SED Opal keystore Greg Joyce
2023-10-17 15:24 ` Jens Axboe
2023-10-17 15:24 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231004201957.1451669-2-gjoyce@linux.vnet.ibm.com \
--to=gjoyce@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=brking@linux.vnet.ibm.com \
--cc=jarkko@kernel.org \
--cc=jonathan.derrick@linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=msuchanek@suse.de \
--cc=nathan@kernel.org \
--cc=nayna@linux.ibm.com \
--cc=ndesaulniers@google.com \
--cc=okozina@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).