[PATCH 1/3] powerpc/pseries: Correct secvar format representation for static key management

Andrew Donnellan ajd at linux.ibm.com
Wed May 7 16:17:17 AEST 2025


On Wed, 2025-05-07 at 00:29 +0530, Srish Srinivasan wrote:
> > > +	rc = plpks_read_fw_var(&var);
> > > +	if (rc) {
> > > +		pr_info("Error %ld reading SB_VERSION from
> > > firmware\n", rc);
> > We need to check for -ENOENT, otherwise this message is going to be
> > printed every time you boot a machine in static mode.
> Yes, I agree with your concern. I just want to add that, as per my 
> understanding, we need to check for both -ENOENT and -EPERM,
> as explained below:
> 
> As per H_PKS_READ_OBJECT semantics described in the PAPR v10.60 
> (https://files.openpower.foundation/s/XFgfMaqLMD5Bcm8),
> 
> * If the object is not world readable, verify that the consumer
> password 
> matches the stored value in the hypervisor. Else return H_AUTHORITY.
> * Verify if the object exists, else return H_NOT_FOUND.
> * Verify if the policy for the object is met, else return
> H_AUTHORITY.
> 
> So, the hypervisor returns H_NOT_FOUND only for the authenticated 
> consumer. For unauthenticated consumers, which is the case here,
> it would return H_AUTHORITY.

We expect SB_VERSION to always be world-readable, I think? In which
case it shouldn't return H_AUTHORITY / -EPERM, ever, and if it does
that's an error which should be handled as an error. Or am I
misinterpreting the spec here?


-- 
Andrew Donnellan    OzLabs, ADL Canberra
ajd at linux.ibm.com   IBM Australia Limited


More information about the Linuxppc-dev mailing list