Re: [RFC PATCH 1/2] Revert "x86/kexec/64: Prevent kexec from 5-level paging to a 4-level only kernel"

From: Baoquan He
Date: Tue Mar 05 2024 - 23:02:24 EST


On 03/05/24 at 12:55pm, Borislav Petkov wrote:
> On Tue, Mar 05, 2024 at 11:43:01AM +0800, Baoquan He wrote:
.....
>
> > If we take off the checking, and people want to jump from the new kernel
> > to an old kernel where 5-level kernel code haven't been added or
> > CONFIG_X86_5LEVEL is unset on purpose, it won't fail and prompt message at
> > all until 2nd kernel booting silently failed. E.g, the coming RHEL10 anchor
> > a upstream kernel w/o the flag checking, people want to kexec/kdump jump
> > from rhel10 to an old rhel7 kernel. It could be an extreme case, while
> > revealing the scenario.
>
> That is the only valid reason you've given until now. Yes, that makes
> sense - the removal of those flags should go together with the removal
> of CONFIG_X86_5LEVEL and making this feature unconditional.

Please forgive my awful expression.

>
> Because, practically, that config item is enabled on every relevant
> x86 kernel config out there. It would be silly if not.

I agree. Thanks for looking into this.