From: tip-bot for Josh Poimboeuf <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jgross@suse.com, jpoimboe@redhat.com,
dave.hansen@linux.intel.com, tglx@linutronix.de, hpa@zytor.com,
linux@roeck-us.net, bp@alien8.de, dwmw2@infradead.org,
torvalds@linux-foundation.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, luto@kernel.org,
peterz@infradead.org, mingo@kernel.org
Subject: [tip:x86/pti] objtool: Warn on stripped section symbol
Date: Tue, 30 Jan 2018 06:13:43 -0800 [thread overview]
Message-ID: <tip-830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc@git.kernel.org> (raw)
In-Reply-To: <dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com>
Commit-ID: 830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc
Gitweb: https://git.kernel.org/tip/830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc
Author: Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Mon, 29 Jan 2018 22:00:41 -0600
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 30 Jan 2018 15:09:23 +0100
objtool: Warn on stripped section symbol
With the following fix:
2a0098d70640 ("objtool: Fix seg fault with gold linker")
... a seg fault was avoided, but the original seg fault condition in
objtool wasn't fixed. Replace the seg fault with an error message.
Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/orc_gen.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/objtool/orc_gen.c b/tools/objtool/orc_gen.c
index e61fe70..18384d9 100644
--- a/tools/objtool/orc_gen.c
+++ b/tools/objtool/orc_gen.c
@@ -98,6 +98,11 @@ static int create_orc_entry(struct section *u_sec, struct section *ip_relasec,
struct orc_entry *orc;
struct rela *rela;
+ if (!insn_sec->sym) {
+ WARN("missing symbol for section %s", insn_sec->name);
+ return -1;
+ }
+
/* populate ORC data */
orc = (struct orc_entry *)u_sec->data->d_buf + idx;
memcpy(orc, o, sizeof(*orc));
next prev parent reply other threads:[~2018-01-30 14:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 4:00 [PATCH 0/4] objtool: seg fault fixes and retpoline improvements Josh Poimboeuf
2018-01-30 4:00 ` [PATCH 1/4] objtool: Improve retpoline alternative handling Josh Poimboeuf
2018-01-30 8:46 ` [tip:x86/pti] " tip-bot for Josh Poimboeuf
2018-01-30 14:12 ` tip-bot for Josh Poimboeuf
2018-01-30 4:00 ` [PATCH 2/4] objtool: Add support for alternatives at the end of a section Josh Poimboeuf
2018-01-30 8:46 ` [tip:x86/pti] " tip-bot for Josh Poimboeuf
2018-01-30 14:13 ` tip-bot for Josh Poimboeuf
2018-01-30 4:00 ` [PATCH 3/4] objtool: Warn on stripped section symbol Josh Poimboeuf
2018-01-30 8:47 ` [tip:x86/pti] " tip-bot for Josh Poimboeuf
2018-01-30 14:13 ` tip-bot for Josh Poimboeuf [this message]
2018-01-30 4:00 ` [PATCH 4/4] objtool: Don't print '.tmp_' prefix for .o files Josh Poimboeuf
2018-01-30 8:47 ` [tip:x86/pti] objtool: Don't print '.tmp_' prefix for .o files when CONFIG_MODVERSIONS=y tip-bot for Josh Poimboeuf
2018-01-30 9:58 ` [PATCH 4/4] objtool: Don't print '.tmp_' prefix for .o files Peter Zijlstra
2018-01-30 15:53 ` Josh Poimboeuf
2018-01-31 6:17 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox