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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3001d6a6-77b7-4ff4-8c8d-58dff8e6bdb6@app.fastmail.com>
Date: Tue, 16 Dec 2025 08:18:37 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Finn Thain" <fthain@...ux-m68k.org>,
 "Peter Zijlstra" <peterz@...radead.org>, "Will Deacon" <will@...nel.org>
Cc: "Andrew Morton" <akpm@...ux-foundation.org>,
 "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>,
 "Mark Rutland" <mark.rutland@....com>,
 Linux-Arch <linux-arch@...r.kernel.org>, linux-kernel@...r.kernel.org,
 linux-m68k@...ts.linux-m68k.org, guoren <guoren@...nel.org>,
 "linux-csky@...r.kernel.org" <linux-csky@...r.kernel.org>,
 "Geert Uytterhoeven" <geert@...ux-m68k.org>,
 "Dinh Nguyen" <dinguyen@...nel.org>, "Jonas Bonn" <jonas@...thpole.se>,
 "Stefan Kristiansson" <stefan.kristiansson@...nalahti.fi>,
 "Stafford Horne" <shorne@...il.com>,
 "linux-openrisc@...r.kernel.org" <linux-openrisc@...r.kernel.org>,
 "Yoshinori Sato" <ysato@...rs.sourceforge.jp>,
 "Rich Felker" <dalias@...c.org>,
 "John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>,
 linux-sh@...r.kernel.org
Subject: Re: [PATCH v5 2/4] atomic: Specify alignment for atomic_t and atomic64_t

On Tue, Dec 16, 2025, at 07:31, Finn Thain wrote:
> Some recent commits incorrectly assumed 4-byte alignment of locks.
> That assumption fails on Linux/m68k (and, interestingly, would have
> failed on Linux/cris also). The jump label implementation makes a
> similar alignment assumption.
>
> The expectation that atomic_t and atomic64_t variables will be naturally
> aligned seems reasonable, as indeed they are on 64-bit architectures.
> But atomic64_t isn't naturally aligned on csky, m68k, microblaze, nios2,
> openrisc and sh. Neither atomic_t nor atomic64_t are naturally aligned
> on m68k.
>
> This patch brings a little uniformity by specifying natural alignment
> for atomic types. One benefit is that atomic64_t variables do not get
> split across a page boundary. The cost is that some structs grow which
> leads to cache misses and wasted memory.

Reviewed-by: Arnd Bergmann <arnd@...db.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ