aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2006-01-17 14:55:57 -0500
committerSridhar Samudrala <sri@us.ibm.com>2006-01-17 14:55:57 -0500
commit313e7b4d2588539e388d31c1febd50503a0083fc (patch)
treeaa39d488fbb9f3ad48afdec3ef48b49f6fb4a197 /include/net
parent8116ffad4180b39d7a755345c1fde09da83930c0 (diff)
[SCTP]: Fix machine check/connection hang on IA64.
sctp_unpack_cookie used an on-stack array called digest as a result/out parameter in the call to crypto_hmac. However, hmac code (crypto_hmac_final) assumes that the 'out' argument is in virtual memory (identity mapped region) and can use virt_to_page call on it. This does not work with the on-stack declared digest. The problems observed so far have been: a) incorrect hmac digest b) machine check and hardware reset. Solution is to define the digest in an identity mapped region by kmalloc'ing it. We can do this once as part of the endpoint structure and re-use it when verifying the SCTP cookie. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sctp/structs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ad3d15cb0a0d..8c522ae031bb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1250,6 +1250,14 @@ struct sctp_endpoint {
1250 int last_key; 1250 int last_key;
1251 int key_changed_at; 1251 int key_changed_at;
1252 1252
1253 /* digest: This is a digest of the sctp cookie. This field is
1254 * only used on the receive path when we try to validate
1255 * that the cookie has not been tampered with. We put
1256 * this here so we pre-allocate this once and can re-use
1257 * on every receive.
1258 */
1259 __u8 digest[SCTP_SIGNATURE_SIZE];
1260
1253 /* sendbuf acct. policy. */ 1261 /* sendbuf acct. policy. */
1254 __u32 sndbuf_policy; 1262 __u32 sndbuf_policy;
1255 1263