s390/zcrypt: fix wrong offset index for APKA master key valid state
authorHarald Freudenberger <freude@linux.ibm.com>
Fri, 6 Aug 2021 10:02:00 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:26 +0000 (09:50 +0200)
commitcf619a528e010fb6017a45bf8af275110d62d53b
tree6c735e45996df01505f3861bf245e35c651a0c24
parentb4aa00bf8a4dec0f646bec2663f6910fffae6f44
s390/zcrypt: fix wrong offset index for APKA master key valid state

[ Upstream commit 8617bb74006252cb2286008afe7d6575a6425857 ]

Tests showed a mismatch between what the CCA tool reports about
the APKA master key state and what's displayed by the zcrypt dd
in sysfs. After some investigation, we found out that the
documentation which was the source for the zcrypt dd implementation
lacks the listing of 3 fields. So this patch now moves the
evaluation of the APKA master key state to the correct offset.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/s390/crypto/zcrypt_ccamisc.c