DragonFlyBSD Kernel Audit
DF-3047 / fix_run.txt
← back to finding ↓ download raw
DF-3047 fixed-module re-run (same kernel #0; ext2fs.ko rebuilt with fix.diff
hunks 3+4: reload geometry gate + gd/contigdirs leak fix):

====== DF-3047:
$ /root/vntool attach 0 /root/dev128.img
attached /root/dev128.img size=0
$ mount -t ext2fs -o ro /dev/vn0 /mnt/e2 && echo MOUNT-A-OK
MOUNT-A-OK
$ df -k /mnt/e2 | tail -1
/dev/vn0       63210   14 59920     0%    /mnt/e2          <- imgA, 8 groups
$ cat /root/imgB128.img > /root/dev128.img && echo SWAPPED
SWAPPED
$ /root/reloadtrigger /mnt/e2
mount(MNT_UPDATE|MNT_RELOAD) rc=-1
mount: Invalid argument                             <- geometry gate: rejected
$ ls /mnt/e2 && echo ALIVE
lost+found
ALIVE                                               <- no panic
$ umount /mnt/e2 && echo UMOUNT-CLEAN
UMOUNT-CLEAN                                        <- no OOB free

====== regression-1 pristine RW mount (valid 64MB ext2):
$ mount -t ext2fs /dev/vn0 /mnt/e2 && echo RW-MOUNT-OK
RW-MOUNT-OK
$ echo hello > /mnt/e2/testfile && cat /mnt/e2/testfile
hello
$ umount /mnt/e2 && echo UMOUNT-OK
UMOUNT-OK

====== regression-2 reload with UNCHANGED geometry (post-fsck use case):
$ mount -t ext2fs -o ro /dev/vn0 /mnt/e2 && echo RO-MOUNT-OK
RO-MOUNT-OK
$ /root/reloadtrigger /mnt/e2
mount(MNT_UPDATE|MNT_RELOAD) rc=0                   <- still supported
$ ls /mnt/e2
lost+found testfile                                 <- data intact
$ umount /mnt/e2 && echo CLEAN
CLEAN