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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 May 2010 05:35:45 -0700
From:	Marc Gauthier <marc@...silica.com>
To:	Mike Frysinger <vapier.adi@...il.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC:	"npiggin@...e.de" <npiggin@...e.de>,
	"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
	"jw@...ix.com" <jw@...ix.com>, "cl@...ux.com" <cl@...ux.com>,
	"penberg@...helsinki.fi" <penberg@...helsinki.fi>,
	"mpm@...enic.com" <mpm@...enic.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"os@...ix.com" <os@...ix.com>,
	"Michael.Hennerich@...log.com" <Michael.Hennerich@...log.com>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dg@...ix.com" <dg@...ix.com>, "osw@...ix.com" <osw@...ix.com>,
	"rientjes@...gle.com" <rientjes@...gle.com>,
	"dbrownell@...rs.sourceforge.net" <dbrownell@...rs.sourceforge.net>,
	"grant.likely@...retlab.ca" <grant.likely@...retlab.ca>,
	"chris@...kel.net" <chris@...kel.net>,
	Piet Delaney <Piet.Delaney@...silica.com>
Subject: RE: [LKML] Re: [PATCH v3] ad7877: keep dma rx buffers in seperate
 	cache lines

Mike Frysinger wrote:
> On Tue, May 11, 2010 at 23:23, FUJITA Tomonori wrote:
>> Seems that kmalloc is not cacheline aligned on some architectures but
>> they works. Probably, we might be just lucky because in general they
>> allocate larger buffers than 64 for DMA via kmalloc and the buffers
>> are aligned on the size?
>
> i think the magic combo is:
>  - DMA buffer is written to (receive)
[...]
>  - only on arches that need software cache coherency

In particular, when the architecture port uses cache invalidates that
throw away dirty lines.  They're equivalent to writing old data to a
cache line, so an unrelated kmalloc allocation in the same cache line
gets corrupted.

So true, not all architectures need the extra alignment.
(And maybe some get lucky too, don't know.)

-Marc

PS.  Sorry about the gratuitous [LKML] in the subject line, mea culpa.
--
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