From: Ard Biesheuvel Date: Wed, 9 Oct 2024 16:04:41 +0000 (+0200) Subject: x86/pvh: Use correct size value in GDT descriptor X-Git-Tag: v6.13-rc1~202^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb12f48cd150666b96858443e0fc26e92bb7e498;p=thirdparty%2Fkernel%2Flinux.git x86/pvh: Use correct size value in GDT descriptor The limit field in a GDT descriptor is an inclusive bound, and therefore one less than the size of the covered range. Reviewed-by: Jason Andryuk Tested-by: Jason Andryuk Signed-off-by: Ard Biesheuvel Message-ID: <20241009160438.3884381-9-ardb+git@google.com> Signed-off-by: Juergen Gross --- diff --git a/arch/x86/platform/pvh/head.S b/arch/x86/platform/pvh/head.S index ce4fd8d33da46..5a196fb3ebd8a 100644 --- a/arch/x86/platform/pvh/head.S +++ b/arch/x86/platform/pvh/head.S @@ -224,7 +224,7 @@ SYM_CODE_END(pvh_start_xen) .section ".init.data","aw" .balign 8 SYM_DATA_START_LOCAL(gdt) - .word gdt_end - gdt_start + .word gdt_end - gdt_start - 1 .long _pa(gdt_start) /* x86-64 will overwrite if relocated. */ .word 0 SYM_DATA_END(gdt)