mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <mripard@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kees@kernel.org,
	 acarmina@redhat.com, jpoimboe@kernel.org, mark.rutland@arm.com,
	 torvalds@linuxfoundation.org
Subject: Re: [PATCH 00/11] x86: WARN() hackery
Date: Wed, 9 Jul 2025 11:33:29 +0200	[thread overview]
Message-ID: <20250709-nondescript-fuzzy-grouse-6ba509@houat> (raw)
In-Reply-To: <20250703134712.GV1613376@noisy.programming.kicks-ass.net>

[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]

On Thu, Jul 03, 2025 at 03:47:12PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 03, 2025 at 03:40:01PM +0200, Maxime Ripard wrote:
> > Hi,
> > 
> > On Sat, Jun 07, 2025 at 11:42:24AM +0200, Peter Zijlstra wrote:
> > > Slightly less mad this time :-)
> > > 
> > > The primary purpose of all this is to get the WARN() printk() and
> > > __warn() calls into the same context. Notably the current state is that
> > > WARN() ends up doing printk() in-place, then takes an exception and has
> > > the exception do the __warn().
> > > 
> > > The problem with all this is the ONCE logic. Normal WARN_ON_ONCE()
> > > (without the printk) has the ONCE logic in the exception
> > > (__report_bug()). But because WARN() essentially results in two distinct
> > > actions (printk + trap) this cannot work.  With the result that
> > > additional ONCE logic is sprinkled around for each such site.
> > > 
> > > Current proposals look to make this worse by adding KUnit checks for all
> > > this, including regular WARN. Making the per-instance code overhead even
> > > worse.
> > > 
> > > As such, by moving the printk() into the exception, and having the
> > > exception (__report_bug() in fact) do everything, we get rid of the
> > > external ONCE logic and provide a cental place for additional conditions
> > > without need to litter all the instances.
> > 
> > Thanks a lot for working on that. What is the status of this patch? It
> > looks like Linus was happy with it, and I understood that you felt it
> > was a blocker for the kunit warning work we'd really like to get merged
> > at some point.
> 
> I talked to Mark Rutland about arm64 support, to see if the things I did
> are generic enough for other architectures to support, or if there's
> anything I need to change.
> 
> He said he was going to have a poke, but it appears he's not had time
> yet.
> 
> Once he's happy, I think we can move this forward. Obviously I have to
> rebase on top of the things Ingo stuck in meanwhile, but that shouldn't
> be too hard.

Ack, thanks for the update :)

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]

      reply	other threads:[~2025-07-09  9:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07  9:42 Peter Zijlstra
2025-06-07  9:42 ` [PATCH 01/11] x86: Provide assembly __bug_table helpers Peter Zijlstra
2025-06-07  9:42 ` [PATCH 02/11] bug: Add BUG_FORMAT infrastructure Peter Zijlstra
2025-06-07  9:42 ` [PATCH 03/11] bug: Clean up CONFIG_GENERIC_BUG_RELATIVE_POINTERS Peter Zijlstra
2025-06-07  9:42 ` [PATCH 04/11] bug: Add BUG_FORMAT_ARGS infrastructure Peter Zijlstra
2025-06-07  9:42 ` [PATCH 05/11] bug: Add report_bug_entry() Peter Zijlstra
2025-06-07  9:42 ` [PATCH 06/11] bug: Allow architectures to provide __WARN_printf() Peter Zijlstra
2025-06-07  9:42 ` [PATCH 07/11] x86_64/bug: Add BUG_FORMAT basics Peter Zijlstra
2025-06-07  9:42 ` [PATCH 08/11] x86_64/bug: Implement __WARN_printf() Peter Zijlstra
2025-06-07 10:08   ` Peter Zijlstra
2025-06-07  9:42 ` [PATCH 09/11] x86/bug: Implement WARN_ONCE() Peter Zijlstra
2025-06-07  9:42 ` [PATCH 10/11] x86: Clean up default rethunk warning Peter Zijlstra
2025-06-07  9:42 ` [PATCH 11/11] x86_64/bug: Inline the UD1 Peter Zijlstra
2025-06-07 14:22 ` [PATCH 00/11] x86: WARN() hackery Linus Torvalds
2025-07-03 13:40 ` Maxime Ripard
2025-07-03 13:47   ` Peter Zijlstra
2025-07-09  9:33     ` Maxime Ripard [this message]

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=20250709-nondescript-fuzzy-grouse-6ba509@houat \
    --to=mripard@redhat.com \
    --cc=acarmina@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linuxfoundation.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

all inboxes | Powered by JetHome®