aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-13 16:10:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-13 16:10:28 -0400
commit2cc499b398c7bbcbf415017cd9588e699e04cd64 (patch)
tree40dab49f1c527830e91e4fe71052de350738e179
parentcf875cc1dc6cb43cec754e92092579a51d2ad095 (diff)
parenta7c734140aa36413944eef0f8c660e0e2256357d (diff)
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core fixes from Ingo Molnar: "Fix an objtool false positive plus an UP kernel memory corruption bug on certain configs" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Keep enough storage space if SMP=n to avoid array out of bounds scribble objtool: Fix STACK_FRAME_NON_STANDARD macro checking for function symbols
-rw-r--r--kernel/cpu.c2
-rw-r--r--tools/objtool/builtin-check.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index d948e44c471e..7b61887f7ccd 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -1201,6 +1201,8 @@ static struct cpuhp_step cpuhp_bp_states[] = {
1201 .teardown = takedown_cpu, 1201 .teardown = takedown_cpu,
1202 .cant_stop = true, 1202 .cant_stop = true,
1203 }, 1203 },
1204#else
1205 [CPUHP_BRINGUP_CPU] = { },
1204#endif 1206#endif
1205}; 1207};
1206 1208
diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
index e8a1e69eb92c..25d803148f5c 100644
--- a/tools/objtool/builtin-check.c
+++ b/tools/objtool/builtin-check.c
@@ -122,10 +122,14 @@ static bool ignore_func(struct objtool_file *file, struct symbol *func)
122 122
123 /* check for STACK_FRAME_NON_STANDARD */ 123 /* check for STACK_FRAME_NON_STANDARD */
124 if (file->whitelist && file->whitelist->rela) 124 if (file->whitelist && file->whitelist->rela)
125 list_for_each_entry(rela, &file->whitelist->rela->rela_list, list) 125 list_for_each_entry(rela, &file->whitelist->rela->rela_list, list) {
126 if (rela->sym->sec == func->sec && 126 if (rela->sym->type == STT_SECTION &&
127 rela->sym->sec == func->sec &&
127 rela->addend == func->offset) 128 rela->addend == func->offset)
128 return true; 129 return true;
130 if (rela->sym->type == STT_FUNC && rela->sym == func)
131 return true;
132 }
129 133
130 /* check if it has a context switching instruction */ 134 /* check if it has a context switching instruction */
131 func_for_each_insn(file, func, insn) 135 func_for_each_insn(file, func, insn)