DragonFlyBSD Kernel Audit
DF-3006 / run.log
← back to finding ↓ download raw
== DF-3006 run (guest, root) — full output of `sh /tmp/leak3006.sh 300` ==
== baseline M_DEVFS usage ==
              devfs     888    130K       0    390M      903
== running 300 iterations (with DEVFS_RULE_RESET => double decrement) ==
== M_DEVFS usage after bugged loop ==
              devfs   1.66K    251K       0    390M     120K
== control: 300 iterations WITHOUT reset ==
== M_DEVFS usage after control loop ==
              devfs   1.65K    249K       0    390M     239K

# vmstat -m columns: Zone? name in-use(K?) ... (DF vmstat -m: name, requests?) — the
# relevant figures are column 2 (# allocations in use) and column 3 (memory in use):
#   888 -> 1.66K allocations, 130K -> 251K bytes  (+~780 allocs, +121K) with RESET
#   251K -> 249K (flat/slightly down) without RESET (control)
# => ~400 bytes leaked per mount+RULE_RESET+umount cycle: the rule-linked target
#    devfs_node (never objcache_put due to DEVFS_NLINKSWAIT with nlinks == (size_t)-1)
#    plus its d_name kmalloc.