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: <063D6719AE5E284EB5DD2968C1650D6DCFE6842A@AcuExch.aculab.com>
Date:   Thu, 16 Feb 2017 16:37:41 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Lino Sanfilippo' <LinoSanfilippo@....de>
CC:     Pavel Belous <Pavel.Belous@...antia.com>,
        "David S . Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Simon Edelhaus <Simon.Edelhaus@...antia.com>,
        Alexey Andriyanov <Alexey.Andriyanov@...antia.com>
Subject: RE: RE: [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring
 buffers copying.

From: Lino Sanfilippo
> Sent: 16 February 2017 16:02
...
> I was referring to the copy of tx descriptors, not the frames/fragments itself.
> I wrote "tx buffers" because in this driver a descriptor is represented as
>  a struct "aq_ring_buff_s". I cannot see a reason why this descriptor copy
>  should be necessary.

Not unless the descriptor memory is on the card.

Actually it might be worse than that.
The transmit descriptor probably has an 'owner' bit.
The write of the word containing that bit must be last and
preceded by the appropriate barrier (probably dma_wmb()).
Another barrier is needed before the 'doorbell' io write that kicks
the hardware.

Using memcpy() won't have that effect at all.

If the ethernet frame is fragmented (and so uses multiple
descriptors) the owner bit of the first descriptor must be
in the last write.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ