Received: by 10.223.176.5 with SMTP id f5csp2851312wra; Mon, 5 Feb 2018 10:57:35 -0800 (PST) X-Google-Smtp-Source: AH8x227NEoggKU+8TknCvubEQ+OYft5L01Jjg7AV1tfrkzIwRCtadV1Mf5V/4fU//fWDe0rJqTHk X-Received: by 2002:a17:902:59c9:: with SMTP id d9-v6mr14085021plj.146.1517857055368; Mon, 05 Feb 2018 10:57:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517857055; cv=none; d=google.com; s=arc-20160816; b=H7css96H6h4PAAtH1mt92pHk+UM+eySHnR78bTkvekyyfJSd+G1eO3M0v1VnjmcjWJ ZDDW4AC9DudEWYqxMMs1tU1sMXoOTO+ID8ibzTthOKI15MopFzPmMZOt6/odBBqaQQF5 +AC0+6NgU1QFlXIcfzzBIzmjyY19pibCttnoDrRjreWCjxZ3j8Ii/kdVzgzPRZBExg/1 7wgxINUe6g0H38IOwoQkKHutAT5Cdch+/w8Xh+qMb1v8Va+/9NHk5+/jOzfl1uIOj9dw /ibO+pUwI7ypNn8ngTiMhkUpMQXUU1md5F6k+1C9wE6pR3sk+barJMZEwx7Ce/fxASqM kwdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QC8CmJtr9On8iO48MgQqt5+WlhG/pxTZU81TfxMjAdc=; b=QYznR6AhsQJzvD1mb14xFuw/C0TDcjuJIXtamBCzLUgAPo/ITUWsxpBXVn62kzYvjI fMHFDgtOELDXlrPYuYfb2JAali8FXGbarc7y93+vvt3A0B/XTH2A7RA1Q/f4rCPOX6/M 5G2PoGjCu0GwCwY5Qnt51C7zcrVpXooQK6JHdfSGsxnk4UAFSlhYgrlUJiOimfBwTg8c vP9u/PNzyJKprHd2ofBvPNCs588k9PTmwd/DGwS+Gso9UtihgE9azIyEckZBTuJCTMqa s9Hyy1zaY0ydOLJtJWAyJhnBrxlVVLZI5dWOp++zbp5VDxNLvlAW25on//Nt+iQBnotF 2pfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11-v6si174833pls.826.2018.02.05.10.57.20; Mon, 05 Feb 2018 10:57:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753901AbeBESzw (ORCPT + 99 others); Mon, 5 Feb 2018 13:55:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:52438 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753718AbeBESZQ (ORCPT ); Mon, 5 Feb 2018 13:25:16 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8AC8A10E6; Mon, 5 Feb 2018 18:25:04 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ingo Molnar , Josh Poimboeuf , Andy Lutomirski , Borislav Petkov , Dave Hansen , David Woodhouse , Guenter Roeck , "H. Peter Anvin" , Juergen Gross , Linus Torvalds , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 4.15 26/60] objtool: Warn on stripped section symbol Date: Mon, 5 Feb 2018 10:22:59 -0800 Message-Id: <20180205182215.006306181@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182213.902626065@linuxfoundation.org> References: <20180205182213.902626065@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josh Poimboeuf jpoimboe@redhat.com commit 830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc 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 Signed-off-by: Greg Kroah-Hartman --- tools/objtool/orc_gen.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/tools/objtool/orc_gen.c +++ b/tools/objtool/orc_gen.c @@ -98,6 +98,11 @@ static int create_orc_entry(struct secti 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));