x86: Fixup asm-offsets duplicate
authorPeter Zijlstra (Intel) <peterz@infradead.org>
Mon, 17 Oct 2022 14:41:06 +0000 (16:41 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Oct 2022 14:41:06 +0000 (16:41 +0200)
It turns out that 'stack_canary_offset' is a variable name; shadowing
that with a #define is ripe of fail when the asm-offsets.h header gets
included. Rename the thing.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
arch/x86/entry/entry_64.S
arch/x86/kernel/asm-offsets_64.c

index 9249a45cf53fd7c3f4ed9e6b6b9ccb75e2a31104..5c578a7dfcd79def8cbb934f175fd81a09cad3fb 100644 (file)
@@ -252,7 +252,7 @@ SYM_FUNC_START(__switch_to_asm)
 
 #ifdef CONFIG_STACKPROTECTOR
        movq    TASK_stack_canary(%rsi), %rbx
-       movq    %rbx, PER_CPU_VAR(fixed_percpu_data) + stack_canary_offset
+       movq    %rbx, PER_CPU_VAR(fixed_percpu_data) + FIXED_stack_canary
 #endif
 
        /*
index 9b698215d2618e6b01e3112bc5ea1047447dc8a9..bb65371ea9df521e37cf6d0c27688a9fbf47af19 100644 (file)
@@ -57,7 +57,7 @@ int main(void)
        BLANK();
 
 #ifdef CONFIG_STACKPROTECTOR
-       DEFINE(stack_canary_offset, offsetof(struct fixed_percpu_data, stack_canary));
+       OFFSET(FIXED_stack_canary, fixed_percpu_data, stack_canary);
        BLANK();
 #endif
        return 0;