diff options
author | Andrew Donnellan <ajd@linux.ibm.com> | 2023-02-10 11:03:36 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-02-12 14:12:36 +0300 |
commit | f74dcbfd27c647af9b7b83f3711c63712c677abd (patch) | |
tree | 17289769689d7030704977ca57ccf3bfa568b247 /arch/riscv/include | |
parent | fc8a898cfdbb0e63cfde547715c2031de22e7893 (diff) | |
download | linux-f74dcbfd27c647af9b7b83f3711c63712c677abd.tar.xz |
powerpc/pseries: Fix handling of PLPKS object flushing timeout
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 <bgray@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Tested-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-2-ajd@linux.ibm.com
Diffstat (limited to 'arch/riscv/include')
0 files changed, 0 insertions, 0 deletions