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

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

  sys/arch/x86/pci/pchb.c: In function 'pchbattach':

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

Andreas Gustafsson,

Home | Main Index | Thread Index | Old Index