Skip to content

Commit 96ff37c

Browse files
Greg Joyceaxboe
authored andcommitted
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>
1 parent b4e1353 commit 96ff37c

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

include/linux/sed-opal-key.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* SED key operations.
4+
*
5+
* Copyright (C) 2023 IBM Corporation
6+
*
7+
* These are the accessor functions (read/write) for SED Opal
8+
* keys. Specific keystores can provide overrides.
9+
*
10+
*/
11+
12+
#include <linux/kernel.h>
13+
14+
#ifdef CONFIG_PSERIES_PLPKS_SED
15+
int sed_read_key(char *keyname, char *key, u_int *keylen);
16+
int sed_write_key(char *keyname, char *key, u_int keylen);
17+
#else
18+
static inline
19+
int sed_read_key(char *keyname, char *key, u_int *keylen) {
20+
return -EOPNOTSUPP;
21+
}
22+
static inline
23+
int sed_write_key(char *keyname, char *key, u_int keylen) {
24+
return -EOPNOTSUPP;
25+
}
26+
#endif

0 commit comments

Comments
 (0)