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-next>] [day] [month] [year] [list]
Message-ID: <20241123094729.1099378-1-mjguzik@gmail.com>
Date: Sat, 23 Nov 2024 10:47:27 +0100
From: Mateusz Guzik <mjguzik@...il.com>
To: tglx@...utronix.de,
	bp@...en8.de,
	andy@...nel.org,
	akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
	x86@...nel.org,
	Mateusz Guzik <mjguzik@...il.com>
Subject: [PATCH 0/2] retire bcmp, a redundant wrapper around memcmp

Reasoning copied from patch 2:
> While architectures could override it thanks to __HAVE_ARCH_BCMP, none
> of them did. Instead it was implemented as a call to memcmp().

> These routines differ in the API contract: memcmp()'s result indicates
> which way the difference goes (making it usable for sorting), whereas
> bcmp()'s result merely states whether the buffers differ in any way.

> This means that a dedicated optimized bcmp() is cheaper to execute than
> memcmp() for differing buffers as there is no need to compute the return
> value.

> However, per the above nobody bothered to write one and it is unclear if
> it makes sense to do it.

> Users which really want to compare stuff may want to handle it
> differently (like e.g., the path lookup).

Mateusz Guzik (2):
  x86/callthunks: s/bcmp/memcmp/
  string: retire bcmp()

 arch/x86/boot/string.c       |  8 --------
 arch/x86/boot/string.h       |  1 -
 arch/x86/kernel/callthunks.c |  6 +++---
 include/linux/string.h       |  3 ---
 lib/Makefile                 |  3 +--
 lib/string.c                 | 19 -------------------
 6 files changed, 4 insertions(+), 36 deletions(-)

-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ