DragonFlyBSD Kernel Audit
DF-2774 / run.log
← back to finding ↓ download raw
+ umount /mnt/alias2
+ umount /mnt/alias
+ umount /mnt/lower
+ rm -rf /mnt/lower /mnt/alias /mnt/alias2
+ mkdir -p /mnt/lower /mnt/alias /mnt/alias2
+ mount -t tmpfs tmpfs /mnt/lower
+ chown qa:qa /mnt/lower
+ mount_null /mnt/lower /mnt/alias
=== victim created THROUGH alias (ncp resolved via nullmp -> v_pfsmp=nullmp) ===
+ echo '=== victim created THROUGH alias (ncp resolved via nullmp -> v_pfsmp=nullmp) ==='
+ su -m qa -c 'dd if=/dev/zero of=/mnt/alias/victim bs=4096 count=1'
1+0 records in
1+0 records out
4096 bytes transferred in 0.000046 secs (88371090 bytes/sec)
--- vquota show /mnt/alias (expect 4096) ---
+ echo '--- vquota show /mnt/alias (expect 4096) ---'
+ vquota show /mnt/alias
total: 4096
user qa: 4096
group qa: 4096
--- vquota show /mnt/lower (expect 0: charge went to nullmp via v_pfsmp) ---
+ echo '--- vquota show /mnt/lower (expect 0: charge went to nullmp via v_pfsmp) ---'
+ vquota show /mnt/lower
total: 0
=== umount alias: nullmp freed, vp->v_pfsmp stale ===
+ echo '=== umount alias: nullmp freed, vp->v_pfsmp stale ==='
+ umount /mnt/alias
=== CONTROL: append via lower, no mount at stale address ===
+ echo '=== CONTROL: append via lower, no mount at stale address ==='
+ su -m qa -c 'dd if=/dev/zero bs=4096 count=1 >> /mnt/lower/victim && echo CONTROL_APPEND_OK'
1+0 records in
1+0 records out
4096 bytes transferred in 0.000070 secs (58206622 bytes/sec)
CONTROL_APPEND_OK
--- lower usage (control append charged here, fallback path) ---
+ echo '--- lower usage (control append charged here, fallback path) ---'
+ vquota show /mnt/lower
total: 4096
user qa: 4096
group qa: 4096
=== fresh nullfs mount (chunk reuse) + limit 10 ===
+ echo '=== fresh nullfs mount (chunk reuse) + limit 10 ==='
+ mount_null /mnt/lower /mnt/alias2
+ vquota limit /mnt/alias2 10
=== TEST1: append via LOWER, expect EDQUOT if stale->alias2 ===
+ echo '=== TEST1: append via LOWER, expect EDQUOT if stale->alias2 ==='
+ su -m qa -c 'dd if=/dev/zero bs=4096 count=1 >> /mnt/lower/victim'
dd: stdout: Disc quota exceeded
1+0 records in
0+0 records out
0 bytes transferred in 0.000139 secs (0 bytes/sec)
TEST1_RC=1
=== TEST2: O_TRUNC via lower ===
+ echo 'TEST1_RC=1'
+ echo '=== TEST2: O_TRUNC via lower ==='
+ su -m qa -c ': > /mnt/lower/victim'
TEST2_RC=0
--- vquota show /mnt/alias2 (negative total => stale charge) ---
+ echo 'TEST2_RC=0'
+ echo '--- vquota show /mnt/alias2 (negative total => stale charge) ---'
+ vquota show /mnt/alias2
total: 18446744073709543424, limit = 10
user qa: 18446744073709543424
group qa: 18446744073709543424