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] [day] [month] [year] [list]
Date:	Mon, 26 Jan 2015 14:34:02 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	isubramanian@....com
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	mlangsdo@...hat.com, patches@....com, kchudgar@....com
Subject: Re: [PATCH] drivers: net: xgene: fix: Out of order descriptor
 bytes read

From: Iyappan Subramanian <isubramanian@....com>
Date: Mon, 26 Jan 2015 13:12:23 -0800

>>> @@ -369,6 +369,8 @@ static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring,
>>>               if (unlikely(xgene_enet_is_desc_slot_empty(raw_desc)))
>>>                       break;
>>>
>>> +             /* read fpqnum field after dataaddr field */
>>> +             smp_rmb();
>>>               if (is_rx_desc(raw_desc))
>>>                       ret = xgene_enet_rx_frame(ring, raw_desc);
>>>               else
>>
>> Reading your changelog, it looks like you need a plain rmb() here.
> 
> rmb() translates into dsb, which in arm64 serializes everything
> including instructions and thus expensive compared to dmb.
> 
> Do you see any issue with smp_rmb() (which translates into dmb) ?

smp_rmb() is not appropriate.  You're not serializing accesses between
two cpus, you're serializing the cpu with the device.
--
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