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]
Message-ID: <AANLkTimmJDKbh3_pRY_ASKvjsf4YuuUMh3edh5LvDv-p@mail.gmail.com>
Date:	Wed, 11 Aug 2010 18:08:43 +0200
From:	Martin Fuzzey <mfuzzey@...il.com>
To:	Greg KH <greg@...ah.com>
Cc:	Russell King - ARM Linux <linux@....linux.org.uk>,
	linux-usb <linux-usb@...r.kernel.org>, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: Problem with non aligned DMA in usbnet on ARM

On Wed, Aug 11, 2010 at 5:04 PM, Greg KH <greg@...ah.com> wrote:
>> Here is a pointer to the thread where it was stated that HCD's don't
>> have to handle this.
>>
>> http://kerneltrap.org/mailarchive/linux-usb/2009/4/20/5528164
>
> No, that thread is about stack vs. heap allocations, not about alignment
> issues.
>

Well although the issue discussed in that thread was caused by a stack
allocation isn't the issue here the same?

My understanding is that a heap allocation as returned by kmalloc() will be:
1) correctly aligned for DMA
and
2) in a memory zone accessible to DMA

whereas a stack allocation is not guaranteed to have either of these properties.

The problem I described in that thread was due to case 1
(misalignment) rather than the stack memory zone not being accessible
at all to DMA.
To which was the reply was basically "use a heap allocation".

So the question is are hcds expected to accept arbitarilly aligned but
heap allocated pointers (such as the result of kmalloc() + 1)?

regards,

Martin









> thanks,
>
> greg k-h
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ