linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: x86/urgent] x86/doublefault/32: Fix stack canaries in the double fault handler
@ 2019-11-21 20:14 tip-bot2 for Andy Lutomirski
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Andy Lutomirski @ 2019-11-21 20:14 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Andy Lutomirski, Peter Zijlstra (Intel), stable, x86, LKML

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     3580d0b29cab08483f84a16ce6a1151a1013695f
Gitweb:        https://git.kernel.org/tip/3580d0b29cab08483f84a16ce6a1151a1013695f
Author:        Andy Lutomirski <luto@kernel.org>
AuthorDate:    Thu, 21 Nov 2019 11:50:12 +01:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 21 Nov 2019 19:37:42 +01:00

x86/doublefault/32: Fix stack canaries in the double fault handler

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
---
 arch/x86/kernel/doublefault.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kernel/doublefault.c b/arch/x86/kernel/doublefault.c
index 0b8cedb..d5c9b13 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),
 };

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-21 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-21 20:14 [tip: x86/urgent] x86/doublefault/32: Fix stack canaries in the double fault handler tip-bot2 for Andy Lutomirski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).