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: <20240809214444.3257596-1-evan@rivosinc.com>
Date: Fri,  9 Aug 2024 14:44:42 -0700
From: Evan Green <evan@...osinc.com>
To: Palmer Dabbelt <palmer@...belt.com>
Cc: Yangyu Chen <cyy@...self.name>,
	Evan Green <evan@...osinc.com>,
	Albert Ou <aou@...s.berkeley.edu>,
	Alexandre Ghiti <alexghiti@...osinc.com>,
	Andrew Jones <ajones@...tanamicro.com>,
	Andy Chiu <andy.chiu@...ive.com>,
	Anup Patel <anup@...infault.org>,
	Ben Dooks <ben.dooks@...ethink.co.uk>,
	Björn Töpel <bjorn@...osinc.com>,
	Charlie Jenkins <charlie@...osinc.com>,
	Clément Léger <cleger@...osinc.com>,
	Conor Dooley <conor.dooley@...rochip.com>,
	Costa Shulyupin <costa.shul@...hat.com>,
	Erick Archer <erick.archer@....com>,
	"Gustavo A. R. Silva" <gustavoars@...nel.org>,
	Jonathan Corbet <corbet@....net>,
	Paul Walmsley <paul.walmsley@...ive.com>,
	linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-riscv@...ts.infradead.org
Subject: [PATCH v4 0/2] RISC-V: hwprobe: Misaligned scalar perf fix and rename


The CPUPERF0 hwprobe key was documented and identified in code as
a bitmask value, but its contents were an enum. This produced
incorrect behavior in conjunction with the WHICH_CPUS hwprobe flag.
The first patch in this series fixes the bitmask/enum problem by
creating a new hwprobe key that returns the same data, but is
properly described as a value instead of a bitmask. The second patch
renames the value definitions in preparation for adding vector misaligned
access info. As of this version, the old defines are kept in place to
maintain source compatibility with older userspace programs.


Changes in v4:
 - Rebased
 - Add the word scalar (Charlie)

Changes in v3:
 - Further documentation wordsmithing (Conor)
 - Leave the old defines in place (Conor, Palmer)

Changes in v2:
 - Clarified the distinction of slow and fast refers to misaligned word
   accesses. Previously it just said misaligned accesses, leaving it
   ambiguous as to which type of access was measured.
 - Removed shifts in values (Andrew)
 - Renamed key to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF (Palmer)
 - Added patch to rename misaligned perf key values (Palmer)

Evan Green (2):
  RISC-V: hwprobe: Add MISALIGNED_PERF key
  RISC-V: hwprobe: Add SCALAR to misaligned perf defines

 Documentation/arch/riscv/hwprobe.rst       | 36 +++++++++++++---------
 arch/riscv/include/asm/hwprobe.h           |  2 +-
 arch/riscv/include/uapi/asm/hwprobe.h      |  6 ++++
 arch/riscv/kernel/sys_hwprobe.c            | 11 ++++---
 arch/riscv/kernel/traps_misaligned.c       |  6 ++--
 arch/riscv/kernel/unaligned_access_speed.c | 12 ++++----
 6 files changed, 44 insertions(+), 29 deletions(-)

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ