From: David Woodhouse <dwmw2@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: kexec@lists.infradead.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Kai Huang <kai.huang@intel.com>,
Nikolay Borisov <nik.borisov@suse.com>,
linux-kernel@vger.kernel.org, Simon Horman <horms@kernel.org>,
Dave Young <dyoung@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
jpoimboe@kernel.org, bsz@amazon.de
Subject: Re: [PATCH v7 7/8] [DO NOT MERGE] x86/kexec: Add int3 in kexec path for testing
Date: Thu, 13 Mar 2025 18:38:38 +0000 [thread overview]
Message-ID: <8d9253eda0fd74595db05eb3449ccc5be2f563be.camel@infradead.org> (raw)
In-Reply-To: <Z9MQqYbGBAvTz4Ox@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]
On Thu, 2025-03-13 at 18:06 +0100, Ingo Molnar wrote:
>
> * David Woodhouse <dwmw2@infradead.org> wrote:
>
> > The exception handler already returns if the exception was int3, but
> > not for anything else. Less so the "print something warm and fuzzy"
> > part; it just does the same register dump. But we could change that.
> >
> > I'm less keen on making it unconditional though. Kexec is a
> > performance-critical path when every millisecond is perceived as
> > guest steal time, and the serial output should only happen in
> > production if something goes *wrong*.
> >
> > And besides, most kexec users don't have early_printk enabled anyway
> > so if we break them, this idea doesn't help.
>
> So this check would only cause any real overhead if serial debugging is
> enabled - in which case there's already substantial overhead due to the
> serial console overhead (virtual or otherwise).
>
> As to not printing anything unless the early serial console is enabled
> - that's fine, we'd still *break* if something doesn't work in this
> code path, so at least the exception handling machinery is kept
> well-tested. :-)
I suppose so, although it's also fairly easy to test by adding an int3
into a kexec-jump test case like http://david.woodhou.se/loadret.c
But yeah, it's easy enough to make the int3 register dump a little less
scary and then remove the 'DO NOT MERGE' tag from the commit which adds
the unconditional int3.
I'm still trying to chase down the new objtool warning you noted (which
I swear I saw once but now can't reproduce), and I note I need to make
the early_printk hooks depend on (KEXEC_CORE && X86_64) since I removed
the separate KEXEC_DEBUG option and made it all unconditional.
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]
next prev parent reply other threads:[~2025-03-13 18:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 14:34 [PATCH v7 0/8] x86/kexec: Add exception handling for relocate_kernel David Woodhouse
2025-03-12 14:34 ` [PATCH v7 1/8] x86/kexec: Debugging support: load a GDT David Woodhouse
2025-03-12 14:34 ` [PATCH v7 2/8] x86/kexec: Debugging support: Load an IDT and basic exception entry points David Woodhouse
2025-03-12 14:34 ` [PATCH v7 3/8] x86/kexec: Debugging support: Dump registers on exception David Woodhouse
2025-03-12 14:34 ` [PATCH v7 4/8] x86/kexec: Add 8250 serial port output David Woodhouse
2025-03-13 10:35 ` Ingo Molnar
2025-03-12 14:34 ` [PATCH v7 5/8] x86/kexec: Add 8250 MMIO " David Woodhouse
2025-03-12 14:34 ` [PATCH v7 6/8] x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier David Woodhouse
2025-03-12 14:34 ` [PATCH v7 7/8] [DO NOT MERGE] x86/kexec: Add int3 in kexec path for testing David Woodhouse
2025-03-13 10:44 ` Ingo Molnar
2025-03-13 11:06 ` David Woodhouse
2025-03-13 17:06 ` Ingo Molnar
2025-03-13 18:38 ` David Woodhouse [this message]
2025-03-12 14:34 ` [PATCH v7 8/8] [DO NOT MERGE] x86/kexec: Add CFI type information to relocate_kernel() David Woodhouse
2025-03-14 16:07 ` Josh Poimboeuf
2025-03-14 17:23 ` David Woodhouse
2025-03-14 17:52 ` Josh Poimboeuf
2025-03-14 18:29 ` David Woodhouse
2025-03-17 12:40 ` David Woodhouse
2025-03-18 0:17 ` Josh Poimboeuf
2025-03-18 0:24 ` Josh Poimboeuf
2025-03-18 15:56 ` David Woodhouse
2025-03-18 17:14 ` Josh Poimboeuf
2025-03-18 21:06 ` David Woodhouse
2025-03-18 22:41 ` Josh Poimboeuf
2025-03-19 13:04 ` David Woodhouse
2025-03-19 15:47 ` Josh Poimboeuf
2025-03-22 11:38 ` David Woodhouse
2025-03-13 10:46 ` [PATCH v7 0/8] x86/kexec: Add exception handling for relocate_kernel Ingo Molnar
2025-03-13 10:54 ` Ingo Molnar
2025-03-13 19:58 ` David Woodhouse
2025-03-14 9:25 ` David Woodhouse
2025-03-14 10:21 ` Ingo Molnar
2025-03-14 10:37 ` David Woodhouse
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=8d9253eda0fd74595db05eb3449ccc5be2f563be.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=bp@alien8.de \
--cc=bsz@amazon.de \
--cc=dave.hansen@linux.intel.com \
--cc=dyoung@redhat.com \
--cc=horms@kernel.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kai.huang@intel.com \
--cc=kexec@lists.infradead.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=nik.borisov@suse.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--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