aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_pcixcc.c
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2009-12-07 06:51:54 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:35 -0500
commit468ffddf19c1417947cac931c240b0d600e4b5bf (patch)
tree94510571f3dcc94b6f61efebc077bfb93047b77d /drivers/s390/crypto/zcrypt_pcixcc.c
parentf4ac1d0255748fe0f8e128a26b1c29490cae5c08 (diff)
[S390] zcrypt: initialize ap_messages for cex3 exploitation
AP messages need to be initialized, before they will be used. Values will be zeroized. This will be needed later when introducing support for the special commands. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_pcixcc.c')
-rw-r--r--drivers/s390/crypto/zcrypt_pcixcc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c
index 5677b40e4ac0..11ca6dc99b23 100644
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -688,6 +688,7 @@ static long zcrypt_pcixcc_modexpo(struct zcrypt_device *zdev,
688 }; 688 };
689 int rc; 689 int rc;
690 690
691 ap_init_message(&ap_msg);
691 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL); 692 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL);
692 if (!ap_msg.message) 693 if (!ap_msg.message)
693 return -ENOMEM; 694 return -ENOMEM;
@@ -727,6 +728,7 @@ static long zcrypt_pcixcc_modexpo_crt(struct zcrypt_device *zdev,
727 }; 728 };
728 int rc; 729 int rc;
729 730
731 ap_init_message(&ap_msg);
730 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL); 732 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL);
731 if (!ap_msg.message) 733 if (!ap_msg.message)
732 return -ENOMEM; 734 return -ENOMEM;
@@ -766,6 +768,7 @@ static long zcrypt_pcixcc_send_cprb(struct zcrypt_device *zdev,
766 }; 768 };
767 int rc; 769 int rc;
768 770
771 ap_init_message(&ap_msg);
769 ap_msg.message = kmalloc(PCIXCC_MAX_XCRB_MESSAGE_SIZE, GFP_KERNEL); 772 ap_msg.message = kmalloc(PCIXCC_MAX_XCRB_MESSAGE_SIZE, GFP_KERNEL);
770 if (!ap_msg.message) 773 if (!ap_msg.message)
771 return -ENOMEM; 774 return -ENOMEM;
@@ -805,6 +808,7 @@ static long zcrypt_pcixcc_rng(struct zcrypt_device *zdev,
805 }; 808 };
806 int rc; 809 int rc;
807 810
811 ap_init_message(&ap_msg);
808 ap_msg.message = kmalloc(PCIXCC_MAX_XCRB_MESSAGE_SIZE, GFP_KERNEL); 812 ap_msg.message = kmalloc(PCIXCC_MAX_XCRB_MESSAGE_SIZE, GFP_KERNEL);
809 if (!ap_msg.message) 813 if (!ap_msg.message)
810 return -ENOMEM; 814 return -ENOMEM;
@@ -972,6 +976,7 @@ static int zcrypt_pcixcc_rng_supported(struct ap_device *ap_dev)
972 } __attribute__((packed)) *reply; 976 } __attribute__((packed)) *reply;
973 int rc, i; 977 int rc, i;
974 978
979 ap_init_message(&ap_msg);
975 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL); 980 ap_msg.message = (void *) get_zeroed_page(GFP_KERNEL);
976 if (!ap_msg.message) 981 if (!ap_msg.message)
977 return -ENOMEM; 982 return -ENOMEM;