From: Finn Thain <fthain@linux-m68k.org>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Helge Deller <deller@gmx.de>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andrii Nakryiko <andrii@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Alexei Starovoitov <ast@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
bpf@vger.kernel.org, Daniel Borkmann <daniel@iogearbox.net>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-m68k@vger.kernel.org, linux-parisc@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>
Subject: [RFC v4 0/5] Align atomic storage
Date: Tue, 21 Oct 2025 09:28:04 +1100 [thread overview]
Message-ID: <cover.1760999284.git.fthain@linux-m68k.org> (raw)
This series adds the __aligned attribute to atomic_t and atomic64_t
definitions in include/asm-generic.
It also adds Kconfig options to enable a new runtime warning to help
reveal misaligned atomic accesses on platforms which don't trap that.
This patch series is a Request For Comments because the alignment
change is a time/space tradeoff. Its costs and benefits are expected
to vary across platforms and workloads. More measurements are needed.
---
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 (4):
bpf: Explicitly align bpf_res_spin_lock
parisc: Drop linux/kernel.h include from asm/bug.h header
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
arch/parisc/include/asm/bug.h | 2 --
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 ++++++++++++++++++
7 files changed, 36 insertions(+), 6 deletions(-)
--
2.49.1
next reply other threads:[~2025-10-20 22:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 22:28 Finn Thain [this message]
2025-10-20 22:28 ` [RFC v4 1/5] bpf: Explicitly align bpf_res_spin_lock Finn Thain
2025-10-20 22:28 ` [RFC v4 5/5] atomic: Add option for weaker alignment check Finn Thain
2025-10-20 22:28 ` [RFC v4 2/5] parisc: Drop linux/kernel.h include from asm/bug.h header Finn Thain
2025-11-08 22:39 ` Helge Deller
2025-10-20 22:28 ` [RFC v4 3/5] atomic: Specify alignment for atomic_t and atomic64_t Finn Thain
2025-11-24 0:23 ` Daniel Palmer
2025-11-25 3:52 ` Finn Thain
2025-10-20 22:28 ` [RFC v4 4/5] atomic: Add alignment check to instrumented atomic operations Finn Thain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1760999284.git.fthain@linux-m68k.org \
--to=fthain@linux-m68k.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=deller@gmx.de \
--cc=geert@linux-m68k.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox