From: Valentin Schneider <vschneid@redhat.com>
To: kexec@lists.infradead.org, linux-rt-users@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Eric Biederman <ebiederm@xmission.com>,
Arnd Bergmann <arnd@arndb.de>, Petr Mladek <pmladek@suse.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Thomas Gleixner <tglx@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Juri Lelli <jlelli@redhat.com>,
"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Subject: [PATCH v4 0/2] kexec, panic: Making crash_kexec() NMI safe
Date: Thu, 30 Jun 2022 23:32:56 +0100 [thread overview]
Message-ID: <20220630223258.4144112-1-vschneid@redhat.com> (raw)
Hi folks,
Here's ~v3~ v4 where we now completely get rid of kexec_mutex.
o Patch 1 makes sure all kexec_mutex acquisitions are trylocks. This prevents
having to add any while(atomic_cmpxchg()) loops which I'd really hate to see
here. If that can't be done then I think we're better off with the combined
mutex+atomic var approach.
o Patch 2 does the mutex -> atomic var switch.
Revisions
=========
v3 -> v4
++++++++
o Someone forgot to Cc LKML on v3...
v2 -> v3
++++++++
o Dropped kexec_mutex entirely and made the atomic variable the one true lock
for kexec (Eric)
v1 -> v2
++++++++
o Changed from Peterson-like synchronization to simpler atomic_cmpxchg
(Petr)
o Slightly reworded changelog
o Added Fixes: tag. Technically should be up to since kexec can happen
in an NMI, but that isn't such a clear target
Cheers,
Valentin
Valentin Schneider (2):
kexec: Turn all kexec_mutex acquisitions into trylocks
panic, kexec: Make __crash_kexec() NMI safe
include/linux/kexec.h | 2 +-
kernel/kexec.c | 11 ++++-------
kernel/kexec_core.c | 28 ++++++++++++++++------------
kernel/kexec_file.c | 4 ++--
kernel/kexec_internal.h | 15 ++++++++++++++-
kernel/ksysfs.c | 7 ++++++-
6 files changed, 43 insertions(+), 24 deletions(-)
--
2.31.1
next reply other threads:[~2022-06-30 22:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 22:32 Valentin Schneider [this message]
2022-06-30 22:32 ` [PATCH v4 1/2] kexec: Turn all kexec_mutex acquisitions into trylocks Valentin Schneider
2022-06-30 22:32 ` [PATCH v4 2/2] panic, kexec: Make __crash_kexec() NMI safe Valentin Schneider
2022-07-12 2:47 ` [PATCH v4 0/2] kexec, panic: Making crash_kexec() " Baoquan He
2022-07-12 11:13 ` Valentin Schneider
2022-07-13 17:39 ` Andrew Morton
2022-10-03 13:20 ` Valentin Schneider
2022-10-03 18:41 ` Andrew Morton
2022-07-14 11:32 ` Petr Mladek
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=20220630223258.4144112-1-vschneid@redhat.com \
--to=vschneid@redhat.com \
--cc=arnd@arndb.de \
--cc=bigeasy@linutronix.de \
--cc=ebiederm@xmission.com \
--cc=jlelli@redhat.com \
--cc=kexec@lists.infradead.org \
--cc=lgoncalv@redhat.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=tglx@linutronix.de \
/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