]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/pvh: Use correct size value in GDT descriptor
authorArd Biesheuvel <ardb@kernel.org>
Wed, 9 Oct 2024 16:04:41 +0000 (18:04 +0200)
committerJuergen Gross <jgross@suse.com>
Tue, 29 Oct 2024 16:23:32 +0000 (17:23 +0100)
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 <jason.andryuk@amd.com>
Tested-by: Jason Andryuk <jason.andryuk@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Message-ID: <20241009160438.3884381-9-ardb+git@google.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
arch/x86/platform/pvh/head.S

index ce4fd8d33da4672a18da13c3f11a32c0ff096fb0..5a196fb3ebd8a33d53bf400d79f0ef86b0bb853e 100644 (file)
@@ -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)