[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CQ064REW0ZEO.1LUHVNN78TBRJ@bobo>
Date: Tue, 24 Jan 2023 15:24:25 +1000
From: "Nicholas Piggin" <npiggin@...il.com>
To: "Andrew Donnellan" <ajd@...ux.ibm.com>,
<linuxppc-dev@...ts.ozlabs.org>, <linux-integrity@...r.kernel.org>
Cc: <sudhakar@...ux.ibm.com>, <bgray@...ux.ibm.com>,
<erichte@...ux.ibm.com>, <gregkh@...uxfoundation.org>,
<nayna@...ux.ibm.com>, <linux-kernel@...r.kernel.org>,
<zohar@...ux.ibm.com>, <gjoyce@...ux.ibm.com>, <ruscur@...sell.cc>,
<gcwilson@...ux.ibm.com>, <joel@....id.au>
Subject: Re: [PATCH v4 24/24] integrity/powerpc: Support loading keys from
pseries secvar
On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote:
> From: Russell Currey <ruscur@...sell.cc>
>
> The secvar object format is only in the device tree under powernv.
> We now have an API call to retrieve it in a generic way, so we should
> use that instead of having to handle the DT here.
>
> Add support for pseries secvar, with the "ibm,plpks-sb-v1" format.
> The object format is expected to be the same, so there shouldn't be any
> functional differences between objects retrieved from powernv and
> pseries.
>
> Signed-off-by: Russell Currey <ruscur@...sell.cc>
> Signed-off-by: Andrew Donnellan <ajd@...ux.ibm.com>
>
> ---
>
> v3: New patch
>
> v4: Pass format buffer size (stefanb, npiggin)
> ---
> .../integrity/platform_certs/load_powerpc.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/security/integrity/platform_certs/load_powerpc.c b/security/integrity/platform_certs/load_powerpc.c
> index dee51606d5f4..d4ce91bf3fec 100644
> --- a/security/integrity/platform_certs/load_powerpc.c
> +++ b/security/integrity/platform_certs/load_powerpc.c
> @@ -10,7 +10,6 @@
> #include <linux/cred.h>
> #include <linux/err.h>
> #include <linux/slab.h>
> -#include <linux/of.h>
> #include <asm/secure_boot.h>
> #include <asm/secvar.h>
> #include "keyring_handler.h"
> @@ -59,16 +58,22 @@ static int __init load_powerpc_certs(void)
> void *db = NULL, *dbx = NULL;
> u64 dbsize = 0, dbxsize = 0;
> int rc = 0;
> - struct device_node *node;
> + ssize_t len;
> + char buf[32];
>
> if (!secvar_ops)
> return -ENODEV;
>
> - /* The following only applies for the edk2-compat backend. */
> - node = of_find_compatible_node(NULL, NULL, "ibm,edk2-compat-v1");
> - if (!node)
> + len = secvar_ops->format(buf, 32);
sizeof(buf)?
Thanks,
Nick
Powered by blists - more mailing lists