mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
objtool: Add module specific retpoline rules
David allowed retpolines in .init.text, except for modules, which will trip up objtool retpoline validation, fix that. Requested-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> 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: David Woodhouse <dwmw2@infradead.org> 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>
This commit is contained in:
parent
b5bc2231b8
commit
ca41b97ed9
4 changed files with 14 additions and 2 deletions
|
@ -1958,6 +1958,15 @@ static int validate_retpoline(struct objtool_file *file)
|
|||
if (insn->retpoline_safe)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* .init.text code is ran before userspace and thus doesn't
|
||||
* strictly need retpolines, except for modules which are
|
||||
* loaded late, they very much do need retpoline in their
|
||||
* .init.text
|
||||
*/
|
||||
if (!strcmp(insn->sec->name, ".init.text") && !module)
|
||||
continue;
|
||||
|
||||
WARN_FUNC("indirect %s found in RETPOLINE build",
|
||||
insn->sec, insn->offset,
|
||||
insn->type == INSN_JUMP_DYNAMIC ? "jump" : "call");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue