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: <20170926.215321.424825014223425519.davem@davemloft.net>
Date:   Tue, 26 Sep 2017 21:53:21 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     paul.burton@...tec.com
Cc:     matt.redfearn@...tec.com, netdev@...r.kernel.org,
        alexandre.torgue@...com, peppe.cavallaro@...com,
        linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org,
        james.hogan@...tec.com
Subject: Re: [PATCH] net: stmmac: Meet alignment requirements for DMA

From: Paul Burton <paul.burton@...tec.com>
Date: Tue, 26 Sep 2017 21:30:56 -0700

> Nobody said that you are required to do anything, I suggested that
> it would be beneficial if you were to suggest a change to the
> documented DMA API such that it allows your usage where it currently
> does not.

Documentation is often wrong and it is here.  What 200+ drivers
actually do and depend upon trumps a simple text document.

The requirement is that the memory remains quiescent on the cpu side
while the device messes with it.  And that this quiescence requirement
may or may not be on a cache line basis.

There is absolutely no requirement that the buffers themselves are
cache line aligned.

In fact, receive buffers for networking are intentionally 2-byte
aligned in order for the ipv4 headers to be naturally 32-bit aligned.

Cache line aligning receive buffers will actually make some
architectures trap because of the bad alignment.

So see, this cache line alignment requirement is pure madness from
just about any perspective whatsoever.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ