⬢ DragonFlyBSD Kernel Audit
DF-4758 / fix_run.log
← back to finding ↓ download raw
# DF-4758 fix validation (module rebuilt with fix.diff, v1; the vinumsize
# hunk is byte-identical in the final v2 fix.diff shipped in this pack).
# Guest rebuilt from clean-source snapshot 2026-09-23, vinum.ko rebuilt
# standalone (make in /usr/src/sys/dev/raid/vinum, BUILD_RC=0), installed
# to /boot/kernel/vinum.ko, kldload'ed.
# Same config as baseline: volume v0 (6144 kB), plex p0 concat, 6 subdisks
# s0..s5 (1024 kB each), volumes_allocated == 4.

$ vinum l
1 drives:
D d1                    State: up  Device /dev/md0s0a  Avail: 3/9 MB (37%)
1 volumes:
V v0                    State: up  Plexes:       1  Size:       6144 kB
1 plexes:
P p0                  C State: up  Subdisks:     6  Size:       6144 kB
6 subdisks: s0..s5 State: up, 1024 kB each

$ /tmp/df4758_swapon /dev/vinum/sd/s0 /dev/vinum/sd/s1 /dev/vinum/sd/s4 /dev/vinum/sd/s5
== swapon(/dev/vinum/sd/s0): FAILED errno=6 (Device not configured)
== swapon(/dev/vinum/sd/s1): FAILED errno=6 (Device not configured)
== swapon(/dev/vinum/sd/s4): FAILED errno=6 (Device not configured)
== swapon(/dev/vinum/sd/s5): FAILED errno=6 (Device not configured)
== swapinfo now:
Device          512-blocks     Used    Avail Capacity  Type
/dev/vbd0s1b       8388608        0  8388608     0%    Interleaved

# BASELINE (same guest image, stock module, same config) for comparison:
# == swapon(/dev/vinum/sd/s0): OK
# == swapon(/dev/vinum/sd/s1): FAILED errno=6 (Device not configured)
# == swapon(/dev/vinum/sd/s4): FAILED errno=6 (Device not configured)
# == swapon(/dev/vinum/sd/s5): FAILED errno=6 (Device not configured)
# swapinfo: /dev/vinum/sd/s0  12288 blocks installed  <-- WRONG (volume size on a subdisk)

# Positive control on the patched module: a real VOLUME device still works.
$ /tmp/df4758_swapon /dev/vinum/vol/v0
== swapon(/dev/vinum/vol/v0): OK
Device          512-blocks     Used    Avail Capacity  Type
/dev/vinum/vol/v0      12288        0    12288     0%    Interleaved
$ swapoff /dev/vinum/vol/v0
swapoff: removing /dev/vinum/vol/v0 as swap device