svn commit: r328361 - head/sys/dev/cxgbe/crypto

John Baldwin jhb at FreeBSD.org
Wed Jan 24 20:16:49 UTC 2018


Author: jhb
Date: Wed Jan 24 20:16:48 2018
New Revision: 328361
URL: https://svnweb.freebsd.org/changeset/base/328361

Log:
  Store IV in output buffer in GCM software fallback when requested.
  
  Properly honor the lack of the CRD_F_IV_PRESENT flag in the GCM
  software fallback case for encryption requests.
  
  Submitted by:	Harsh Jain @ Chelsio
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/crypto/t4_crypto.c

Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c
==============================================================================
--- head/sys/dev/cxgbe/crypto/t4_crypto.c	Wed Jan 24 20:15:49 2018	(r328360)
+++ head/sys/dev/cxgbe/crypto/t4_crypto.c	Wed Jan 24 20:16:48 2018	(r328361)
@@ -1467,6 +1467,9 @@ ccr_gcm_soft(struct ccr_session *s, struct cryptop *cr
 			memcpy(iv, crde->crd_iv, 12);
 		else
 			arc4rand(iv, 12, 0);
+		if ((crde->crd_flags & CRD_F_IV_PRESENT) == 0)
+			crypto_copyback(crp->crp_flags, crp->crp_buf,
+			    crde->crd_inject, 12, iv);
 	} else {
 		if (crde->crd_flags & CRD_F_IV_EXPLICIT)
 			memcpy(iv, crde->crd_iv, 12);


More information about the svn-src-head mailing list