Bug 508326

Summary: Force use of /sys/bus/usb for all USB host devices
Product: [Fedora] Fedora Reporter: Daniel BerrangĂ© <berrange>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: high    
Version: rawhideCC: dwmw2, gcosta, itamar, jaswinder, markmc, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-03 08:33:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 498969    

Description Daniel Berrangé 2009-06-26 15:48:52 UTC
Description of problem:
The QEMU USB host device support has code for accessing devices via three different location

 /dev/bus/usb
 /proc/bus/usb
 /sys/bus/usb

The first 2 are legacy locations, and /sys/bus/usb is the preferred location for modern kernels.

QEMU currently probes for each of these in turn, and tries the preferred sysfs option last. This is a problem for sVirt since the first two will generate AVC alerts as the SELinux labelling will never allow access to them.

/sys/bus/usb will be shortly gaining support for fine grained SELinux labelling allowing devices to be labelled for individual guests.

Since Fedora only needs to support modern kernels, QEMU should not bother trying to use /dev/bus/usb or /proc/bus/usb, and instead go straight to /sys/bus/usb. This will avoid the needless AVCS.

Thus this BZ is to request commenting outof the code for using /dev and /proc for USB devices.

Version-Release number of selected component (if applicable):
qemu-0.10.5-3.fc11.i586

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Mark McLoughlin 2009-07-03 08:33:46 UTC
Fix sent upstream and built in rawhide

* Fri Jul  3 2009 Mark McLoughlin <markmc> - 2:0.10.50-8.kvm87
- Prefer sysfs over usbfs for usb passthrough (#508326)