Patch "objtool: Fix 32-bit build" has been added to the 4.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
objtool: Fix 32-bit build
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
objtool-fix-32-bit-build.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
63474dc4ac7ed3848a4786b9592dd061901f606dMon Sep 17 00:00:00 2001
From: Josh Poimboeuf <[email protected]>
Date: Tue, 6 Mar 2018 17:58:15 -0600
Subject: objtool: Fix 32-bit build
From: Josh Poimboeuf <[email protected]>
commit 63474dc4ac7ed3848a4786b9592dd061901f606d upstream.
Fix the objtool build when cross-compiling a 64-bit kernel on a 32-bit host. This also simplifies read_retpoline_hints() a bit and makes its implementation similar to most of the other annotation reading functions.
--- tools/objtool/check.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-)
tools/objtool/check.c +7 -20
@@ -1115,42 +1115,29 @@ static int read_unwind_hints(struct objtstatic int read_retpoline_hints (struct objtool_file *file) { -struct section *sec, *relasec; +struct section *sec;struct instruction *insn;struct rela *rela; -int i; - sec =find_section_by_name (file->elf,".discard.retpoline_safe" ); + sec =find_section_by_name (file->elf,".rela.discard.retpoline_safe" );if (!sec)return 0 ; - relasec = sec->rela; -if (!relasec) { -WARN ("missing .rela.discard.retpoline_safe section" ); -return -1 ; - } - -if (sec->len %sizeof (unsigned long )) { -WARN ("retpoline_safe size mismatch: %d %ld" , sec->len,sizeof (unsigned long )); -return -1 ; - } - -for (i =0 ; i < sec->len /sizeof (unsigned long ); i++) { - rela =find_rela_by_dest (sec, i *sizeof (unsigned long )); -if (!rela) { -WARN ("can't find rela for retpoline_safe[%d]" , i); +list_for_each_entry (rela, &sec->rela_list, list) { +if (rela->sym->type !=STT_SECTION ) { +WARN ("unexpected relocation symbol type in %s" , sec->name);return -1 ; } insn =find_insn (file, rela->sym->sec, rela->addend);if (!insn) { -WARN ("can't find insn for retpoline_safe[%d]" , i); +WARN ("bad .discard.retpoline_safe entry" );return -1 ; }if (insn->type !=INSN_JUMP_DYNAMIC && insn->type !=INSN_CALL_DYNAMIC ) { -WARN_FUNC ("retpoline_safe hint not a indirect jump/call" , +WARN_FUNC ("retpoline_safe hint not an indirect jump/call" , insn->sec, insn->offset);return -1 ; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/x86-kprobes-fix-kernel-crash-when-probing-.entry_trampoline-code.patch queue-4.14/objtool-fix-32-bit-build.patch queue-4.14/x86-boot-objtool-annotate-indirect-jump-in-secondary_startup_64.patch queue-4.14/objtool-add-module-specific-retpoline-rules.patch queue-4.14/x86-ldt-avoid-warning-in-32-bit-builds-with-older-gcc.patch queue-4.14/x86-entry-reduce-the-code-footprint-of-the-idtentry-macro.patch queue-4.14/objtool-retpolines-integrate-objtool-with-retpoline-support-more-closely.patch queue-4.14/nospec-include-asm-barrier.h-dependency.patch queue-4.14/x86-mm-remove-stale-comment-about-kmemcheck.patch queue-4.14/objtool-add-retpoline-validation.patch queue-4.14/x86-mm-sme-objtool-annotate-indirect-call-in-sme_encrypt_execute.patch queue-4.14/x86-asm-improve-how-gen_-_suffixed_rmwcc-specify-clobbers.patch queue-4.14/x86-64-realmode-add-instruction-suffix.patch queue-4.14/objtool-fix-another-switch-table-detection-issue.patch queue-4.14/x86-speculation-objtool-annotate-indirect-calls-jumps-for-objtool.patch queue-4.14/x86-paravirt-objtool-annotate-indirect-calls.patch queue-4.14/objtool-use-existing-global-variables-for-options.patch queue-4.14/x86-entry-64-use-xorl-for-faster-register-clearing.patch queue-4.14/nospec-kill-array_index_nospec_mask_check.patch