mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
objtool: Make noinstr hacks optional
Objtool has some hacks in place to workaround toolchain limitations which otherwise would break no-instrumentation rules. Make the hacks explicit (and optional for other arches) by turning it into a cmdline option and kernel config option. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lkml.kernel.org/r/b326eeb9c33231b9dfbb925f194ed7ee40edcd7c.1650300597.git.jpoimboe@redhat.com
This commit is contained in:
committed by
Peter Zijlstra
parent
4ab7674f59
commit
22102f4559
@@ -121,6 +121,10 @@ objtool_link()
|
||||
objtoolopt="${objtoolopt} --hacks=jump_label"
|
||||
fi
|
||||
|
||||
if is_enabled CONFIG_HAVE_NOINSTR_HACK; then
|
||||
objtoolopt="${objtoolopt} --hacks=noinstr"
|
||||
fi
|
||||
|
||||
if is_enabled CONFIG_X86_KERNEL_IBT; then
|
||||
objtoolopt="${objtoolopt} --ibt"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user