Commit dbed23db authored by Harald Freudenberger's avatar Harald Freudenberger Committed by Martin Schwidefsky

s390/zcrypt: Add some debug messages on failure.

Added some dbf debug messages on failure of the most important
ioctl calls. These messages are only enabled with dbf level
6 (debug) and so do not affect the normal operating mode which
uses level 3 (errors and higher).
Signed-off-by: default avatarHarald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent bf10b668
...@@ -821,8 +821,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -821,8 +821,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
do { do {
rc = zcrypt_rsa_modexpo(&mex); rc = zcrypt_rsa_modexpo(&mex);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) if (rc) {
ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSAMODEXPO rc=%d", rc);
return rc; return rc;
}
return put_user(mex.outputdatalength, &umex->outputdatalength); return put_user(mex.outputdatalength, &umex->outputdatalength);
} }
case ICARSACRT: { case ICARSACRT: {
...@@ -838,8 +840,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -838,8 +840,10 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
do { do {
rc = zcrypt_rsa_crt(&crt); rc = zcrypt_rsa_crt(&crt);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc) if (rc) {
ZCRYPT_DBF(DBF_DEBUG, "ioctl ICARSACRT rc=%d", rc);
return rc; return rc;
}
return put_user(crt.outputdatalength, &ucrt->outputdatalength); return put_user(crt.outputdatalength, &ucrt->outputdatalength);
} }
case ZSECSENDCPRB: { case ZSECSENDCPRB: {
...@@ -855,6 +859,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -855,6 +859,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
do { do {
rc = zcrypt_send_cprb(&xcRB); rc = zcrypt_send_cprb(&xcRB);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc)
ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDCPRB rc=%d", rc);
if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB))) if (copy_to_user(uxcRB, &xcRB, sizeof(xcRB)))
return -EFAULT; return -EFAULT;
return rc; return rc;
...@@ -872,6 +878,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd, ...@@ -872,6 +878,8 @@ static long zcrypt_unlocked_ioctl(struct file *filp, unsigned int cmd,
do { do {
rc = zcrypt_send_ep11_cprb(&xcrb); rc = zcrypt_send_ep11_cprb(&xcrb);
} while (rc == -EAGAIN); } while (rc == -EAGAIN);
if (rc)
ZCRYPT_DBF(DBF_DEBUG, "ioctl ZSENDEP11CPRB rc=%d", rc);
if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb))) if (copy_to_user(uxcrb, &xcrb, sizeof(xcrb)))
return -EFAULT; return -EFAULT;
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment