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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Jun 2007 11:16:59 -0700
From:	Andrew Vasquez <andrew.vasquez@...gic.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Rik van Riel <riel@...hat.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] quiet down swiotlb warnings

On Fri, 01 Jun 2007, Andi Kleen wrote:

> Rik van Riel <riel@...hat.com> writes:
> 
> > It turns out that the qla2xxx driver sometimes fills up the iotlb
> > on purpose and throttles itself when pci_map_sg() fails.  In the
> > case of a driver that expects and handles pci_map_sg() failures,
> > we should not spam the user's console with swiotlb full messages.
> 
> Why does it do that? Could we supply a better interface
> for whatever it is trying to do here?

The driver only calls pci_map_sg() once it's insured that all local
driver resources are available to submit an I/O to the hardware.

> > -	printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
> > -	       "device %s\n", size, dev ? dev->bus_id : "?");
> > +	if (++warnings < 5)
> > +		printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at "
> > +		       "device %s\n", size, dev ? dev->bus_id : "?");
> 
> Bad idea imho. swiotlb mappings should always lead to printk by default
> because it is pretty dangerous.

Why?  It's just another resource which is consumed -- the qla2xxx
driver is the final consumer before I/O is submitted out on the wire.
The mappings are held for the shorted time required -- as such, are
released as soon as the I/O completes.

> One possible solution for this I could think of would be to define a
> new pci_map_sg_couldfail() or similar that doesn't warn and use a weak
> fallback just calling pci_map_sg on other IOMMU implementations. 
-
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