All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/tlb: Revert: Align TLB invalidation info
@ 2019-04-16  8:03 Peter Zijlstra
  2019-04-16  8:13 ` [tip:x86/urgent] x86/mm/tlb: Revert "x86/mm: Align TLB invalidation info" tip-bot for Peter Zijlstra
  2019-04-16 17:45 ` [PATCH] x86/tlb: Revert: Align TLB invalidation info Linus Torvalds
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Zijlstra @ 2019-04-16  8:03 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov
  Cc: Linus Torvalds, linux-kernel, Andy Lutomirski, Nadav Amit, Dave Hansen


It was found that under some .config options (notably L1_CACHE_SHIFT=7)
and compiler combinations this on-stack alignment leads to a 320 byte
stack usage, which then triggers a KASAN stack warning elsewhere.

Using 320 bytes of stack space for a 40 byte structure is ludicrous and
clearly not right.

Fixes: 515ab7c41306 ("x86/mm: Align TLB invalidation info")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
Index: linux-2.6/arch/x86/mm/tlb.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/tlb.c
+++ linux-2.6/arch/x86/mm/tlb.c
@@ -728,7 +728,7 @@ void flush_tlb_mm_range(struct mm_struct
 {
 	int cpu;
 
-	struct flush_tlb_info info __aligned(SMP_CACHE_BYTES) = {
+	struct flush_tlb_info info = {
 		.mm = mm,
 		.stride_shift = stride_shift,
 		.freed_tables = freed_tables,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-17  4:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16  8:03 [PATCH] x86/tlb: Revert: Align TLB invalidation info Peter Zijlstra
2019-04-16  8:13 ` [tip:x86/urgent] x86/mm/tlb: Revert "x86/mm: Align TLB invalidation info" tip-bot for Peter Zijlstra
2019-04-16 17:45 ` [PATCH] x86/tlb: Revert: Align TLB invalidation info Linus Torvalds
2019-04-16 18:28   ` Peter Zijlstra
2019-04-17  4:52     ` Nadav Amit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.