Re: [PATCH 1/4] powerpc/pseries: Fix handling of PLPKS object flushing timeout

From
Russell Currey <hidden>
Date
2023-01-04 03:47:04
Reply to
Andrew Donnellan, 2022-12-20
On Tue, 2022-12-20 at 18:16 +1100, Andrew Donnellan wrote:
plpks_confirm_object_flushed() uses the H_PKS_CONFIRM_OBJECT_FLUSHED
hcall
to check whether changes to an object in the Platform KeyStore have
been
flushed to non-volatile storage.

The hcall returns two output values, the return code and the flush
status.
plpks_confirm_object_flushed() polls the hcall until either the flush
status has updated, the return code is an error, or a timeout has
been
exceeded.

While we're still polling, the hcall is returning H_SUCCESS (0) as
the
return code. In the timeout case, this means that upon exiting the
polling
loop, rc is 0, and therefore 0 is returned to the user.

Handle the timeout case separately and return ETIMEDOUT if triggered.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform
KeyStore")
Reported-by: Benjamin Gray <redacted>
Signed-off-by: Andrew Donnellan <redacted>
Tested-by: Russell Currey <redacted>
Reviewed-by: Russell Currey <redacted>
Thread (13 messages) 13 messages, 3 authors, last reply 2023-01-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help