summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_msgtype50.h
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2021-11-23 15:16:06 +0100
committerVasily Gorbik <gor@linux.ibm.com>2022-03-08 00:33:00 +0100
commit383366b58016361cc8a2e4c585b7d581eb76263a (patch)
tree731cfe3ac5e86aa6017e05c44ce07b0d309093f0 /drivers/s390/crypto/zcrypt_msgtype50.h
parenta7e701dba1234adbfbacad5ce19656c5606728da (diff)
downloadlinux-383366b58016361cc8a2e4c585b7d581eb76263a.tar.bz2
s390/zcrypt: Support CPRB minor version T7
There is a new CPRB minor version T7 to be supported with this patch. Together with this the functions which extract the CPRB data from userspace and prepare the AP message do now check the CPRB minor version and provide some info in the flag field of the ap message struct for further processing. The 3 functions doing this job have been renamed to prep_cca_ap_msg, prep_ep11_ap_msg and prep_rng_ap_msg to reflect their job better (old was get..fc). This patch also introduces two new flags to be used internal with the flag field of the struct ap_message: AP_MSG_FLAG_USAGE is set when prep_cca_ap_msg or prep_ep11_ap_msg come to the conclusion that this is a ordinary crypto load CPRB (which means T2 for CCA CPRBs and no admin bit for EP11 CPRBs). AP_MSG_FLAG_ADMIN is set when prep_cca_ap_msg or prep_ep11_ap_msg think, this is an administrative (control) crypto load CPRB (which means T3, T5, T6 or T7 for CCA CPRBs and admin bit set for EP11 CPRBs). Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Reviewed-by: Jürgen Christ <jchrist@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_msgtype50.h')
-rw-r--r--drivers/s390/crypto/zcrypt_msgtype50.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/crypto/zcrypt_msgtype50.h b/drivers/s390/crypto/zcrypt_msgtype50.h
index 66bec4f45c56..eb49f06bed29 100644
--- a/drivers/s390/crypto/zcrypt_msgtype50.h
+++ b/drivers/s390/crypto/zcrypt_msgtype50.h
@@ -20,8 +20,8 @@
#define MSGTYPE_ADJUSTMENT 0x08 /* type04 extension (not needed in type50) */
-unsigned int get_rsa_modex_fc(struct ica_rsa_modexpo *, int *);
-unsigned int get_rsa_crt_fc(struct ica_rsa_modexpo_crt *, int *);
+int get_rsa_modex_fc(struct ica_rsa_modexpo *mex, int *fc);
+int get_rsa_crt_fc(struct ica_rsa_modexpo_crt *crt, int *fc);
void zcrypt_msgtype50_init(void);
void zcrypt_msgtype50_exit(void);