commit - 3a15e1807a369c0a7827363eca22c9f1a8598d9c
commit + 405e89a6da28edc7555666affbad86a823e2c460
blob - 52a26087ac130f45f285e35835bbe2e9f057e458
blob + 6b255ecbe78e35dde4d9e6fc4b74e36d8d89646b
--- test/expect.arraylist_test
+++ test/expect.arraylist_test
+==== run-regress-arraylist_test ====
(0 items)
(1 items)
clear:
(0 items)
+
blob - 9d083f161b0fd36d88753bff7631930a8bbf2e74
blob + 93755ac42bd2287b703269c2c515659a9c448ec5
--- test/expect.results_test
+++ test/expect.results_test
+==== run-regress-results_test ====
--- test_minus_after_plus()
[0] same lines L2 R2 @L 0 @R 0
[1] minus lines L3 R0 @L 2 @R 2
[2] plus lines L0 R3 @L 5 @R 2
[3] same lines L2 R2 @L 5 @R 5
+
blob - 0260dddb49db5bd1e6042ecec6c939392ba07ae1
blob + 076ccd4d4a2d0ee371bbd3ebaad60207e97b441b
--- test/expect021.diff
+++ test/expect021.diff
sizeof(sd->mds.mdd_crypto.scr_maskkey));
} else if (bc->bc_key_disk != NODEV) {
/* Read the mask key from the key disk. */
-@@ -248,119 +249,71 @@
+@@ -248,117 +249,69 @@
}
struct sr_crypto_wu *
- crwu->cr_crp->crp_desc = NULL;
-
- return (NULL);
- }
-
+-}
+-
-void
-sr_crypto_wu_put(struct sr_crypto_wu *crwu)
-{
- mtx_enter(&sd->mds.mdd_crypto.scr_mutex);
- TAILQ_INSERT_TAIL(&sd->mds.mdd_crypto.scr_wus, crwu, cr_link);
- mtx_leave(&sd->mds.mdd_crypto.scr_mutex);
--}
--
+ }
+
int
- sr_crypto_get_kdf(struct bioc_createraid *bc, struct sr_discipline *sd)
- {
@@ -386,9 +339,8 @@
if (sizeof(sd->mds.mdd_crypto.scr_meta->scm_kdfhint) <
kdfinfo->genkdf.len)
"softraid", alg);
rv = -1;
goto out;
-@@ -617,6 +569,17 @@
+@@ -615,6 +567,17 @@
+ sr_error(sd->sd_sc, "incorrect key or passphrase");
+ rv = EPERM;
goto out;
- }
-
++ }
++
+ /* Copy new KDF hint to metadata, if supplied. */
+ if (kdfinfo2->flags & SR_CRYPTOKDF_HINT) {
+ if (kdfinfo2->genkdf.len >
+ sizeof(sd->mds.mdd_crypto.scr_meta->scm_kdfhint));
+ memcpy(sd->mds.mdd_crypto.scr_meta->scm_kdfhint,
+ &kdfinfo2->genkdf, kdfinfo2->genkdf.len);
-+ }
-+
+ }
+
/* Mask the disk keys. */
- c = (u_char *)sd->mds.mdd_crypto.scr_meta->scm_key;
- if (sr_crypto_encrypt(p, c, kdfinfo2->maskkey, ksz,
@@ -630,7 +593,7 @@
sizeof(sd->mds.mdd_crypto.scr_key), check_digest);
if (vn && open) {
VOP_CLOSE(vn, FREAD, NOCRED, curproc);
-@@ -952,16 +895,43 @@
- return key_disk;
- }
+@@ -950,18 +893,45 @@
+ }
+ return key_disk;
++}
++
+static void
+sr_crypto_free_sessions(struct sr_discipline *sd)
+{
+ sd->mds.mdd_crypto.scr_sid[i] = (u_int64_t)-1;
+ }
+ }
-+}
-+
+ }
+
int
sr_crypto_alloc_resources(struct sr_discipline *sd)
{
+ DNPRINTF(SR_D_DIS, "%s: sr_crypto_rw wu %p\n",
DEVNAME(wu->swu_dis->sd_sc), wu);
-+ if (sr_validate_io(wu, &blkno, "sr_crypto_rw"))
-+ return (1);
-+
- if (wu->swu_xs->flags & SCSI_DATA_OUT) {
+- if (wu->swu_xs->flags & SCSI_DATA_OUT) {
- crwu = sr_crypto_wu_get(wu, 1);
- if (crwu == NULL)
- return (1);
++ if (sr_validate_io(wu, &blkno, "sr_crypto_rw"))
++ return (1);
++
++ if (wu->swu_xs->flags & SCSI_DATA_OUT) {
+ crwu = sr_crypto_prepare(wu, 1);
crwu->cr_crp->crp_callback = sr_crypto_write;
- s = splvm();
blob - efe355d8849775313a336bb7da180981dcf500e5
blob + c48183f5fa9c6f8efb7c35431b59651387bc841e
--- test/expect104.diff
+++ test/expect104.diff
--- test104.left-P.txt
+++ test104.right-P.txt
-@@ -1,14 +1,14 @@
--void Chunk_copy(Chunk *src, size_t src_start, Chunk *dst, size_t dst_start, size_t n)
--{
-- if (!Chunk_bounds_check(src, src_start, n)) return;
-- if (!Chunk_bounds_check(dst, dst_start, n)) return;
--
-- memcpy(dst->data + dst_start, src->data + src_start, n);
--}
--
- int Chunk_bounds_check(Chunk *chunk, size_t start, size_t n)
- {
- if (chunk == NULL) return 0;
-
- return start <= chunk->length && n <= chunk->length - start;
- }
-+
-+void Chunk_copy(Chunk *src, size_t src_start, Chunk *dst, size_t dst_start, size_t n)
+@@ -1,3 +1,10 @@
++int Chunk_bounds_check(Chunk *chunk, size_t start, size_t n)
+{
-+ if (!Chunk_bounds_check(src, src_start, n)) return;
-+ if (!Chunk_bounds_check(dst, dst_start, n)) return;
++ if (chunk == NULL) return 0;
+
-+ memcpy(dst->data + dst_start, src->data + src_start, n);
++ return start <= chunk->length && n <= chunk->length - start;
+}
++
+ void Chunk_copy(Chunk *src, size_t src_start, Chunk *dst, size_t dst_start, size_t n)
+ {
+ if (!Chunk_bounds_check(src, src_start, n)) return;
+@@ -5,10 +12,3 @@
+
+ memcpy(dst->data + dst_start, src->data + src_start, n);
+ }
+-
+-int Chunk_bounds_check(Chunk *chunk, size_t start, size_t n)
+-{
+- if (chunk == NULL) return 0;
+-
+- return start <= chunk->length && n <= chunk->length - start;
+-}
blob - ef9e04582e1a7dafa426543c5fd8aa840f120230
blob + 82d3b52ee97e395bdee3a254e1d492cd8b558823
--- test/expect105.diff
+++ test/expect105.diff
--- test105.left-P.txt
+++ test105.right-P.txt
@@ -1,7 +1,7 @@
--David Axelrod
--Electric Prunes
--Gil Scott Heron
- The Slits
++The Slits
+Gil Scott Heron
-+David Axelrod
-+Electric Prunes
+ David Axelrod
+ Electric Prunes
+-Gil Scott Heron
+-The Slits
Faust
The Sonics
The Sonics