[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250703134712.GV1613376@noisy.programming.kicks-ass.net>
Date: Thu, 3 Jul 2025 15:47:12 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Maxime Ripard <mripard@...hat.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kees@...nel.org,
acarmina@...hat.com, jpoimboe@...nel.org, mark.rutland@....com,
torvalds@...uxfoundation.org
Subject: Re: [PATCH 00/11] x86: WARN() hackery
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.
Powered by blists - more mailing lists