[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-469f00231278da68062a809306df0bac95a27507@git.kernel.org>
Date: Wed, 10 Aug 2016 11:07:27 -0700
From: tip-bot for Alexander Potapenko <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: luto@...nel.org, bp@...en8.de, dvlasenk@...hat.com,
brgerst@...il.com, jpoimboe@...hat.com, hpa@...or.com,
peterz@...radead.org, dvyukov@...gle.com,
torvalds@...ux-foundation.org, tglx@...utronix.de,
glider@...gle.com, linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: [tip:x86/mm] x86, kasan, ftrace: Put APIC interrupt handlers into
.irqentry.text
Commit-ID: 469f00231278da68062a809306df0bac95a27507
Gitweb: http://git.kernel.org/tip/469f00231278da68062a809306df0bac95a27507
Author: Alexander Potapenko <glider@...gle.com>
AuthorDate: Fri, 15 Jul 2016 11:42:43 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 10 Aug 2016 14:19:33 +0200
x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text
Dmitry Vyukov has reported unexpected KASAN stackdepot growth:
https://github.com/google/kasan/issues/36
... which is caused by the APIC handlers not being present in .irqentry.text:
When building with CONFIG_FUNCTION_GRAPH_TRACER=y or CONFIG_KASAN=y, put the
APIC interrupt handlers into the .irqentry.text section. This is needed
because both KASAN and function graph tracer use __irqentry_text_start and
__irqentry_text_end to determine whether a function is an IRQ entry point.
Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
Signed-off-by: Alexander Potapenko <glider@...gle.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: aryabinin@...tuozzo.com
Cc: kasan-dev@...glegroups.com
Cc: kcc@...gle.com
Cc: rostedt@...dmis.org
Link: http://lkml.kernel.org/r/1468575763-144889-1-git-send-email-glider@google.com
[ Minor edits. ]
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/entry/entry_64.S | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index b846875..9f85827 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -601,9 +601,20 @@ apicinterrupt3 \num trace(\sym) smp_trace(\sym)
.endm
#endif
+/* Make sure APIC interrupt handlers end up in the irqentry section: */
+#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
+# define PUSH_SECTION_IRQENTRY .pushsection .irqentry.text, "ax"
+# define POP_SECTION_IRQENTRY .popsection
+#else
+# define PUSH_SECTION_IRQENTRY
+# define POP_SECTION_IRQENTRY
+#endif
+
.macro apicinterrupt num sym do_sym
+PUSH_SECTION_IRQENTRY
apicinterrupt3 \num \sym \do_sym
trace_apicinterrupt \num \sym
+POP_SECTION_IRQENTRY
.endm
#ifdef CONFIG_SMP
Powered by blists - more mailing lists