⬢ DragonFlyBSD Kernel Audit
DF-2251 / ext2_debugfs_gens.txt
← back to finding ↓ download raw
ext2 image ground truth (debugfs on host, image pulled from guest after
file creation on the BASELINE-pred kernel #2 = 2250-fixed, 2251-unfixed):

ino   Generation (kernel-written i_generation)
12    313637804      <- e1 fh GEN (LE32 at fh[24..28))
13    4255607323     <- e2 fh GEN   (> 2^31: impossible for krandom()/2+1)
14    360528451      <- e3
15    832623794      <- e4
16    464661654      <- e5
17    3965101913     <- e6   (> 2^31)
18    1352873110     <- e7
19    2074281227     <- e8

Values match the NFS filehandles exactly. Source: ext2_alloc.c:449-450
  do { ip->i_gen = karc4random(); } while (ip->i_gen == 0);
i.e. DragonFly ext2 NEW inodes already take their generation from
karc4random(); the krandom() draw at ext2_vfsops.c:1421 only fires when an
inode with on-disk gen==0 is first read (legacy/foreign images).
mke2fs (e2fsprogs) leaves i_generation = 0 (verified on the pristine image),
so the disk-loaded value is 0 until valloc assigns the arc4 gen.