aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/stackprotector.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2009-07-18 11:11:06 -0400
committerIngo Molnar <mingo@elte.hu>2009-07-19 12:27:52 -0400
commit57594742a2b545f8f114cda34f15650be8ae976d (patch)
tree2682b10d68f3fb33aa047fa2a3ff6db2061c0740 /arch/x86/include/asm/stackprotector.h
parentfde0312d01b60a3fd5dc56e69a9613defbbc7097 (diff)
x86: Introduce set_desc_base() and set_desc_limit()
Rename set_base()/set_limit to set_desc_base()/set_desc_limit() and rewrite them in C. These are naturally introduced by the idea of get_desc_base()/get_desc_limit(). The conversion actually found the bug in apm_32.c: bad_bios_desc is written at run-time, but it is defined const variable. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> LKML-Reference: <20090718151105.GC11294@localhost.localdomain> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/stackprotector.h')
-rw-r--r--arch/x86/include/asm/stackprotector.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/include/asm/stackprotector.h b/arch/x86/include/asm/stackprotector.h
index c2d742c6e15f..cdc5e0b126a7 100644
--- a/arch/x86/include/asm/stackprotector.h
+++ b/arch/x86/include/asm/stackprotector.h
@@ -90,9 +90,7 @@ static inline void setup_stack_canary_segment(int cpu)
90 struct desc_struct desc; 90 struct desc_struct desc;
91 91
92 desc = gdt_table[GDT_ENTRY_STACK_CANARY]; 92 desc = gdt_table[GDT_ENTRY_STACK_CANARY];
93 desc.base0 = canary & 0xffff; 93 set_desc_base(&desc, canary);
94 desc.base1 = (canary >> 16) & 0xff;
95 desc.base2 = (canary >> 24) & 0xff;
96 write_gdt_entry(gdt_table, GDT_ENTRY_STACK_CANARY, &desc, DESCTYPE_S); 94 write_gdt_entry(gdt_table, GDT_ENTRY_STACK_CANARY, &desc, DESCTYPE_S);
97#endif 95#endif
98} 96}