diff options
| author | Alexander Potapenko <glider@google.com> | 2016-07-15 05:42:43 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-08-10 08:19:33 -0400 |
| commit | 469f00231278da68062a809306df0bac95a27507 (patch) | |
| tree | eaa548015d70c966266d20e020685eb2dcb2c532 /arch/x86/entry | |
| parent | a0cba2179ea4c1820fce2ee046b6ed90ecc56196 (diff) | |
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@google.com>
Signed-off-by: Alexander Potapenko <glider@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: aryabinin@virtuozzo.com
Cc: kasan-dev@googlegroups.com
Cc: kcc@google.com
Cc: rostedt@goodmis.org
Link: http://lkml.kernel.org/r/1468575763-144889-1-git-send-email-glider@google.com
[ Minor edits. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/entry')
| -rw-r--r-- | arch/x86/entry/entry_64.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index b846875aeea6..9f85827db24e 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) | |||
| 601 | .endm | 601 | .endm |
| 602 | #endif | 602 | #endif |
| 603 | 603 | ||
| 604 | /* Make sure APIC interrupt handlers end up in the irqentry section: */ | ||
| 605 | #if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN) | ||
| 606 | # define PUSH_SECTION_IRQENTRY .pushsection .irqentry.text, "ax" | ||
| 607 | # define POP_SECTION_IRQENTRY .popsection | ||
| 608 | #else | ||
| 609 | # define PUSH_SECTION_IRQENTRY | ||
| 610 | # define POP_SECTION_IRQENTRY | ||
| 611 | #endif | ||
| 612 | |||
| 604 | .macro apicinterrupt num sym do_sym | 613 | .macro apicinterrupt num sym do_sym |
| 614 | PUSH_SECTION_IRQENTRY | ||
| 605 | apicinterrupt3 \num \sym \do_sym | 615 | apicinterrupt3 \num \sym \do_sym |
| 606 | trace_apicinterrupt \num \sym | 616 | trace_apicinterrupt \num \sym |
| 617 | POP_SECTION_IRQENTRY | ||
| 607 | .endm | 618 | .endm |
| 608 | 619 | ||
| 609 | #ifdef CONFIG_SMP | 620 | #ifdef CONFIG_SMP |
