Skip to content

Commit bb12f48

Browse files
ardbiesheuveljgross1
authored andcommitted
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 <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>
1 parent e8fbc0d commit bb12f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/platform/pvh/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ SYM_CODE_END(pvh_start_xen)
224224
.section ".init.data","aw"
225225
.balign 8
226226
SYM_DATA_START_LOCAL(gdt)
227-
.word gdt_end - gdt_start
227+
.word gdt_end - gdt_start - 1
228228
.long _pa(gdt_start) /* x86-64 will overwrite if relocated. */
229229
.word 0
230230
SYM_DATA_END(gdt)

0 commit comments

Comments
 (0)