All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Waiman Long <llong@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2] x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Date: Wed, 04 Dec 2024 19:03:08 +0100	[thread overview]
Message-ID: <87zflbqqar.ffs@tglx> (raw)
In-Reply-To: <7aa93137-4b5e-474f-a99c-47acffdf71a3@redhat.com>

On Wed, Dec 04 2024 at 12:23, Waiman Long wrote:
> On 12/4/24 8:10 AM, Thomas Gleixner wrote:
>> On Tue, Dec 03 2024 at 10:07, Waiman Long wrote:
>>> +	/*
>>> +	 * Call the emergency handler first, if set
>>> +	 * Emergency handler is not traced or checked by nmi_check_duration().
>>> +	 */
>>> +	ehandler = READ_ONCE(desc->emerg_handler);
>>> +	if (ehandler)
>>> +		handled = ehandler(type, regs);
>> Shouldn't this just stop processing right here?
>
> Yes in the case of crash_nmi_callback(). I suppose it is a no-return 
> call. As the emergency handler is supposed to be a general mechanism in 
> design, I don't want to make too many assumptions of what will happen 
> when the handler is invoked.

I'm not convinced that this should be used as a general mechanism. It's
for emergency situations and that's where it stops. If the thing
returns, it's a bug IMO.

Thanks,

        tglx



  reply	other threads:[~2024-12-04 18:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 15:07 [PATCH v2] x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus() Waiman Long
2024-12-04  1:00 ` Rik van Riel
2024-12-04  1:39   ` Waiman Long
2024-12-04  7:58 ` kernel test robot
2024-12-04 13:10 ` Thomas Gleixner
2024-12-04 17:23   ` Waiman Long
2024-12-04 18:03     ` Thomas Gleixner [this message]
2024-12-04 19:28       ` Waiman Long
2024-12-05  4:01         ` Waiman Long
2024-12-05 13:12           ` Thomas Gleixner
     [not found]             ` <1166fd72-8a4a-489f-9de5-7c06b70b0ad4@redhat.com>
2024-12-05 18:17               ` Thomas Gleixner
2024-12-06  4:16                 ` Waiman Long

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=87zflbqqar.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llong@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.