public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	dyoung@redhat.com
Subject: Re: [RFC PATCH 1/2] Revert "x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel"
Date: Mon, 4 Mar 2024 18:51:26 +0800	[thread overview]
Message-ID: <ZeWnrhzU86pz7y5Z@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20240301185618.19663-2-bp@alien8.de>

On 03/01/24 at 07:56pm, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
> 
> This reverts commit ee338b9ee2822e65a85750da6129946c14962410.
> 
> This whole dynamic switching support is silly. I don't see a use case
> where one would use an old kernel with CONFIG_X86_5LEVEL disabled to
> kexec into. I.e., you use pretty much the same kernel.

It's not true. Customer may want to try to load a different kernel if
they have taken many testings and trust that kdump kernel, or for
debugging. The similar for kexec reboot into 2nd kernel. We don't
enforce kexec/kdump to work on the same kernel as the 1st kernel. With
the fail and message, user can take measure to avoid that. it's better
the failure is encountered when failing to jump to kexec/kdump kernel.

I remmeber we have use case where customer used kdump kernel different
than the 1st kernel. While I don't remember why.

> 
> But I'm open to corrections.
> 
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
> ---
>  arch/x86/kernel/kexec-bzimage64.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c
> index cde167b0ea92..4f2e47338b7f 100644
> --- a/arch/x86/kernel/kexec-bzimage64.c
> +++ b/arch/x86/kernel/kexec-bzimage64.c
> @@ -375,11 +375,6 @@ static int bzImage64_probe(const char *buf, unsigned long len)
>  		return ret;
>  	}
>  
> -	if (!(header->xloadflags & XLF_5LEVEL) && pgtable_l5_enabled()) {
> -		pr_err("bzImage cannot handle 5-level paging mode.\n");
> -		return ret;
> -	}
> -
>  	/* I've got a bzImage */
>  	pr_debug("It's a relocatable bzImage64\n");
>  	ret = 0;
> -- 
> 2.43.0
> 


  reply	other threads:[~2024-03-04 10:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 18:56 [RFC PATCH 0/2] x86/kexec: Revert 5level dynamic switching Borislav Petkov
2024-03-01 18:56 ` [RFC PATCH 1/2] Revert "x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel" Borislav Petkov
2024-03-04 10:51   ` Baoquan He [this message]
2024-03-04 11:11     ` Borislav Petkov
2024-03-05  3:43       ` Baoquan He
2024-03-05 11:55         ` Borislav Petkov
2024-03-06  4:02           ` Baoquan He
2024-03-01 18:56 ` [RFC PATCH 2/2] Revert "x86/boot: Add xloadflags bits to check for 5-level paging support" Borislav Petkov

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=ZeWnrhzU86pz7y5Z@MiWiFi-R3L-srv \
    --to=bhe@redhat.com \
    --cc=bp@alien8.de \
    --cc=dyoung@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox