]> Pileus Git - ~andy/linux/blobdiff - arch/x86/include/asm/stackprotector.h
x86: Introduce set_desc_base() and set_desc_limit()
[~andy/linux] / arch / x86 / include / asm / stackprotector.h
index c2d742c6e15f6945c19b25b46a463fbe01bc1882..cdc5e0b126a715def4bb4af7201fee74ce1f389b 100644 (file)
@@ -90,9 +90,7 @@ static inline void setup_stack_canary_segment(int cpu)
        struct desc_struct desc;
 
        desc = gdt_table[GDT_ENTRY_STACK_CANARY];
-       desc.base0 = canary & 0xffff;
-       desc.base1 = (canary >> 16) & 0xff;
-       desc.base2 = (canary >> 24) & 0xff;
+       set_desc_base(&desc, canary);
        write_gdt_entry(gdt_table, GDT_ENTRY_STACK_CANARY, &desc, DESCTYPE_S);
 #endif
 }