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]
Date: Tue, 4 Jun 2024 10:02:26 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: elver@...gle.com, akpm@...ux-foundation.org, tglx@...utronix.de,
	peterz@...radead.org, dianders@...omium.org, pmladek@...e.com,
	torvalds@...ux-foundation.org, Arnd Bergmann <arnd@...db.de>
Subject: [PATCH v3 cmpxchg 0/4] Provide emulation for one--byte cmpxchg()

Hello!

This v3 series uses one-byte cmpxchg emulation for those architectures
that do not support this in hardware and that are not already using this
emulation.  The emulation is in terms of the fully ordered four-byte
cmpxchg() that is supplied by all of these architectures.  This was
tested by the csky commit already in mainline and by making x86 forget
that it can do one-byte cmpxchg() natively:

f0183ab28489 ("EXP arch/x86: Test one-byte cmpxchg emulation")

This x86 commit has since been dropped from RCU in favor of the
aforementioned csky commit in mainline.

Once one-byte cmpxchg emulation patches are in mainline for all remaining
architectures in need of it, RCU Tasks will use one-byte cmpxchg()
in place of the current rcu_trc_cmpxchg_need_qs() open-coding of this
emulation.

The remaining patches are as follows:

1.	ARC: Emulate one-byte cmpxchg.

2.	Emulate one-byte cmpxchg.

3.	Emulate one-byte cmpxchg.

4.	ARM: Emulate one-byte cmpxchg.

Changes since v2:

o	Dropped the sparc32, parisc, lib, and csky patches due to their
	having been accepted into mainline.

o	Added a 32-bit ARM patch for systems with v6 and earlier CPUs.

o	Apply other feedback from review and testing.

Changes since v1:

o	Dropped riscv patch in favor of alternative patch that
	provides native support.

o	Fixed yet more casting bugs spotted by kernel test robot
	and by Geert Uytterhoeven.

Changes since RFC:

o	Add native support for sparc32 and parisc, courtesy of Al Viro.

o	Remove two-byte emulation due to architectures that still do not
	support two-byte load and store instructions, per Arnd Bergmann
	feedback.  (Yes, there are a few systems out there that do not
	even support one-byte load instructions, but these are slated
	for removal anyway.)

o	Fix numerous casting bugs spotted by kernel test robot.

o	Fix SPDX header.  "//" for .c files and "/*" for .h files.
	I am sure that there is a good reason for this.  ;-)

						Thanx, Paul

------------------------------------------------------------------------

 arc/Kconfig                  |    1 +
 arc/include/asm/cmpxchg.h    |   33 ++++++++++++++++++++++++---------
 arm/Kconfig                  |    1 +
 arm/include/asm/cmpxchg.h    |    7 ++++++-
 sh/Kconfig                   |    1 +
 sh/include/asm/cmpxchg.h     |    3 +++
 xtensa/Kconfig               |    1 +
 xtensa/include/asm/cmpxchg.h |    2 ++
 8 files changed, 39 insertions(+), 10 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ