Received: by 10.223.176.5 with SMTP id f5csp2852362wra; Mon, 5 Feb 2018 10:58:55 -0800 (PST) X-Google-Smtp-Source: AH8x226t+arp/yqQLqzpmtYY7RzhuO84hQs8mPcVZk/k0P+eWLY5Y1puHmS1ZQew16ITEXCCKqaO X-Received: by 2002:a17:902:560f:: with SMTP id h15-v6mr11449085pli.302.1517857135091; Mon, 05 Feb 2018 10:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517857135; cv=none; d=google.com; s=arc-20160816; b=aujVpcleXF5MI0PUaagB/qgpvwJXuyEOEcRjVijTggK5OuWsjGDNWO15E8V4hXUut1 X07vDyuFlI+HOijXf31k/KtAF0zxII9aKE8FpU1rz6ot8spkd6BsMoX9dBY6zYlh6+L2 Jupsg/rNTWIHSt/YZtom2Sq5nBQt0i6PMdmx5mVrOFFvpKkl7iB4SbamTCyUpICAJK6u EDYEUMekb3FpzIhC6wsa4yoKXqtOfGvabr5v92UPxoinZwRNER+/zmkHl5oKcxCH7i+G C3hrRh5XqR7YIVWMyxETzR+T5xx/2zbAlzA01z1phoQImheaI7WXSYCHTAnLXOE1QLyj Ou6A== 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=ZZubJTTOLhLL1OsXqj2oHrbesRtDuFeanKjVAPe6Sm4=; b=M94bV7PWeVyWTFx/Mx7w+Z9WnVksq/MxcgIhT1dbF76pHpQu436g//bamhOjRaD4rA OMqmfSFUBzeoVYTwT+aTXEyXO2fG55lznSQwEALMhts4L5xXNRAxI/1HIfHurHrWLTk/ YrGMvTAF3G+uDPr3JO/cveb2hjbbsahTvnTPHAjAVLn5RPmaU+860PnYNJv/DB3h5c6q AeKwS3VUHx0Hae00Wo/pjagecxjRFk/6SPqBaeHTo2Sm3Av9/PwL7uxQMTlQsfSQxDHh hPcW64+mKJnVK2DSdZfDXM87ueB/npe6in0Oiq40n2CtOHuXDkJr1SKWgTH/KHDGjwHS HLGw== 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 p9-v6si5354067pls.317.2018.02.05.10.58.40; Mon, 05 Feb 2018 10:58:55 -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 S1753648AbeBESYz (ORCPT + 99 others); Mon, 5 Feb 2018 13:24:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753471AbeBESXx (ORCPT ); Mon, 5 Feb 2018 13:23:53 -0500 Received: from localhost (unknown [104.132.1.108]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 45A52FB6; Mon, 5 Feb 2018 18:23:50 +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.14 30/64] objtool: Warn on stripped section symbol Date: Mon, 5 Feb 2018 10:22:49 -0800 Message-Id: <20180205182139.819380740@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180205182138.571333346@linuxfoundation.org> References: <20180205182138.571333346@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.14-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));