Making a magic deduplicating tar using the FICLONE ioctl
ฝัง
- เผยแพร่เมื่อ 12 ก.ย. 2023
- media.ccc.de/v/all-systems-go...
A walkthrough of an interesting use case for the `FICLONE` ioctl: cloning file data into a tar archive, and cloning files out of it again. "Free" archiving and unarchiving at zero-copy speeds!
Topics:
- Copy-on-write and the `FICLONE` ioctl
- The ancient `tar` format
- A trick for adding arbitrary padding to the `tar` format in order to force file system page alignment
- How to avoid symlink attacks and other TOCTOU issues, using the fairly recently introduced (linux 5.6) `openat2` system call.
- An interesting bug in GNU tar
At the end you'll receive a free autographed copy of [deduptar](git.sr.ht/~nullenenenen/dedup...) to use for party tricks. 🥳
Wicher Minnaard
cfp.all-systems-go.io/all-sys...
#asg2023 - วิทยาศาสตร์และเทคโนโลยี
Autism I see but intelligence I also see I will get a beer