Re: [PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread Kees Cook
On Tue, Apr 9, 2013 at 5:14 PM, H. Peter Anvin wrote: > On 04/09/2013 09:39 AM, Kees Cook wrote: >> - >> static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c) >> { >> /* calling is from identify_secondary_cpu() ? */ >> @@ -206,8 +192,7 @@ static void __cpuinit

Re: [PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread H. Peter Anvin
On 04/09/2013 09:39 AM, Kees Cook wrote: > - > static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c) > { > /* calling is from identify_secondary_cpu() ? */ > @@ -206,8 +192,7 @@ static void __cpuinit intel_workarounds(struct > cpuinfo_x86 *c) > /* >* All current

[PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread Kees Cook
Make a copy of the IDT (as seen via the "sidt" instruction) read-only. This primarily removes the IDT from being a target for arbitrary memory write attacks, and has the added benefit of also not leaking the kernel base offset, if it has been relocated. Signed-off-by: Kees Cook Cc: Eric Northup

[PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread Kees Cook
Make a copy of the IDT (as seen via the sidt instruction) read-only. This primarily removes the IDT from being a target for arbitrary memory write attacks, and has the added benefit of also not leaking the kernel base offset, if it has been relocated. Signed-off-by: Kees Cook

Re: [PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread H. Peter Anvin
On 04/09/2013 09:39 AM, Kees Cook wrote: - static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c) { /* calling is from identify_secondary_cpu() ? */ @@ -206,8 +192,7 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) /* * All current models of

Re: [PATCH v2] x86: use fixed read-only IDT

2013-04-09 Thread Kees Cook
On Tue, Apr 9, 2013 at 5:14 PM, H. Peter Anvin h...@zytor.com wrote: On 04/09/2013 09:39 AM, Kees Cook wrote: - static void __cpuinit intel_smp_check(struct cpuinfo_x86 *c) { /* calling is from identify_secondary_cpu() ? */ @@ -206,8 +192,7 @@ static void __cpuinit