[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <169632239730.3135.5499875554711156270.tip-bot2@tip-bot2>
Date: Tue, 03 Oct 2023 08:39:57 -0000
From: "tip-bot2 for Yuntao Wang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Yuntao Wang <ytcoode@...il.com>, Ingo Molnar <mingo@...nel.org>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: x86/boot] x86/boot: Fix incorrect startup_gdt_descr.size
The following commit has been merged into the x86/boot branch of tip:
Commit-ID: 001470fed5959d01faecbd57fcf2f60294da0de1
Gitweb: https://git.kernel.org/tip/001470fed5959d01faecbd57fcf2f60294da0de1
Author: Yuntao Wang <ytcoode@...il.com>
AuthorDate: Mon, 07 Aug 2023 16:45:47 +08:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 03 Oct 2023 10:28:29 +02:00
x86/boot: Fix incorrect startup_gdt_descr.size
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@...il.com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: "H. Peter Anvin" <hpa@...or.com>
Link: https://lore.kernel.org/r/20230807084547.217390-1-ytcoode@gmail.com
---
arch/x86/kernel/head64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 49f7629..bbc2179 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -80,7 +80,7 @@ static struct desc_struct startup_gdt[GDT_ENTRIES] = {
* while the kernel still uses a direct mapping.
*/
static struct desc_ptr startup_gdt_descr = {
- .size = sizeof(startup_gdt),
+ .size = sizeof(startup_gdt)-1,
.address = 0,
};
Powered by blists - more mailing lists