Re: [PATCH 1/3] powerpc/pseries: Correct secvar format representation for static key management
From: Srish Srinivasan <ssrish@linux.ibm.com>
Date: 2025-05-12 10:16:52
Also in:
linux-integrity, lkml
From: Srish Srinivasan <ssrish@linux.ibm.com>
Date: 2025-05-12 10:16:52
Also in:
linux-integrity, lkml
On 5/12/25 3:25 PM, Andrew Donnellan wrote:
On Wed, 2025-05-07 at 00:29 +0530, Srish Srinivasan wrote:quoted
quoted
I think you should handle this as the existing code does: if it's ENOENT, return 0, and for other codes print an error and return - EIO.Currently, the other layers in the boot stack assume static key mode for any failure in reading SB_VERSION. We added the same interpretation in the kernel to keep it consistent with the other layers, and represent the same to the user. This is the reason for not parsing the error codes when trying to read SB_VERSION, and defaulting to the static key management mode. However, we want the exact error code to be logged for debugging purposes. And, it does make sense to have logging only for error codes other than -ENOENT and -EPERM, as you suggested. Does this sound okay?Okay, maybe document explicitly in a comment that we default to static mode in the event of any weird errors.
Sure, will do that. Thank You.