diff options
author | Peter Zijlstra <peterz@infradead.org> | 2018-01-16 10:24:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-15 10:54:37 +0100 |
commit | e6993149fa4d3700c66cf4607833588c052cca89 (patch) | |
tree | 07f02a2ca605b4572e0a816503d70eece0123d9a /scripts | |
parent | 8c2768139ffbcf4c85d4006d090e07f93d696073 (diff) | |
download | linux-exynos-e6993149fa4d3700c66cf4607833588c052cca89.tar.gz linux-exynos-e6993149fa4d3700c66cf4607833588c052cca89.tar.bz2 linux-exynos-e6993149fa4d3700c66cf4607833588c052cca89.zip |
objtool: Add retpoline validation
commit b5bc2231b8ad4387c9641f235ca0ad8cd300b6df upstream.
David requested a objtool validation pass for CONFIG_RETPOLINE=y enabled
builds, where it validates no unannotated indirect jumps or calls are
left.
Add an additional .discard.retpoline_safe section to allow annotating
the few indirect sites that are required and safe.
Requested-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6bed45dc2cb1..b6266dd25c14 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -269,6 +269,10 @@ objtool_args += --no-unreachable else objtool_args += $(call cc-ifversion, -lt, 0405, --no-unreachable) endif +ifdef CONFIG_RETPOLINE + objtool_args += --retpoline +endif + ifdef CONFIG_MODVERSIONS objtool_o = $(@D)/.tmp_$(@F) |