linux-stable/tools/objtool
Josh Poimboeuf e31694e0a7 objtool: Don't make .altinstructions writable
When objtool creates the .altinstructions section, it sets the SHF_WRITE
flag to make the section writable -- unless the section had already been
previously created by the kernel.  The mismatch between kernel-created
and objtool-created section flags can cause failures with external
tooling (kpatch-build).  And the section doesn't need to be writable
anyway.

Make the section flags consistent with the kernel's.

Fixes: 9bc0bb5072 ("objtool/x86: Rewrite retpoline thunk calls")
Reported-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/6c284ae89717889ea136f9f0064d914cd8329d31.1624462939.git.jpoimboe@redhat.com
2021-06-24 08:55:20 +02:00
..
arch/x86 objtool: Don't make .altinstructions writable 2021-06-24 08:55:20 +02:00
Documentation objtool: Support stack layout changes in alternatives 2021-01-14 09:53:54 -06:00
include/objtool Objtool updates in this cycle were: 2021-04-28 12:53:24 -07:00
.gitignore objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
Build objtool: Enable compilation of objtool for all architectures 2020-05-20 09:17:28 -05:00
builtin-check.c objtool: Parse options from OBJTOOL_ARGS 2021-03-06 12:44:23 +01:00
builtin-orc.c objtool: Collate parse_options() users 2021-03-06 12:44:23 +01:00
check.c Objtool updates in this cycle were: 2021-04-28 12:53:24 -07:00
elf.c objtool: Fix .symtab_shndx handling for elf_create_undef_symbol() 2021-06-10 10:08:24 +02:00
Makefile objtool: Refactor ORC section generation 2021-01-14 09:53:42 -06:00
objtool.c Objtool updates in this cycle were: 2021-04-28 12:53:24 -07:00
orc_dump.c x86/unwind/orc: Change REG_SP_INDIRECT 2021-02-10 20:53:51 +01:00
orc_gen.c objtool: Create reloc sections implicitly 2021-04-02 12:44:37 +02:00
special.c objtool: Skip magical retpoline .altinstr_replacement 2021-04-02 12:46:57 +02:00
sync-check.sh Merge branch 'x86/cpu' into WIP.x86/core, to merge the NOP changes & resolve a semantic conflict 2021-04-02 12:36:30 +02:00
weak.c objtool: Refactor ORC section generation 2021-01-14 09:53:42 -06:00