s390/zcrypt: Rework ep11 findcard() implementation and callers
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 24 Apr 2025 13:36:08 +0000 (15:36 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 30 Apr 2025 09:34:02 +0000 (11:34 +0200)
commit8a8832254100e24fd6ba99ce92a62a4964566a29
tree934e0ffe50c11413dbc07e6b533ad8fc93ca74e8
parent95de56ae0db0fb039f3ae3ddfa1a281508fcef4f
s390/zcrypt: Rework ep11 findcard() implementation and callers

Rework the memory usage of the ep11 findcard() implementation:
- findcard does not allocate memory for the list of apqns
  any more.
- the callers are now responsible to provide an array of
  apqns to store the matching apqns into.

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-15-freude@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/pkey_ep11.c
drivers/s390/crypto/zcrypt_ep11misc.c
drivers/s390/crypto/zcrypt_ep11misc.h