Hi!

Surprised by seeing streaks of zeros every 4k on my geli encrypted drive, I 
realized they are zero-padded sectors (i.e. the 9th sector underlying every 
encrypted 4K). I was wondering if it’d be a good idea to do this instead:

[freebsd .../geom/eli]$ svn diff
Index: g_eli_integrity.c
===================================================================
--- g_eli_integrity.c   (revision 343023)
+++ g_eli_integrity.c   (working copy)
@@ -472,7 +472,7 @@
                         * only partially filled.
                         */
                        if (bp->bio_cmd == BIO_WRITE)
-                               memset(data + sc->sc_alen + data_secsize, 0,
+                               arc4random_buf(data + sc->sc_alen + 
data_secsize,
                                    encr_secsize - sc->sc_alen - data_secsize);
                }

[freebsd .../geom/eli]$

Thanks!

— Arjan

_______________________________________________
freebsd-geom@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscr...@freebsd.org"

Reply via email to