public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Finn Thain <fthain@linux-m68k.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Will Deacon <will@kernel.org>,  Arnd Bergmann <arnd@arndb.de>,
	Boqun Feng <boqun.feng@gmail.com>,  Gary Guo <gary@garyguo.net>,
	Mark Rutland <mark.rutland@arm.com>,
	 linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-m68k@lists.linux-m68k.org, Sasha Levin <sashal@kernel.org>,
	 Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,  Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	 x86@kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	 "H. Peter Anvin" <hpa@zytor.com>,
	linux-efi@vger.kernel.org
Subject: Re: [PATCH v6 3/4] atomic: Add alignment check to instrumented atomic operations
Date: Tue, 6 Jan 2026 08:22:26 +1100 (AEDT)	[thread overview]
Message-ID: <07b62c4e-d3e7-dcc6-8752-0780faaeec24@linux-m68k.org> (raw)
In-Reply-To: <20260105160634.GA2393663@noisy.programming.kicks-ass.net>


On Mon, 5 Jan 2026, Peter Zijlstra wrote:

> On Wed, Dec 31, 2025 at 07:25:42PM +1100, Finn Thain wrote:
> > From: Peter Zijlstra <peterz@infradead.org>
> > 
> > Add a Kconfig option for debug builds which logs a warning when an
> > instrumented atomic operation takes place that's misaligned.
> > Some platforms don't trap for this.
> > 
> > [fthain: added __DISABLE_BUG_TABLE macro.]
> > 
> > Cc: Sasha Levin <sashal@kernel.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Borislav Petkov <bp@alien8.de>
> > Cc: Dave Hansen <dave.hansen@linux.intel.com>
> > Cc: x86@kernel.org
> > Cc: Ard Biesheuvel <ardb@kernel.org>
> > Cc: "H. Peter Anvin" <hpa@zytor.com>
> > Link: https://lore.kernel.org/lkml/20250901093600.GF4067720@noisy.programming.kicks-ass.net/
> > Link: https://lore.kernel.org/linux-next/df9fbd22-a648-ada4-fee0-68fe4325ff82@linux-m68k.org/
> > Signed-off-by: Finn Thain <fthain@linux-m68k.org>
> > ---
> > Checkpatch.pl says...
> > ERROR: Missing Signed-off-by: line by nominal patch author 'Peter Ziljstra <peterz@infradead.org>'
> > ---
> > Changed since v5:
> >  - Add new __DISABLE_BUG_TABLE macro to prevent a build failure on those
> > architectures which use atomics in pre-boot code like the EFI stub loader:
> > 
> > x86_64-linux-gnu-ld: error: unplaced orphan section `__bug_table' from `arch/x86/boot/compressed/sev-handle-vc.o'
> 
> Urgh, so why not simply use __DISABLE_EXPORTS, that's typically (ab)used
> for these things?
> 

OK, I'll change it back to __DISABLE_EXPORTS.

> Also, unless __DISABLE_BUG_TABLE goes live inside asm/bug.h and kills
> all __bug_table emissions, its a misnomer.
> 

Yes, __DISABLE_BUG_TABLE is certainly a misnomer, since what it actually 
does is to elide code that would emit bug table entries. I would argue 
that this distinction is splitting hairs but it's moot.

> Furthermore, that SEV thing is broken and needs to be fixed anyway, this 
> isn't helping it much. noinstr code should not be using instrumented 
> things to begin with.
> 

The problem is not confined to x86. I needed something that would work for 
loongarch, arm, riscv etc.

Anyway, thanks for your review. I will make the necessary changes.

  reply	other threads:[~2026-01-05 21:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 4/4] atomic: Add option for weaker alignment check 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 [this message]
2025-12-31  8:25 ` [PATCH v6 2/4] atomic: Specify alignment for atomic_t and atomic64_t 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=07b62c4e-d3e7-dcc6-8752-0780faaeec24@linux-m68k.org \
    --to=fthain@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=gary@garyguo.net \
    --cc=hpa@zytor.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=x86@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