s390/pkey: Rework and split PKEY kernel module code
authorHarald Freudenberger <freude@linux.ibm.com>
Thu, 22 Aug 2024 09:32:17 +0000 (11:32 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 29 Aug 2024 20:56:33 +0000 (22:56 +0200)
commit86fbf5e2a0ca58f10261a264ee25bf2a936ee5d2
tree371716c4033868aa5a3dd4b08db0b32b2388b253
parent7344eea1b30253d4fade26b255b578ec8eaf0853
s390/pkey: Rework and split PKEY kernel module code

This is a huge rework of all the pkey kernel module code.
The goal is to split the code into individual parts with
a dedicated calling interface:
- move all the sysfs related code into pkey_sysfs.c
- all the CCA related code goes to pkey_cca.c
- the EP11 stuff has been moved to pkey_ep11.c
- the PCKMO related code is now in pkey_pckmo.c

The CCA, EP11 and PCKMO code may be seen as "handlers" with
a similar calling interface. The new header file pkey_base.h
declares this calling interface. The remaining code in
pkey_api.c handles the ioctl, the pkey module things and the
"handler" independent code on top of the calling interface
invoking the handlers.

This regrouping of the code will be the base for a real
pkey kernel module split into a pkey base module which acts
as a dispatcher and handler modules providing their service.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
13 files changed:
arch/s390/crypto/paes_s390.c
arch/s390/include/asm/pkey.h
drivers/s390/crypto/Makefile
drivers/s390/crypto/pkey_api.c
drivers/s390/crypto/pkey_base.h [new file with mode: 0644]
drivers/s390/crypto/pkey_cca.c [new file with mode: 0644]
drivers/s390/crypto/pkey_ep11.c [new file with mode: 0644]
drivers/s390/crypto/pkey_pckmo.c [new file with mode: 0644]
drivers/s390/crypto/pkey_sysfs.c [new file with mode: 0644]
drivers/s390/crypto/zcrypt_ccamisc.c
drivers/s390/crypto/zcrypt_ccamisc.h
drivers/s390/crypto/zcrypt_ep11misc.c
drivers/s390/crypto/zcrypt_ep11misc.h