Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Sep 2014 12:38:15 GMT
From:      John-Mark Gurney <jmg@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 1200830 for review
Message-ID:  <201409261238.s8QCcFdD074783@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@1200830?ac=10

Change 1200830 by jmg@jmg_carbon2 on 2014/09/26 12:38:07

	remove CRYPTO_F_REL flag...  One driver implemented it, but didn't
	do anything different, only one consumer set it, but expected the
	same behavior...  both NetBSD and OpenBSD have similar behaviors...
	
	The normal behavior IS that the data is in the same location...

Affected files ...

.. //depot/projects/opencrypto/share/man/man9/crypto.9#5 edit
.. //depot/projects/opencrypto/sys/geom/eli/g_eli_crypto.c#3 edit
.. //depot/projects/opencrypto/sys/geom/eli/g_eli_integrity.c#3 edit
.. //depot/projects/opencrypto/sys/geom/eli/g_eli_privacy.c#3 edit
.. //depot/projects/opencrypto/sys/mips/rmi/dev/sec/rmisec.c#2 edit
.. //depot/projects/opencrypto/sys/opencrypto/cryptodev.h#10 edit

Differences ...

==== //depot/projects/opencrypto/share/man/man9/crypto.9#5 (text+ko) ====

@@ -304,8 +304,6 @@
 is an
 .Vt uio
 structure.
-.It Dv CRYPTO_F_REL
-Must return data in the same place.
 .It Dv CRYPTO_F_BATCH
 Batch operation if possible.
 .It Dv CRYPTO_F_CBIMM

==== //depot/projects/opencrypto/sys/geom/eli/g_eli_crypto.c#3 (text+ko) ====

@@ -101,7 +101,7 @@
 	crp->crp_opaque = NULL;
 	crp->crp_callback = g_eli_crypto_done;
 	crp->crp_buf = (void *)data;
-	crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
+	crp->crp_flags = CRYPTO_F_CBIFSYNC;
 	crp->crp_desc = crd;
 
 	error = crypto_dispatch(crp);

==== //depot/projects/opencrypto/sys/geom/eli/g_eli_integrity.c#3 (text+ko) ====

@@ -479,7 +479,7 @@
 		crp->crp_opaque = (void *)bp;
 		crp->crp_buf = (void *)data;
 		data += encr_secsize;
-		crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
+		crp->crp_flags = CRYPTO_F_CBIFSYNC;
 		if (g_eli_batch)
 			crp->crp_flags |= CRYPTO_F_BATCH;
 		if (bp->bio_cmd == BIO_WRITE) {

==== //depot/projects/opencrypto/sys/geom/eli/g_eli_privacy.c#3 (text+ko) ====

@@ -286,7 +286,7 @@
 			crp->crp_callback = g_eli_crypto_write_done;
 		else /* if (bp->bio_cmd == BIO_READ) */
 			crp->crp_callback = g_eli_crypto_read_done;
-		crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
+		crp->crp_flags = CRYPTO_F_CBIFSYNC;
 		if (g_eli_batch)
 			crp->crp_flags |= CRYPTO_F_BATCH;
 		crp->crp_desc = crd;

==== //depot/projects/opencrypto/sys/mips/rmi/dev/sec/rmisec.c#2 (text+ko) ====

@@ -423,13 +423,8 @@
 
 	cmd->op.source_buf = (uint64_t) (unsigned long)crp->crp_buf;
 	cmd->op.source_buf_size = crp->crp_ilen;
-	if (crp->crp_flags & CRYPTO_F_REL) {
-		cmd->op.dest_buf = (uint64_t) (unsigned long)crp->crp_buf;
-		cmd->op.dest_buf_size = crp->crp_ilen;
-	} else {
-		cmd->op.dest_buf = (uint64_t) (unsigned long)crp->crp_buf;
-		cmd->op.dest_buf_size = crp->crp_ilen;
-	}
+	cmd->op.dest_buf = (uint64_t) (unsigned long)crp->crp_buf;
+	cmd->op.dest_buf_size = crp->crp_ilen;
 	cmd->op.num_packets = 1;
 	cmd->op.num_fragments = 1;
 

==== //depot/projects/opencrypto/sys/opencrypto/cryptodev.h#10 (text+ko) ====

@@ -368,7 +368,6 @@
 
 #define	CRYPTO_F_IMBUF		0x0001	/* Input/output are mbuf chains */
 #define	CRYPTO_F_IOV		0x0002	/* Input/output are uio */
-#define	CRYPTO_F_REL		0x0004	/* Must return data in same place */
 #define	CRYPTO_F_BATCH		0x0008	/* Batch op if possible */
 #define	CRYPTO_F_CBIMM		0x0010	/* Do callback immediately */
 #define	CRYPTO_F_DONE		0x0020	/* Operation completed */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409261238.s8QCcFdD074783>