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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 Apr 2010 19:52:31 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	Greg KH <greg@...ah.com>, Daniel Mack <daniel@...aq.de>,
	<linux-kernel@...r.kernel.org>, Pedro Ribeiro <pedrib@...il.com>,
	<akpm@...ux-foundation.org>, Greg KH <gregkh@...e.de>,
	<alsa-devel@...a-project.org>, <linux-usb@...r.kernel.org>
Subject: Re: USB transfer_buffer allocations on 64bit systems

At Wed, 7 Apr 2010 11:55:19 -0400 (EDT),
Alan Stern wrote:
> 
> On Wed, 7 Apr 2010, Greg KH wrote:
> 
> > Yeah, I really don't want to have to change every driver in different
> > ways just depending on if someone thinks it is going to need to run on
> > this wierd hardware.
> 
> It's not weird hardware, as far as I know.  It's just a 64-bit system
> with a 32-bit USB host controller.
> 
> (And remember, while there are 64-bit EHCI controllers, there are not 
> any 64-bit OHCI or UHCI controllers.  So whenever somebody plugs a 
> full-speed or low-speed device into a 64-bit machine, they will face 
> this problem.  It's like the old problem of ISA devices that could 
> only do DMA to addresses in the first 16 MB of memory -- what the 
> original GFP_DMA flag was intended for.)
> 
> > Alan, any objection to just using usb_buffer_alloc() for every driver?
> > Or is that too much overhead?
> 
> I don't know what the overhead is.  But usb_buffer_alloc() requires the 
> caller to keep track of the buffer's DMA address, so it's not a simple 
> plug-in replacement.  In addition, the consistent memory that 
> usb_buffer_alloc() provides is a scarce resource on some platforms.

Yeah, also the area is aligned to kernel pages, and it may be much
bigger than the requested (power-of-two).  If not needed, we should
avoid it.


thanks,

Takashi
--
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