diff options
author | Andy Lutomirski <luto@kernel.org> | 2019-11-21 11:50:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-29 10:08:04 +0100 |
commit | 2ecf73fc147fdcddfc0cb1efb37190b2bbcae2c3 (patch) | |
tree | 1959457e2b25e6a8f17e5ecb6baaf882a49568f7 /arch/x86 | |
parent | 238e5e0984c53e759d1cd908f94113e175db0aca (diff) | |
download | linux-stable-2ecf73fc147fdcddfc0cb1efb37190b2bbcae2c3.tar.gz linux-stable-2ecf73fc147fdcddfc0cb1efb37190b2bbcae2c3.tar.bz2 linux-stable-2ecf73fc147fdcddfc0cb1efb37190b2bbcae2c3.zip |
x86/doublefault/32: Fix stack canaries in the double fault handler
commit 3580d0b29cab08483f84a16ce6a1151a1013695f upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/doublefault.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/doublefault.c b/arch/x86/kernel/doublefault.c index 0b8cedb20d6d..d5c9b13bafdf 100644 --- a/arch/x86/kernel/doublefault.c +++ b/arch/x86/kernel/doublefault.c @@ -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), }; |