public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/4] Align atomic storage
@ 2025-12-31  8:25 Finn Thain
  2025-12-31  8:25 ` [PATCH v6 1/4] bpf: Explicitly align bpf_res_spin_lock Finn Thain
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Finn Thain @ 2025-12-31  8:25 UTC (permalink / raw)
  To: Andrew Morton, Peter Zijlstra, Will Deacon
  Cc: Andrii Nakryiko, Ard Biesheuvel, Arnd Bergmann,
	Alexei Starovoitov, Boqun Feng, Borislav Petkov, bpf, Rich Felker,
	Daniel Borkmann, Dave Hansen, Dinh Nguyen, Eduard Zingerman,
	Gary Guo, Geert Uytterhoeven, John Paul Adrian Glaubitz, Guo Ren,
	Hao Luo, H. Peter Anvin, John Fastabend, Jiri Olsa, Jonas Bonn,
	KP Singh, linux-arch, linux-csky, linux-efi, linux-kernel,
	linux-m68k, linux-openrisc, linux-sh, Mark Rutland,
	Martin KaFai Lau, Ingo Molnar, Sasha Levin, Stanislav Fomichev,
	Stafford Horne, Song Liu, Stefan Kristiansson, Thomas Gleixner,
	x86, Yonghong Song, Yoshinori Sato

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 v5:
 - Added acked-by and revewed-by tags.
 - Added a new macro to inhibit emission of __bug_table section, for the
 benefit of pre-boot code like the EFI stub loader.

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

 arch/x86/boot/compressed/Makefile     |  1 +
 drivers/firmware/efi/libstub/Makefile |  1 +
 include/asm-generic/atomic64.h        |  2 +-
 include/asm-generic/rqspinlock.h      |  2 +-
 include/linux/instrumented.h          | 17 +++++++++++++++++
 include/linux/types.h                 |  2 +-
 kernel/bpf/rqspinlock.c               |  1 -
 lib/Kconfig.debug                     | 18 ++++++++++++++++++
 8 files changed, 40 insertions(+), 4 deletions(-)

-- 
2.49.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-01-05 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31  8:25 [PATCH v6 0/4] Align atomic storage Finn Thain
2025-12-31  8:25 ` [PATCH v6 1/4] bpf: Explicitly align bpf_res_spin_lock Finn Thain
2025-12-31  8:25 ` [PATCH v6 3/4] atomic: Add alignment check to instrumented atomic operations Finn Thain
2026-01-05 16:06   ` Peter Zijlstra
2026-01-05 21:22     ` Finn Thain
2025-12-31  8:25 ` [PATCH v6 2/4] atomic: Specify alignment for atomic_t and atomic64_t Finn Thain
2025-12-31  8:25 ` [PATCH v6 4/4] atomic: Add option for weaker alignment check Finn Thain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox