]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/boot: Fix incorrect startup_gdt_descr.size
authorYuntao Wang <ytcoode@gmail.com>
Mon, 7 Aug 2023 08:45:47 +0000 (16:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:13 +0000 (11:08 +0100)
commit81b8638e4ef4632f26b18a21e5d4d06fc5d1aac2
tree9aaa0f0e75b5ecad5d88d208a52ee6f862927f23
parentc7e8c7452e5a9ae89ce6f588c1d04e13cdb5df45
x86/boot: Fix incorrect startup_gdt_descr.size

[ Upstream commit 001470fed5959d01faecbd57fcf2f60294da0de1 ]

Since the size value is added to the base address to yield the last valid
byte address of the GDT, the current size value of startup_gdt_descr is
incorrect (too large by one), fix it.

[ mingo: This probably never mattered, because startup_gdt[] is only used
         in a very controlled fashion - but make it consistent nevertheless. ]

Fixes: 866b556efa12 ("x86/head/64: Install startup GDT")
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20230807084547.217390-1-ytcoode@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/head64.c