From: Jan Beulich Date: Fri, 6 Jan 2006 08:11:49 +0000 (-0800) Subject: [PATCH] i386: fix bound check IDT gate X-Git-Tag: MMI-PSA29.97-13-9~53665^2~208 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb05c3249a8e8a675e79d221f4a0874dc10ec903;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] i386: fix bound check IDT gate Other than apparently commonly assumed, the bound instruction does not require the corresponding IDT entry to have DPL 3. Acked-by: "Seth, Rohit" Acked-by: Zachary Amsden Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index f0c4060bd4d5..53ad954e3ba4 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c @@ -1078,9 +1078,9 @@ void __init trap_init(void) set_trap_gate(0,÷_error); set_intr_gate(1,&debug); set_intr_gate(2,&nmi); - set_system_intr_gate(3, &int3); /* int3-5 can be called from all */ + set_system_intr_gate(3, &int3); /* int3/4 can be called from all */ set_system_gate(4,&overflow); - set_system_gate(5,&bounds); + set_trap_gate(5,&bounds); set_trap_gate(6,&invalid_op); set_trap_gate(7,&device_not_available); set_task_gate(8,GDT_ENTRY_DOUBLEFAULT_TSS);