On 23/02/2025 10:54, Harald Freudenberger wrote: > Introduce a cprb mempool for zcrypt ep11 misc functions > (zcrpyt_ep11misc.*) and do some preparation rework to > support a do-not-allocate memory path through some > zcrypt ep11 misc functions. > > This is only part one of a rework to support a new xflag > ZCRYPT_XFLAG_NOMEMALLOC but not jet complete. typo: yet See my comment below. Beside that and the typos, it looks good to me. Reviewed-by: Holger Dengler <dengler@xxxxxxxxxxxxx> > > Signed-off-by: Harald Freudenberger <freude@xxxxxxxxxxxxx> > --- > drivers/s390/crypto/zcrypt_api.c | 6 + > drivers/s390/crypto/zcrypt_ep11misc.c | 159 ++++++++++++++++---------- > drivers/s390/crypto/zcrypt_ep11misc.h | 1 + > 3 files changed, 105 insertions(+), 61 deletions(-) > [...] > diff --git a/drivers/s390/crypto/zcrypt_ep11misc.c b/drivers/s390/crypto/zcrypt_ep11misc.c > index b60e262bcaa3..3d96bd236c16 100644 > --- a/drivers/s390/crypto/zcrypt_ep11misc.c > +++ b/drivers/s390/crypto/zcrypt_ep11misc.c [...] > @@ -30,6 +31,15 @@ > static const u8 def_iv[16] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, > 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; > > +/* > + * Cprb memory pool held for urgend cases where no memory typo: urgent > + * can be allocated via kmalloc. This pool is only used when > + * alloc_cprbmem() is called with the xflag ZCRYPT_XFLAG_NOMEMALLOC. > + */ > +#define CPRB_MEMPOOL_MIN_ITEMS 8 Same here as in the previous patch: number of items as module parameter (with default 4). > +#define CPRB_MEMPOOL_ITEM_SIZE (8 * 1024) > +static mempool_t *cprb_mempool; > + > /* ep11 card info cache */ > struct card_list_entry { > struct list_head list; [...] -- Mit freundlichen Grüßen / Kind regards Holger Dengler -- IBM Systems, Linux on IBM Z Development dengler@xxxxxxxxxxxxx