On Wed, 2025-05-07 at 00:29 +0530, Srish Srinivasan wrote: > > 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. -- Andrew Donnellan OzLabs, ADL Canberra a...@linux.ibm.com IBM Australia Limited