diff options
author | Felix Beck <felix.beck@de.ibm.com> | 2009-12-07 12:51:55 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 12:51:35 +0100 |
commit | a6a5d73a56540b5e59dff83bc8f2b2725591346a (patch) | |
tree | 84a293aa41b9326cebcc38afc069d839b76da2f7 /drivers/s390/crypto/zcrypt_pcixcc.c | |
parent | 468ffddf19c1417947cac931c240b0d600e4b5bf (diff) | |
download | lwn-a6a5d73a56540b5e59dff83bc8f2b2725591346a.tar.gz lwn-a6a5d73a56540b5e59dff83bc8f2b2725591346a.zip |
[S390] zcrypt: special command support for cex3 exploitation
Support for special command is implemented in the AP Bus in the NQAP
function __ap_send. This is extended for a further parameter special.
When set, the special bit, in GR0 will be set. Therefor the ap_message
struct is extended for a further bit. Thus calling functions of
__ap_send can use the special parameter in ap_message to give to
__ap_send. Affected is in the first place ap_queue_message, which is
called by the actual card driver. The second part of this support is
that the card driver for the CEX3C needs to set this special bit, when
an according CPRB is sent to the driver.
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_pcixcc.c b/drivers/s390/crypto/zcrypt_pcixcc.c index 11ca6dc99b23..addaaddaf994 100644 --- a/drivers/s390/crypto/zcrypt_pcixcc.c +++ b/drivers/s390/crypto/zcrypt_pcixcc.c @@ -326,6 +326,11 @@ static int XCRB_msg_to_type6CPRB_msgX(struct zcrypt_device *zdev, function_code = ((unsigned char *)&msg->cprbx) + msg->cprbx.cprb_len; memcpy(msg->hdr.function_code, function_code, sizeof(msg->hdr.function_code)); + if (memcmp(function_code, "US", 2) == 0) + ap_msg->special = 1; + else + ap_msg->special = 0; + /* copy data block */ if (xcRB->request_data_length && copy_from_user(req_data, xcRB->request_data_address, |