DF-0870 / run.sh
#!/bin/sh # DF-0870 run script -- runs the unprivileged (maxx) probe against a file # on a HAMMER mount. Expected (BUG present) on the default unpatched kernel: # # HAMMERIOC_LIST_VOLUMES: rc=0 errno=0 (Success) nvols=1 # [0] vol_no=0 device_name='/dev/...' len=N # HAMMERIOC_ADD_VOLUME (non-NUL device_name): rc=-1 errno=1 (EPERM) # # Expected (FIXED) on a patched kernel: # # HAMMERIOC_LIST_VOLUMES: rc=-1 errno=1 (Operation not permitted) # HAMMERIOC_ADD_VOLUME (non-NUL device_name): rc=-1 errno=1 (EPERM) # # Precondition: HAMMER filesystem mounted; argument is a file on that mount. set -e cd "$(dirname "$0")" TARGET="${1:-/mnt/hammer/testfile}" echo "+ ./poc $TARGET" ./poc "$TARGET" |