linux-stable/arch/s390/crypto
Harald Freudenberger 7bbe449d0b s390/paes: Reestablish retry loop in paes
With commit ed6776c96c ("s390/crypto: remove retry
loop with sleep from PAES pkey invocation") the retry
loop to retry derivation of a protected key from a
secure key has been removed. This was based on the
assumption that theses retries are not needed any
more as proper retries are done in the zcrypt layer.

However, tests have revealed that there exist some
cases with master key change in the HSM and immediately
(< 1 second) attempt to derive a protected key from a
secure key with exact this HSM may eventually fail.

The low level functions in zcrypt_ccamisc.c and
zcrypt_ep11misc.c detect and report this temporary
failure and report it to the caller as -EBUSY. The
re-established retry loop in the paes implementation
catches exactly this -EBUSY and eventually may run
some retries.

Fixes: ed6776c96c ("s390/crypto: remove retry loop with sleep from PAES pkey invocation")
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2024-05-01 11:52:54 +02:00
..
Kconfig crypto: Kconfig - simplify cipher entries 2022-08-26 18:50:43 +08:00
Makefile random: remove CONFIG_ARCH_RANDOM 2022-07-18 15:03:37 +02:00
aes_s390.c crypto: s390/aes - Fix buffer overread in CTR mode 2023-12-08 11:59:45 +08:00
arch_random.c s390/archrandom: add missing header include 2023-01-10 14:39:08 +01:00
chacha-glue.c s390/fpu: decrease stack usage for some cases 2024-02-16 14:30:16 +01:00
chacha-s390.S s390/fpu: move, rename, and merge header files 2024-02-16 14:30:14 +01:00
chacha-s390.h s390/crypto: add SIMD implementation for ChaCha20 2021-12-06 14:42:24 +01:00
crc32-vx.c s390/crc32le: convert to C 2024-02-16 14:30:18 +01:00
crc32-vx.h s390/crc32le: convert to C 2024-02-16 14:30:18 +01:00
crc32be-vx.c s390/crc32be: convert to C 2024-02-16 14:30:18 +01:00
crc32le-vx.c s390/crc32le: convert to C 2024-02-16 14:30:18 +01:00
des_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
ghash_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
paes_s390.c s390/paes: Reestablish retry loop in paes 2024-05-01 11:52:54 +02:00
prng.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha.h crypto: sha - split sha.h into sha1.h and sha2.h 2020-11-20 14:45:33 +11:00
sha1_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha3_256_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha3_512_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha256_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha512_s390.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
sha_common.c s390/crypto: Fix unsigned variable compared with zero 2019-11-20 12:58:12 +01:00