lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Dec 2008 22:32:53 +0100 (MET)
From:	Mikael Pettersson <mikpe@...uu.se>
To:	linux-kernel@...r.kernel.org
Subject: drivers using the non-PCI dma_set_mask() on PCI devices

Several drivers do the following:

	struct pci_dev *pdev = ...;
	...
	if (dma_set_mask(&pdev->dev, mask))
		...

But pdev->dev.dma_mask == &pdev->dma_mask, so this is essentially a
roundabout way of saying

	if (pci_set_dma_mask(pdev, mask))

except that it bypasses the PCI-specific operations pci_set_dma_mask()
may do on that platform.

Drivers doing this include drivers/scsi/aic7xxx/aic79xx_osm_pci.c,
drivers/scsi/aic7xxxx/aic7xxx_osm_pci.c, drivers/scsi/qla2xxx/qla_os.c,
drivers/net/wireless/rt2x00/rt2x00pci.c, and drivers/media/video/meye.c.

Is it considered acceptable that drivers bypass the PCI DMA API on
PCI devices like this, or are these drivers in error?

I'm doing some work on an embedded platform (ARM IXP4xx) with some
PCI DMA restrictions. To handle these the platform provides its own
versions of pci_set_dma_mask() and pci_set_consistent_dma_mask(),
but its dma_set_mask() currently does not do anything PCI-specific.
The question is: should dma_set_mask() have PCI knowledge or not?

/Mikael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ