Skip to contentSkip to conversation

x86: make sure IDT is page aligned

PATCH Superseded Kees Cook 1 participant 1 message Jul 12, 2013 x86

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH v2 1/1 x86: make sure IDT is page aligned

Since the IDT is referenced from a fixmap, make sure it is page aligned. (32-bit already was, this is only needed on 64-bit.) This avoids the risk of it ever being moved in the bss and having the mapping be offset, resulting in calling incorrect handlers.

---
v2:
- 32-bit was already aligned, noted by PaX Team

---
 arch/x86/kernel/head_64.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/head_64.S +1 -1
index 5e4d8a8..77e6d3e 100644
@@ -513,7 +513,7 @@ ENTRY(phys_base)
 #include "../../x86/xen/xen-head.S"
 	
 	.section .bss, "aw", @nobits
-	.align L1_CACHE_BYTES
+	.align PAGE_SIZE
 ENTRY(idt_table)
 	.skip IDT_ENTRIES * 16
 
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security