1
0
Fork 0
alistair23-linux/drivers/s390/crypto
Harald Freudenberger b33a103956 s390/pkey: fix paes selftest failure with paes and pkey static build
commit 5b35047eb4 upstream.

When both the paes and the pkey kernel module are statically build
into the kernel, the paes cipher selftests run before the pkey
kernel module is initialized. So a static variable set in the pkey
init function and used in the pkey_clr2protkey function is not
initialized when the paes cipher's selftests request to call pckmo for
transforming a clear key value into a protected key.

This patch moves the initial setup of the static variable into
the function pck_clr2protkey. So it's possible, to use the function
for transforming a clear to a protected key even before the pkey
init function has been called and the paes selftests may run
successful.

Reported-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
Cc: <stable@vger.kernel.org> # 4.20
Fixes: f822ad2c2c ("s390/pkey: move pckmo subfunction available checks away from module init")
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-10 12:37:32 +01:00
..
Makefile
ap_bus.c
ap_bus.h
ap_card.c
ap_debug.h
ap_queue.c
pkey_api.c s390/pkey: fix paes selftest failure with paes and pkey static build 2020-11-10 12:37:32 +01:00
vfio_ap_drv.c
vfio_ap_ops.c
vfio_ap_private.h
zcrypt_api.c
zcrypt_api.h
zcrypt_card.c
zcrypt_cca_key.h
zcrypt_ccamisc.c
zcrypt_ccamisc.h
zcrypt_cex2a.c
zcrypt_cex2a.h
zcrypt_cex2c.c
zcrypt_cex2c.h
zcrypt_cex4.c
zcrypt_cex4.h
zcrypt_debug.h
zcrypt_error.h
zcrypt_msgtype6.c
zcrypt_msgtype6.h
zcrypt_msgtype50.c
zcrypt_msgtype50.h
zcrypt_queue.c