All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@purestorage.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Uday Shankar <ushankar@purestorage.com>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, James Morse <james.morse@arm.com>,
	Borislav Petkov <bp@alien8.de>, Len Brown <len.brown@intel.com>,
	linux-hardening@vger.kernel.org, linux-acpi@vger.kernel.org,
	Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Subject: Re: [PATCH] Revert "ACPI, APEI, use raw spinlock in ERST"
Date: Mon, 21 Aug 2023 20:16:05 -0700	[thread overview]
Message-ID: <ZOQodU1CNMRtjYZ6@cork> (raw)
In-Reply-To: <87y1i3c015.fsf@yhuang6-desk2.ccr.corp.intel.com>

On Tue, Aug 22, 2023 at 09:56:38AM +0800, Huang, Ying wrote:
> 
> ERST is mainly used to log the hardware error.  While, hardware error
> may be reported via NMI (e.g., ACPI APEI GHES NMI), so we need to call
> ERST functions in NMI handlers.  Where normal spinlock cannot be used
> because they will be converted to sleepable rt_mutex in RT kernel.

Non-sleeping spinlocks cannot be used in NMI context either.
raw_spin_lock_irqsave() will prevent regular interrupts, but not NMI.
So taking a spinlock inside an NMI can trigger a deadlock.

Am I missing something here?

Jörn

--
All art is but imitation of nature.
-- Lucius Annaeus Seneca

  reply	other threads:[~2023-08-22  3:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22  1:09 [PATCH] Revert "ACPI, APEI, use raw spinlock in ERST" Uday Shankar
2023-08-22  1:56 ` Huang, Ying
2023-08-22  3:16   ` Jörn Engel [this message]
2023-08-22 23:45     ` Uday Shankar
2023-08-23  2:38       ` Huang, Ying
2023-08-23  2:57         ` Jörn Engel
2023-08-23 21:09           ` Jörn Engel
2023-08-23  2:28     ` Huang, Ying

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=ZOQodU1CNMRtjYZ6@cork \
    --to=joern@purestorage.com \
    --cc=bp@alien8.de \
    --cc=gpiccoli@igalia.com \
    --cc=james.morse@arm.com \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=rafael@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=ushankar@purestorage.com \
    --cc=ying.huang@intel.com \
    /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.