Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: fix ldt limit for 64 bit

Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Michael Karcher and committed by
Ingo Molnar
5ac37f87 a361ee5c

+2 -2
+2 -2
include/asm-x86/desc.h
··· 192 unsigned cpu = smp_processor_id(); 193 ldt_desc ldt; 194 195 - set_tssldt_descriptor(&ldt, (unsigned long)addr, 196 - DESC_LDT, entries * sizeof(ldt) - 1); 197 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT, 198 &ldt, DESC_LDT); 199 asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8));
··· 192 unsigned cpu = smp_processor_id(); 193 ldt_desc ldt; 194 195 + set_tssldt_descriptor(&ldt, (unsigned long)addr, DESC_LDT, 196 + entries * LDT_ENTRY_SIZE - 1); 197 write_gdt_entry(get_cpu_gdt_table(cpu), GDT_ENTRY_LDT, 198 &ldt, DESC_LDT); 199 asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8));