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: <cover.1757810729.git.fthain@linux-m68k.org>
Date: Sun, 14 Sep 2025 10:45:29 +1000
From: Finn Thain <fthain@...ux-m68k.org>
To: Peter Zijlstra <peterz@...radead.org>,
    Will Deacon <will@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
    Arnd Bergmann <arnd@...db.de>,
    Boqun Feng <boqun.feng@...il.com>,
    Jonathan Corbet <corbet@....net>,
    Geert Uytterhoeven <geert@...ux-m68k.org>,
    linux-arch@...r.kernel.org,
    linux-doc@...r.kernel.org,
    linux-kernel@...r.kernel.org,
    linux-m68k@...r.kernel.org,
    Mark Rutland <mark.rutland@....com>
Subject: [RFC v2 0/3] Align atomic storage

This series adds the __aligned attribute to atomic_t and atomic64_t.
It also adds a Kconfig option to enable a new runtime warning to help
reveal misaligned atomic accesses on platforms which don't trap that.

Some people might assume scalars are aligned to 4-byte boundaries, while
others might assume natural alignment. Best not to encourage such
assumptions.

Moreover, being that locks are performance sensitive, and being that
atomic operations tend to involve further assumptions, there seems to be
room for improvement here.

Pertinent to this discussion are the section "Memory Efficiency" in
Documentation/RCU/Design/Requirements/Requirements.rst
and the section "GUARANTEES" in Documentation/memory-barriers.txt


Finn Thain (2):
  documentation: Discourage alignment assumptions
  atomic: Specify alignment for atomic_t and atomic64_t

Peter Zijlstra (1):
  atomic: Add alignment check to instrumented atomic operations

 Documentation/core-api/unaligned-memory-access.rst |  7 -------
 include/asm-generic/atomic64.h                     |  2 +-
 include/linux/instrumented.h                       |  4 ++++
 include/linux/types.h                              |  2 +-
 lib/Kconfig.debug                                  | 10 ++++++++++
 5 files changed, 16 insertions(+), 9 deletions(-)

-- 
2.49.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ