DF-0875 / fix_run.log
============================================================
DF-0875 FIX VALIDATION — patched kernel (#1, sha256 87ad15e5...)
============================================================
POC: create hammer2 image, newfs, corrupt sroot_blockset.blockref[0].data_off
to 0x004000000000000e (1 PB offset, radix 14), recompute CRC32C, mount.
PATCHED KERNEL RUN (the "after"):
--- patch image ---
copy 0 @0x0: bref[0].type=1 data_off=0x000000000140000a
copy 0: PATCHED data_off=0x004000000000000e ICRC1=73635277 ICRC0=6c269868 ICRCVH=c45a6a2f
patched 1 volume-header copies
1 copies OK, 0 BAD
copy 0: data_off=0x004000000000000e ICRC0 exp=6c269868 got=6c269868 OK | ICRC1 exp=73635277 got=73635277 OK | ICRCVH exp=c45a6a2f got=c45a6a2f OK
--- MOUNT (expect clean error, NO panic) ---
mount: Invalid argument
MOUNT_RC=1
--- GUEST STILL UP? ---
8:54PM up 49 secs, 0 users, load averages: 0.12, 0.04, 0.01
--- dmesg relevant ---
hammer2_ondisk: "/dev/vn0" zone=0 id=0 offset=0x0000000000000000 size=0x0000000010000000
hammer2_get_volume: no volume for offset 0x0040000000000000
hammer2_chain_load_data: I/O error 004000000000000e: 5
hammer2_mount: error I/O Error reading super-root
Second run (determinism):
=== MOUNT RUN 2 ===
mount: Invalid argument
MOUNT_RC=1
8:55PM up 1 min, 0 users, load averages: 0.10, 0.04, 0.01
Regression check (uncorrupted image still mounts + writable):
MOUNT_RC=0
WRITE_OK
============================================================
BEFORE/AFTER CONTRAST
============================================================
BEFORE (unpatched #0, sha256 built Jul 2):
panic: no volume for offset 0x0040000000000000
hammer2_get_volume() at hammer2_get_volume+0x4b
_hammer2_io_getblk() at _hammer2_io_getblk+0x477
_hammer2_io_bread() at _hammer2_io_bread+0x17
hammer2_chain_load_data() at hammer2_chain_load_data+0x2a5
hammer2_chain_lock() at hammer2_chain_lock+0xde
=> kernel panic, guest dead in DDB
AFTER (patched #1, sha256 87ad15e5ea59faa0aec00ace3681bcd92b2c5b19c9b0ff7090db75be657d30a1):
hammer2_get_volume: no volume for offset 0x0040000000000000 (diagnostic kprintf)
hammer2_chain_load_data: I/O error 004000000000000e: 5 (EIO propagated)
hammer2_mount: error I/O Error reading super-root (clean EINVAL)
mount: Invalid argument (MOUNT_RC=1)
=> guest stays UP, no panic, error handled gracefully
=> FIX VALIDATED: panic eliminated, error returned cleanly, no regression.