* [PATCH] x86/boot: Make gdt 8-byte aligned
@ 2019-06-27 4:55 Xiaoyao Li
2019-06-27 7:43 ` [tip:x86/boot] " tip-bot for Xiaoyao Li
2019-06-27 9:01 ` [tip:x86/boot] x86/boot: Make the GDT " tip-bot for Xiaoyao Li
0 siblings, 2 replies; 3+ messages in thread
From: Xiaoyao Li @ 2019-06-27 4:55 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin
Cc: Xiaoyao Li, Fenghua Yu, x86, linux-kernel
When loading segment descriptor, it uses lock implicitly. Align gdt here
to avoid potential split lock from crossing cache lines case.
Signed-off-by: Xiaoyao Li <xiaoyao.li@linux.intel.com>
---
arch/x86/boot/compressed/head_64.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index fafb75c6c592..6233ae35d0d9 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -659,6 +659,7 @@ no_longmode:
gdt64:
.word gdt_end - gdt
.quad 0
+ .balign 8
gdt:
.word gdt_end - gdt
.long gdt
--
2.19.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/boot] x86/boot: Make gdt 8-byte aligned
2019-06-27 4:55 [PATCH] x86/boot: Make gdt 8-byte aligned Xiaoyao Li
@ 2019-06-27 7:43 ` tip-bot for Xiaoyao Li
2019-06-27 9:01 ` [tip:x86/boot] x86/boot: Make the GDT " tip-bot for Xiaoyao Li
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Xiaoyao Li @ 2019-06-27 7:43 UTC (permalink / raw)
To: linux-tip-commits
Cc: fenghua.yu, xiaoyao.li, tglx, mingo, hpa, linux-kernel, bp
Commit-ID: 1c30fe6cbba6997ae4740bb46910036f8a4a9edb
Gitweb: https://git.kernel.org/tip/1c30fe6cbba6997ae4740bb46910036f8a4a9edb
Author: Xiaoyao Li <xiaoyao.li@linux.intel.com>
AuthorDate: Thu, 27 Jun 2019 12:55:25 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 27 Jun 2019 09:40:41 +0200
x86/boot: Make gdt 8-byte aligned
The segment descriptors are loaded with a implicitly locked instruction,
which could trigger the split lock #AC if the variable is not properly
aligned and crosses a cache line.
Align gdt proper so the descriptors are 8 byte aligned.
Signed-off-by: Xiaoyao Li <xiaoyao.li@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lkml.kernel.org/r/20190627045525.105266-1-xiaoyao.li@linux.intel.com
---
arch/x86/boot/compressed/head_64.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index fafb75c6c592..6233ae35d0d9 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -659,6 +659,7 @@ no_longmode:
gdt64:
.word gdt_end - gdt
.quad 0
+ .balign 8
gdt:
.word gdt_end - gdt
.long gdt
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:x86/boot] x86/boot: Make the GDT 8-byte aligned
2019-06-27 4:55 [PATCH] x86/boot: Make gdt 8-byte aligned Xiaoyao Li
2019-06-27 7:43 ` [tip:x86/boot] " tip-bot for Xiaoyao Li
@ 2019-06-27 9:01 ` tip-bot for Xiaoyao Li
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Xiaoyao Li @ 2019-06-27 9:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, tglx, hpa, bp, linux-kernel, fenghua.yu, xiaoyao.li
Commit-ID: 2238246ff8d533a5f2327d1f953375876d8a013c
Gitweb: https://git.kernel.org/tip/2238246ff8d533a5f2327d1f953375876d8a013c
Author: Xiaoyao Li <xiaoyao.li@linux.intel.com>
AuthorDate: Thu, 27 Jun 2019 12:55:25 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 27 Jun 2019 10:56:11 +0200
x86/boot: Make the GDT 8-byte aligned
The segment descriptors are loaded with an implicitly LOCK-ed instruction,
which could trigger the split lock #AC exception if the variable is not
properly aligned and crosses a cache line.
Align the GDT properly so the descriptors are all 8 byte aligned.
Signed-off-by: Xiaoyao Li <xiaoyao.li@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lkml.kernel.org/r/20190627045525.105266-1-xiaoyao.li@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/boot/compressed/head_64.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index fafb75c6c592..6233ae35d0d9 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -659,6 +659,7 @@ no_longmode:
gdt64:
.word gdt_end - gdt
.quad 0
+ .balign 8
gdt:
.word gdt_end - gdt
.long gdt
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-27 9:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 4:55 [PATCH] x86/boot: Make gdt 8-byte aligned Xiaoyao Li
2019-06-27 7:43 ` [tip:x86/boot] " tip-bot for Xiaoyao Li
2019-06-27 9:01 ` [tip:x86/boot] x86/boot: Make the GDT " tip-bot for Xiaoyao Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox