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.1765866665.git.fthain@linux-m68k.org>
Date: Tue, 16 Dec 2025 17:31:05 +1100
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>,
    Andrii Nakryiko <andrii@...nel.org>,    Arnd Bergmann <arnd@...db.de>,
    Alexei Starovoitov <ast@...nel.org>,
    Boqun Feng <boqun.feng@...il.com>,    bpf@...r.kernel.org,
    Rich Felker <dalias@...c.org>,
    Daniel Borkmann <daniel@...earbox.net>,
    Dinh Nguyen <dinguyen@...nel.org>,
    Eduard Zingerman <eddyz87@...il.com>,    Gary Guo <gary@...yguo.net>,
    Geert Uytterhoeven <geert@...ux-m68k.org>,
    John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>,
    Guo Ren <guoren@...nel.org>,    Hao Luo <haoluo@...gle.com>,
    John Fastabend <john.fastabend@...il.com>,
    Jiri Olsa <jolsa@...nel.org>,    Jonas Bonn <jonas@...thpole.se>,
    KP Singh <kpsingh@...nel.org>,    linux-arch@...r.kernel.org,
    linux-csky@...r.kernel.org,    linux-kernel@...r.kernel.org,
    linux-m68k@...ts.linux-m68k.org,    linux-openrisc@...r.kernel.org,
    linux-sh@...r.kernel.org,    Mark Rutland <mark.rutland@....com>,
    Martin KaFai Lau <martin.lau@...ux.dev>,
    Stanislav Fomichev <sdf@...ichev.me>,
    Stafford Horne <shorne@...il.com>,    Song Liu <song@...nel.org>,
    Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
    Yonghong Song <yonghong.song@...ux.dev>,
    Yoshinori Sato <ysato@...rs.sourceforge.jp>
Subject: [PATCH v5 0/4] Align atomic storage

This series adds the __aligned attribute to atomic_t and atomic64_t
definitions in include/linux and include/asm-generic (respectively)
to get natural alignment of both types on csky, m68k, microblaze,
nios2, openrisc and sh.

This series also adds Kconfig options to enable a new run-time warning
to help reveal misaligned atomic accesses on platforms which don't
trap that.

The performance impact is expected to vary across platforms and workloads.
The measurements I made on m68k show that some workloads run faster and
others slower.

---

Changed since v4:
 - Dropped parisc header file patch as it's been merged already.
 - Submitted as PATCH instead of RFC.

Changed since v3:
 - Rebased on v6.17.
 - New patch to resolve header dependency issue on parisc.
 - Dropped documentation patch.

Changed since v2:
 - Specify natural alignment for atomic64_t.
 - CONFIG_DEBUG_ATOMIC checks for natural alignment again.
 - New patch to add weakened alignment check.
 - New patch for explicit alignment in BPF header.

---

Finn Thain (3):
  bpf: Explicitly align bpf_res_spin_lock
  atomic: Specify alignment for atomic_t and atomic64_t
  atomic: Add option for weaker alignment check

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

 include/asm-generic/atomic64.h   |  2 +-
 include/asm-generic/rqspinlock.h |  2 +-
 include/linux/instrumented.h     | 15 +++++++++++++++
 include/linux/types.h            |  2 +-
 kernel/bpf/rqspinlock.c          |  1 -
 lib/Kconfig.debug                | 18 ++++++++++++++++++
 6 files changed, 36 insertions(+), 4 deletions(-)

-- 
2.49.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ