aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_bus.h
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/ap_bus.h
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/ap_bus.h')
-rw-r--r--drivers/s390/crypto/ap_bus.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h
index a35362241805..fcf2497556dd 100644
--- a/drivers/s390/crypto/ap_bus.h
+++ b/drivers/s390/crypto/ap_bus.h
@@ -167,6 +167,17 @@ struct ap_message {
167 .dev_type=(dt), \ 167 .dev_type=(dt), \
168 .match_flags=AP_DEVICE_ID_MATCH_DEVICE_TYPE, 168 .match_flags=AP_DEVICE_ID_MATCH_DEVICE_TYPE,
169 169
170/**
171 * ap_init_message() - Initialize ap_message.
172 * Initialize a message before using. Otherwise this might result in
173 * unexpected behaviour.
174 */
175static inline void ap_init_message(struct ap_message *ap_msg)
176{
177 ap_msg->psmid = 0;
178 ap_msg->length = 0;
179}
180
170/* 181/*
171 * Note: don't use ap_send/ap_recv after using ap_queue_message 182 * Note: don't use ap_send/ap_recv after using ap_queue_message
172 * for the first time. Otherwise the ap message queue will get 183 * for the first time. Otherwise the ap message queue will get