Bug 1431876
| Summary: | move qemu /dev/kvm udev rules to main udev package | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dusty Mabe <dustymabe> |
| Component: | qemu | Assignee: | Fedora Virtualization Maintainers <virt-maint> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | amit, berrange, cfergeau, crobinso, dwmw2, itamar, johannbg, lnykryn, msekleta, muadda, pbonzini, rjones, ssahani, s, systemd-maint, virt-maint, zbyszek |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | systemd-234-2.fc27 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-03 21:44:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dusty Mabe
2017-03-13 23:10:51 UTC
> There may be an argument for security that could be made here. I don't fully > understand the implications so please educate me I will just note that Debian defaults to 0660 + group kvm, which means people wanting KVM must add themselves to the kvm group. I had something of an argument with the Debian developer on this topic. In brief, his concern is security. You can read more here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640328 Having said all that, in Fedora we've set /dev/kvm to mode 0666 for years, albeit you have to install the qemu package to "request" that, but every desktop user will have qemu installed anyway, and no one understands that the mere action of installing qemu opens up permissions (even I didn't know until just now). So I think we should change the udev rules as you say. (In reply to Richard W.M. Jones from comment #1) > > Having said all that, in Fedora we've set /dev/kvm to mode 0666 for > years, albeit you have to install the qemu package to "request" > that, but every desktop user will have qemu installed anyway, and > no one understands that the mere action of installing qemu opens up > permissions (even I didn't know until just now). So I think we > should change the udev rules as you say. Can you re-assign this BZ to the appropriate group so we can have that discussion in this ticket? I think it's best to discuss this on Fedora devel list. Therefore I opened the following thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/WTYWLEET4ZEHZIZTIJ7QDAOJ7JHOHHSA/ (In reply to Richard W.M. Jones from comment #3) > I think it's best to discuss this on Fedora devel list. Therefore > I opened the following thread: > > https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/ > thread/WTYWLEET4ZEHZIZTIJ7QDAOJ7JHOHHSA/ From this thread, Zbyszek said: > This applies to any system where kvm is to be used by unprivileged users > without qemu package being installed. It is possible to use kvm in this > way, e.g. by using self-compiled qemu, or some alternative or whatever. > So maybe we should move the rules for /dev/kvm to > /usr/lib/udev/rules.d/50-udev-default.rules. So reassigning to systemd. The rule content is: $ cat 80-kvm.rules KERNEL=="kvm", GROUP="kvm", MODE="0666" And the spec file also contains: getent group kvm >/dev/null || groupadd -g 36 -r kvm I'll submit a PR upstream. It took a while, but the systemd part is done (in rawhide). Reassigning to qemu, please remove the rule there. I notice the systemd spec has:
-Dkvm-access-mode=0666
but the systemd upstream configure seems to need --with-dev-kvm-mode=0666,
so is the spec file right?
Good catch, is should be -Ddev-kvm-mode=... I restarted the build. (I'm a bit disappointed that meson does not throw an error: https://github.com/mesonbuild/meson/issues/2059) I've queued this change in qemu rawhide spec, will be in the qemu-2.10.0-rc2 build (or later) thanks all Interestingly Fedora Rawhide on s390 ships with: # ll /dev/kvm crw-------. 1 root root 10, 232 Dec 5 08:28 /dev/kvm qemu 2:2.11.0-0.2.rc1.fc28 systemd-235-4.fc28.s390x It seems like this systemd is new enough, but yet it still has the wrong permissions. Not sure what's up. |