kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 43339] New: Wrong Pci-Bridge Header Type check.
@ 2012-06-04 14:28 bugzilla-daemon
  2012-06-05 18:33 ` [Bug 43339] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2012-06-04 14:28 UTC (permalink / raw)
  To: kvm

https://bugzilla.kernel.org/show_bug.cgi?id=43339

           Summary: Wrong Pci-Bridge Header Type check.
           Product: Virtualization
           Version: unspecified
    Kernel Version: 3.4
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: kvm
        AssignedTo: virtualization_kvm@kernel-bugs.osdl.org
        ReportedBy: vedun@ispras.ru
        Regression: No


I have found bug in file virt/kvm/assigned-device.c

670         /* Don't allow bridges to be assigned */
671         pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
672         if ((header_type & PCI_HEADER_TYPE) != PCI_HEADER_TYPE_NORMAL) {
673                 r = -EPERM;
674                 goto out_put;
675         }

This code doesn't check that device is PCI-Bridge. In my case

header_type is 1,  default value for PCI-Bridge
PCI_HEADER_TYPE is 14(0xE)
PCI_HEADER_TYPE_NORMAL is 0

So, 1 & 0xE == 0 thus KVM assigns pci-bridge device to VM successfully.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-15 22:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 14:28 [Bug 43339] New: Wrong Pci-Bridge Header Type check bugzilla-daemon
2012-06-05 18:33 ` [Bug 43339] " bugzilla-daemon
2012-06-05 19:43 ` bugzilla-daemon
2012-07-01  9:40 ` bugzilla-daemon
2012-08-15 22:00 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).