linux-brain/tools/objtool
Josh Poimboeuf d431ba6911 objtool: Move objtool_file struct off the stack
commit 0c671812f1 upstream.

Objtool uses over 512k of stack, thanks to the hash table embedded in
the objtool_file struct.  This causes an unnecessarily large stack
allocation and breaks users with low stack limits.

Move the struct off the stack.

Fixes: 042ba73fe7 ("objtool: Add several performance improvements")
Reported-by: Vassili Karpov <moosotc@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/df92dcbc4b84b02ffa252f46876df125fb56e2d7.1552954176.git.jpoimboe@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27 14:13:52 +09:00
..
arch/x86 objtool, kprobes/x86: Sync the latest <asm/insn.h> header with tools/objtool/arch/x86/include/asm/insn.h 2018-06-21 04:02:58 +09:00
Documentation x86/asm: Fix inline asm call constraints for Clang 2017-09-23 15:06:20 +02:00
.gitignore objtool: Move synced files to their original relative locations 2017-12-29 17:53:41 +01:00
arch.h objtool: Assume unannotated UD2 instructions are dead ends 2017-07-28 08:33:32 +02:00
Build objtool: Add ORC unwind table generation 2017-07-18 10:57:43 +02:00
builtin-check.c objtool: Add module specific retpoline rules 2018-03-15 10:54:38 +01:00
builtin-orc.c objtool: Use existing global variables for options 2018-03-15 10:54:37 +01:00
builtin.h objtool: Add module specific retpoline rules 2018-03-15 10:54:38 +01:00
cfi.h objtool: Handle GCC stack pointer adjustment bug 2017-08-30 10:48:41 +02:00
check.c objtool: Move objtool_file struct off the stack 2019-03-27 14:13:52 +09:00
check.h objtool: Add retpoline validation 2018-03-15 10:54:37 +01:00
elf.c objtool: Fix segfault in .cold detection with -ffunction-sections 2018-12-17 09:28:50 +01:00
elf.h objtool: Support GCC 8's cold subfunctions 2018-06-05 11:41:54 +02:00
Makefile Kbuild: fix # escaping in .cmd files for future Make 2018-07-11 16:29:21 +02:00
objtool.c objtool: Print top level commands on incorrect usage 2017-12-25 14:26:14 +01:00
orc_dump.c objtool: Fix 64-bit build on 32-bit host 2017-12-29 17:53:42 +01:00
orc_gen.c objtool: Warn on stripped section symbol 2018-02-07 11:12:21 -08:00
orc.h objtool: Move synced files to their original relative locations 2017-12-29 17:53:41 +01:00
special.c objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
special.h objtool: Add tool to perform compile-time stack metadata validation 2016-02-29 08:35:12 +01:00
sync-check.sh objtool: Move kernel headers/code sync check to a script 2017-12-29 17:53:42 +01:00
warn.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00