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:	Tue, 24 Mar 2015 11:31:33 +0100
From:	Patrick Marlier <patrick.marlier@...il.com>
To:	linux-kernel@...r.kernel.org
CC:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Josh Triplett <josh@...htriplett.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 0/3] rculist: Fix list_entry_rcu to read ptr with, rcu_dereference_raw

Hi Paul and Josh,

While running some benchmarks with rcu, I noticed that rculist had a 
performance issue compared to the non-rcu list.
Having a closer look at the rlulist, I found that there is a bad usage 
of rcu_dereference_raw in list_entry_rcu().
Indeed, "typeof (*ptr) *__ptr = ptr;" reads ptr and 
"rcu_dereference_raw(__ptr)" forces read on the stack variable __ptr.
However, ptr should be read with rcu_dereference_raw not the __ptr.

This was introduced some years ago with commit 67bdbffd (2010-02-25).
I am proposing to revert this part of the patch but probably this can be 
fixed differently.

Fixing this showed 2 problems in the usage of list_entry_rcu.
Since it touches other parts of kernel, I guess it requires ack from 
other maintainers.

Thanks.

PS: I will Cc the others maintainers when somebody confirms the problem.

Signed-off-by: Patrick Marlier <patrick.marlier@...il.com>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Josh Triplett <josh@...htriplett.org>
Cc: Arnd Bergmann <arnd@...db.de>
--
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