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>] [day] [month] [year] [list]
Date:	Mon, 9 Feb 2009 09:27:04 +0200
From:	Risto Suominen <risto.suominen@...il.com>
To:	netdev@...r.kernel.org
Subject: Fwd: [PATCH 001/002] de2104x: force correct order when writing to rx 
	ring

---------- Forwarded message ----------
From: Risto Suominen <risto.suominen@...il.com>
Date: 2009/2/7
Subject: [PATCH 001/002] de2104x: force correct order when writing to rx ring
To: Jeff Garzik <jgarzik@...ox.com>, lkml <linux-kernel@...r.kernel.org>


DescOwn should not be set, thus allowing the chip to use the descriptor, before
everything else is set up correctly.

Signed-off-by: Risto Suominen <Risto.Suominen@...il.com>
---
The testing is done on kernel version 2.6.18.

--- drivers/net/tulip/de2104x.c.org     2006-09-20 06:42:06.000000000 +0300
+++ drivers/net/tulip/de2104x.c 2009-02-07 15:04:04.000000000 +0200
@@ -465,13 +465,14 @@ static void de_rx (struct de_private *de
                       drop = 1;

 rx_next:
-               de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn);
               if (rx_tail == (DE_RX_RING_SIZE - 1))
                       de->rx_ring[rx_tail].opts2 =
                               cpu_to_le32(RingEnd | de->rx_buf_sz);
               else
                       de->rx_ring[rx_tail].opts2 = cpu_to_le32(de->rx_buf_sz);
               de->rx_ring[rx_tail].addr1 = cpu_to_le32(mapping);
+               wmb();
+               de->rx_ring[rx_tail].opts1 = cpu_to_le32(DescOwn);
               rx_tail = NEXT_RX(rx_tail);
       }

View attachment "de2104x-rx.patch" of type "text/x-diff" (850 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ