9p fails with readonly+non-root due to O_NOATIME
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu-kvm (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Serge Hallyn |
Bug Description
http://
Upstream QEMU commit: eed968607d656a2
hw/9pfs: Remove O_NOATIME flag from 9pfs open() calls in readonly mode
When a 9p filesystem is exported with the readonly flag, QEMU adds the O_NOATIME flag to all accesses. This causes all reads to fail when qemu is run as non-root and the runas user doesn't own the files being accessed. The patch is a one-liner; please add it to the distribution patches.
Steps to reproduce:
1. Download ubuntu-
2. As a non-root user,
$ mkdir testdir
$ echo "value" > testdir/testfile
$ sudo chown -R root:root testdir
3. Start the VM, again as a non-root user:
$ qemu-system-x86_64 -cdrom /path/to/
-fsdev local,id=
-device virtio-
4. Inside the VM, select "Try Ubuntu", open a terminal, and run:
$ sudo mount -t 9p -o trans=virtio,
$ ls /mnt
testfile
$ cat /mnt/testfile
Expected results:
value
Actual results:
cat: /mnt/testfile: operation not permitted
=======
SRU Justification:
1. Impact: cannot use 9p fs in ro mode as nonroot.
2. Development fix: a patch upstream fixes the attempt to use a flag which only root may use (when not needed)
3. Stable fix: cherrypick of development fix
4. Test case: detailed above
5. Regression potential: this patch only affects 9pfs, and is cherrypicked from upstream, so should have no adverse effect on any other qemu code.
=======
Changed in qemu-kvm (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
description: | updated |
Changed in qemu-kvm (Ubuntu Precise): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
description: | updated |
This is for precise only. I believe quantal and newer include versions fixed upstream.