Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Seven more unaligned PCI configuration space access bugs



Since pci_conf_read() and pci_conf_write() were changed to check the
alignment of PCI configuration space accesses on the x86 platforms,
there have been several bug reports about unaligned accesses.

Instead of having people find and report these bugs one by one, I
figured it would be better if we could just find them once and for all
through static code analysis.  This should be possible in the cases
where the configuration space address is known at compile time, which
should be most of them, or perhaps even all of them.

So I did that.  The method I used is probably too ugly of a hack to
publish outside the safe confines of the IOCCC, but here are the
results.  The line numbers should be correct for today's -current
sources.

  sys/dev/pci/agp_via.c: In function 'agp_via_attach':
  sys/dev/pci/agp_via.c:107

  sys/arch/x86/pci/pchb.c: In function 'pchbattach':
  sys/arch/x86/pci/pchb.c:219
  sys/arch/x86/pci/pchb.c:227
  sys/arch/x86/pci/pchb.c:260
  sys/arch/x86/pci/pchb.c:264

  sys/arch/i386/pci/viapcib.c: In function 'viapcib_attach':
  sys/arch/i386/pci/viapcib.c:182
  sys/arch/i386/pci/viapcib.c:206

-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index