DragonFlyBSD Kernel Audit
DF-0847 / env.txt
← back to finding ↓ download raw
=== guest uname ===
DragonFly dfbsd 6.5-DEVELOPMENT DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026     root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64

=== cc ===
cc 8.3 [DragonFly] Release/2019-02-22

=== vfs.quota_enabled (new VFS quota layer; orthogonal to UFS quotas) ===
vfs.quota_enabled: 0

=== options QUOTA in X86_64_GENERIC (controls UFS quota compilation) ===
0   (absent — only VKERNEL64 and LINT64 carry 'options QUOTA')

=== /mnt/q : transient UFS image mount (root setup; trigger runs unprivileged) ===
/dev/vn0s0 on /mnt/q (ufs, local)

=== nm /boot/kernel/kernel.debug : dquot functions PRESENT but UNREACHABLE ===
ffffffff80916230 T ufs_chkdq
ffffffff80916b80 t ufs_dqget
ffffffff80916af0 T ufs_dqrele
ffffffff809170e0 T ufs_getinoquota
ffffffff809171a0 T ufs_quotaon

  ufs_quota.c is 'optional ffs' (sys/conf/files:1994) so it is compiled
  whenever FFS is — hence ufs_chkdq/ufs_dqget/ufs_dqrele/ufs_getinoquota/
  ufs_quotaon are all DEFINED in the binary.  But they have ZERO callers:
  every call site (ffs_alloc.c, ffs_inode.c, ffs_balloc.c, ufs_vnops.c,
  ufs_inode.c) is '#ifdef QUOTA', and ufs_quotactl() itself returns
  EOPNOTSUPP unless QUOTA is defined (ufs_vfsops.c:77-78).  So the cited
  unlocked list manipulation in ufs_dqget() (lines 769-866) is dead code
  on this kernel.  Runtime proof: quotactl(Q_QUOTAON) -> errno=45 (see run.log).