diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2025-04-24 15:36:06 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2025-04-30 11:34:01 +0200 |
commit | 2845ad7466af7d2ee218ddbe2896c7c5532b9f73 (patch) | |
tree | dd9ecaa87ce9f693bec753c29924a7ab717e6a1e /drivers/s390/crypto/zcrypt_ccamisc.h | |
parent | 02383ef93e09734f002c788dcf54e0874ccb305c (diff) |
s390/zcrypt: Remove CCA and EP11 card and domain info caches
Remove the caching of the CCA and EP11 card and domain info.
In nearly all places where the card or domain info is fetched
the verify param was enabled and thus the cache was bypassed.
The only real place where info from the cache was used was
in the sysfs pseudo files in cases where the card/queue was
switched to "offline". All other callers insisted on getting
fresh info and thus a communication to the card was enforced.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Link: https://lore.kernel.org/r/20250424133619.16495-13-freude@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_ccamisc.h')
-rw-r--r-- | drivers/s390/crypto/zcrypt_ccamisc.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/s390/crypto/zcrypt_ccamisc.h b/drivers/s390/crypto/zcrypt_ccamisc.h index 0662fe39e425..cc7d362a2bad 100644 --- a/drivers/s390/crypto/zcrypt_ccamisc.h +++ b/drivers/s390/crypto/zcrypt_ccamisc.h @@ -215,9 +215,6 @@ int cca_query_crypto_facility(u16 cardnr, u16 domain, * - if minhwtype > 0 only apqns with hwtype >= minhwtype * - if cur_mkvp != 0 only apqns where cur_mkvp == mkvp * - if old_mkvp != 0 only apqns where old_mkvp == mkvp - * - if verify is enabled and a cur_mkvp and/or old_mkvp - * value is given, then refetch the cca_info and make sure the current - * cur_mkvp or old_mkvp values of the apqn are used. * The mktype determines which set of master keys to use: * 0 = AES_MK_SET - AES MK set, 1 = APKA MK_SET - APKA MK set * The array of apqn entries is allocated with kmalloc and returned in *apqns; @@ -228,8 +225,7 @@ int cca_query_crypto_facility(u16 cardnr, u16 domain, * -ENODEV is returned. */ int cca_findcard2(u32 **apqns, u32 *nr_apqns, u16 cardnr, u16 domain, - int minhwtype, int mktype, u64 cur_mkvp, u64 old_mkvp, - int verify); + int minhwtype, int mktype, u64 cur_mkvp, u64 old_mkvp); #define AES_MK_SET 0 #define APKA_MK_SET 1 @@ -261,7 +257,7 @@ struct cca_info { /* * Fetch cca information about an CCA queue. */ -int cca_get_info(u16 card, u16 dom, struct cca_info *ci, int verify); +int cca_get_info(u16 card, u16 dom, struct cca_info *ci); int zcrypt_ccamisc_init(void); void zcrypt_ccamisc_exit(void); |