[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e30d9d16-de3f-0c72-6404-e94399e08697@kernel.org>
Date: Sat, 15 May 2021 08:30:21 -0700
From: Andy Lutomirski <luto@...nel.org>
To: "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 6/9] x86/kexec: set_[gi]dt() ->
native_[gi]dt_invalidate() in machine_kexec_*.c
On 5/14/21 6:43 PM, H. Peter Anvin wrote:
> From: "H. Peter Anvin (Intel)" <hpa@...or.com>
>
> These files contain private set_gdt() functions which are only used to
> invalid the gdt; machine_kexec_64.c also contains a set_idt()
> function to invalidate the idt.
>
> phys_to_virt(0) *really* doesn't make any sense for creating an
> invalid GDT. A NULL pointer (virtual 0) makes a lot more sense;
> although neither will allow any actual memory reference, a NULL
> pointer stands out more.
>
> Replace these calls with native_[gi]dt_invalidate().
>
> Signed-off-by: H. Peter Anvin (Intel) <hpa@...or.com>
Acked-by: Andy Lutomirski <luto@...nel.org>
Powered by blists - more mailing lists