mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: "Huang, Kai" <kai.huang@intel.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>
Cc: "dyoung@redhat.com" <dyoung@redhat.com>,
	"bsz@amazon.de" <bsz@amazon.de>,
	 "x86@kernel.org" <x86@kernel.org>, "bp@alien8.de" <bp@alien8.de>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	 "kirill.shutemov@linux.intel.com"
	<kirill.shutemov@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"horms@kernel.org" <horms@kernel.org>,
	 "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"jpoimboe@kernel.org" <jpoimboe@kernel.org>,
	"nik.borisov@suse.com" <nik.borisov@suse.com>
Subject: Re: [PATCH v9 3/4] x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier
Date: Tue, 01 Apr 2025 10:53:16 +0100	[thread overview]
Message-ID: <040c961bee810233e0213304626b46a76db2817d.camel@infradead.org> (raw)
In-Reply-To: <7e48a0ca808c9ec0520fe7769a4e44a86fbcedb6.camel@intel.com>

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

On Tue, 2025-04-01 at 09:48 +0000, Huang, Kai wrote:
> On Wed, 2025-03-26 at 14:16 +0000, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@amazon.co.uk>
> > 
> > Reduce the window during which exceptions are unhandled, by leaving
> > the
> > GDT/IDT in place all the way into the relocate_kernel() function,
> > until
> > the moment that %cr3 gets replaced.
> 
> Seems the difference is only couple of instructions.  Anyway ...

It is, although that was important when I was trying to enable CET
because one of those instructions was the indirect call.

I've given up on CET now because it's largely pointless for that
particular call. But still, putting the GDT/IDT invalidation into
relocate_kernel.S means that we can further shrink the window if we
want to look at leaving MC enabled during the handover, etc.

> > 
> > Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
> 
> Reviewed-by: Kai Huang <kai.huang@intel.com>

Thanks.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]

  reply	other threads:[~2025-04-01  9:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 14:16 [PATCH v9 0/4] x86/kexec: Add exception handling for relocate_kernel David Woodhouse
2025-03-26 14:16 ` [PATCH v9 1/4] x86/kexec: Add 8250 serial port output David Woodhouse
2025-04-10 11:13   ` [tip: x86/asm] " tip-bot2 for David Woodhouse
2025-03-26 14:16 ` [PATCH v9 2/4] x86/kexec: Add 8250 MMIO " David Woodhouse
2025-04-10 11:13   ` [tip: x86/asm] " tip-bot2 for David Woodhouse
2025-03-26 14:16 ` [PATCH v9 3/4] x86/kexec: Invalidate GDT/IDT from relocate_kernel() instead of earlier David Woodhouse
2025-04-01  9:48   ` Huang, Kai
2025-04-01  9:53     ` David Woodhouse [this message]
2025-04-10 11:12   ` [tip: x86/asm] " tip-bot2 for David Woodhouse
2025-03-26 14:16 ` [PATCH v9 4/4] selftests/kexec: Add x86_64 selftest for kexec-jump and exception handling David Woodhouse
2025-04-10 11:12   ` [tip: x86/asm] " tip-bot2 for David Woodhouse
2025-04-10  7:26 ` [PATCH v9 0/4] x86/kexec: Add exception handling for relocate_kernel 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=040c961bee810233e0213304626b46a76db2817d.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@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

all inboxes | Powered by JetHome®