Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1724568

[PATCH 1/8] objtool: Don't report end of section error after an empty unwind hint

From Josh Poimboeuf <jpoimboe@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 1/8] objtool: Don't report end of section error after an empty unwind hint
Date 2017-08-31 22:30 +0200
Message-ID <ukEga-217-23@gated-at.bofh.it> (permalink)
References <ukEg9-217-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


If asm code specifies an UNWIND_HINT_EMPTY hint, don't warn if the
section ends unexpectedly.  This can happen with the xen-head.S code
because the hypercall_page is "text" but it's all zeros.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
 tools/objtool/check.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f744617c9946..d8683f0fe04d 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -1737,11 +1737,14 @@ static int validate_branch(struct objtool_file *file, struct instruction *first,
 		if (insn->dead_end)
 			return 0;
 
-		insn = next_insn;
-		if (!insn) {
+		if (!next_insn) {
+			if (state.cfa.base == CFI_UNDEFINED)
+				return 0;
 			WARN("%s: unexpected end of section", sec->name);
 			return 1;
 		}
+
+		insn = next_insn;
 	}
 
 	return 0;
-- 
2.13.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] x86/asm: Add unwind hint annotations to head code Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 22:30 +0200
  [PATCH 5/8] x86/boot: Annotate verify_cpu() as a callable function Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 22:30 +0200
  [PATCH 1/8] objtool: Don't report end of section error after an empty unwind hint Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 22:30 +0200
  [PATCH 6/8] x86/xen: Fix xen head ELF annotations Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 22:30 +0200
  [PATCH 3/8] x86/head: Remove unused 'bad_address' code Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 22:30 +0200

csiph-web