Page MenuHomeFreeBSD

D31170.diff
No OneTemporary

D31170.diff

diff --git a/sys/geom/eli/g_eli_integrity.c b/sys/geom/eli/g_eli_integrity.c
--- a/sys/geom/eli/g_eli_integrity.c
+++ b/sys/geom/eli/g_eli_integrity.c
@@ -515,6 +515,17 @@
if (bp->bio_cmd == BIO_WRITE)
memset(data + sc->sc_alen + data_secsize, 0,
encr_secsize - sc->sc_alen - data_secsize);
+ } else if (data_secsize + sc->sc_alen != encr_secsize) {
+ /*
+ * If the HMAC size is not a multiple of 128 bits, the
+ * per-sector data size is rounded down to ensure that
+ * encryption can be performed without requiring any
+ * padding. In this case, each sector contains unused
+ * bytes.
+ */
+ if (bp->bio_cmd == BIO_WRITE)
+ memset(data + sc->sc_alen + data_secsize, 0,
+ encr_secsize - sc->sc_alen - data_secsize);
}
if (bp->bio_cmd == BIO_WRITE) {

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 13, 7:48 AM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15779379
Default Alt Text
D31170.diff (812 B)

Event Timeline