From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227p6OaGVAzZTqQtaj8Zw2aqBIf0gVAe9nrrKYhZdQkFxFlXAmcEDwQ0xPH13klVJtF9KzFZ ARC-Seal: i=1; a=rsa-sha256; t=1517302349; cv=none; d=google.com; s=arc-20160816; b=v1AFW6EZmzDQNqlBtqCTXvhnUzMtRG45jxWg0VfC+s0gYmo1zbe39ZQcDzrHfgVo5k +C3DZqKzonDZxmSBvjBxIz2rw6t9/6Jx1jyhIrTWuUfxpjLz+BiF/be2WFjOzv+ghPAF ZNFixuCU/0S/sX3sShgEQ+sGzKN5z0JXxOa7cJFZoDX768F/HOU040FbPVSaslrPjuMf VbtHzBz/iQcgrbG8KVhJjQOd23FMUuNpVc4kqWg/dOu5scxmg6awKp8FTLG5atknLUzc 3HM6hdRivrIFrce19sv+X0c+22TWoGx8vL3MB3w2nKotzdpGpHobCthalfjTF+hO6Ea7 n6gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=precedence:content-disposition:content-transfer-encoding :mime-version:robot-unsubscribe:robot-id:git-commit-id:subject:to :references:in-reply-to:reply-to:cc:message-id:from:sender:date :arc-authentication-results; bh=KoZjf1KpoFrSv5JDLVuSyBp84ecvFlFR+kKzBDWg70g=; b=xOj3+9YIBsOMIqgrz1E/gbzJ7i4kbysSjWGppo+qKr89F/4+ML91CoO8vyrK1nEpZ0 8rD1MrH6Ck6O6X3CQuGiGxdWEVk9ccMN+rsK5hqmB+ImwVQ5RZt0N1Q/vWDA5QCYI80E zAnO3EPWlR0mNvZJqjrkt7AimmqMsiIfWria1qcP067jBveJpmOFiBN1dDxW62bc+cZZ 72QzDcXhLFBUSbgXURtaj9PK+X5aFv8JmFf7PVSL1o2FmJpepl0Ki8EBTzE8UHlBckon /Mc/i8CI0a6A6Ryf1P/9EPHPW/d07k/XjoSuxN5zAPk6gBsxsue9qYLyfmgMEO7UhX/m WqoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of tipbot@zytor.com designates 65.50.211.136 as permitted sender) smtp.mailfrom=tipbot@zytor.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of tipbot@zytor.com designates 65.50.211.136 as permitted sender) smtp.mailfrom=tipbot@zytor.com Date: Tue, 30 Jan 2018 00:47:10 -0800 Sender: tip tree robot From: tip-bot for Josh Poimboeuf Message-ID: Cc: luto@kernel.org, peterz@infradead.org, linux@roeck-us.net, dwmw2@infradead.org, hpa@zytor.com, gregkh@linuxfoundation.org, bp@alien8.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, dave.hansen@linux.intel.com, jgross@suse.com, torvalds@linux-foundation.org, jpoimboe@redhat.com Reply-To: dave.hansen@linux.intel.com, mingo@kernel.org, torvalds@linux-foundation.org, jgross@suse.com, jpoimboe@redhat.com, hpa@zytor.com, gregkh@linuxfoundation.org, bp@alien8.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, linux@roeck-us.net, dwmw2@infradead.org, luto@kernel.org, peterz@infradead.org In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] objtool: Warn on stripped section symbol Git-Commit-ID: 2e9490ba5830a60a18a359192e938b2ad1710120 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1591006828489147946?= X-GMAIL-MSGID: =?utf-8?q?1591006828489147946?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: Commit-ID: 2e9490ba5830a60a18a359192e938b2ad1710120 Gitweb: https://git.kernel.org/tip/2e9490ba5830a60a18a359192e938b2ad1710120 Author: Josh Poimboeuf AuthorDate: Mon, 29 Jan 2018 22:00:41 -0600 Committer: Ingo Molnar CommitDate: Tue, 30 Jan 2018 07:55:05 +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 Signed-off-by: Josh Poimboeuf Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Guenter Roeck Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- 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 e5ca314..e2c3b4b 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));