Skip to content

Commit

Permalink
x86/doublefault/32: Fix stack canaries in the double fault handler
Browse files Browse the repository at this point in the history
The double fault TSS was missing GS setup, which is needed for stack
canaries to work.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@kernel.org
  • Loading branch information
Andy Lutomirski authored and Peter Zijlstra committed Nov 21, 2019
1 parent 922eea2 commit 3580d0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kernel/doublefault.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ struct x86_hw_tss doublefault_tss __cacheline_aligned = {
.ss = __KERNEL_DS,
.ds = __USER_DS,
.fs = __KERNEL_PERCPU,
#ifndef CONFIG_X86_32_LAZY_GS
.gs = __KERNEL_STACK_CANARY,
#endif

.__cr3 = __pa_nodebug(swapper_pg_dir),
};
Expand Down

0 comments on commit 3580d0b

Please sign in to comment.