From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x2259Ah1GA/ZyF5o6+gIYGKT9MNFPNKZnsMcca5ij6UDJ7A2OU2cZUA6fc9+qHn0rthaJqBS4 ARC-Seal: i=1; a=rsa-sha256; t=1516611055; cv=none; d=google.com; s=arc-20160816; b=XfH9t9bj6xrYFQX5aR4kglwWXxm9+qMgwSpI8MtgxiZu9n52zHWb5pdkUo5qKqcYnP Z4RUgKt5X5+g+jOprxuyamnR83yss0+MakPJM77VCx09Dst823Sy5ZkSWFRWLSn5H4u3 2OdGD6BlBcxG/6UfK46voweSs6qx+nAyvVWqfIb0wNKPHRCYRRbeE09bsMhLbOhYekmH WVgoh4tp7qrmWjIPpWGwWjBKkK4IbnKIGMeaUeBtALQNz/nrmrfbbjWIU0PCDEzR+D9p ZPXwxg9faJyuZE9NvYye5gvpxplUXsi1wWS4Km4q697q9Qhlu22SnnxOTU/ZvTNrt+Mp kbWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Tdtxez4jUf2+FXwea4a2DYTwy0ReHDoIpBuSYgBqjgw=; b=tQKximNxNB83zrzyTxhUL6j35V0omG1MnWrt9euar4kYu6U/w2Ths+zLapSP+Y3TkQ x+G7FLADMyMt5V7fGPwQlGNp+5FaRB6W361ulKcxki5zy0wW6FbOSXTP22eSujM2yAp/ R8LjBk0E30JFdZC/BNQVLeS+S0gRZNO+5OLP4aszGLskdTA0V9F/JI+OYSycL+j5Opmm 03huDbrChgcII+D8QqPnuTbthXbx3hc+SehKw3Yyah0C2IRdTZ3eOMPp50EDS/AQ/fl5 bcwFAXZdnyJZNdT+wRgTAHStBLqaI65qqW5VA5AV6du8Saf+foRuwz0rU8uGgRM2o+G/ 0oBA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Simon Ser , Josh Poimboeuf , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Guenter Roeck Subject: [PATCH 4.14 03/89] objtool: Fix seg fault with clang-compiled objects Date: Mon, 22 Jan 2018 09:44:43 +0100 Message-Id: <20180122083955.010933554@linuxfoundation.org> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180122083954.683903493@linuxfoundation.org> References: <20180122083954.683903493@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590281954702042130?= X-GMAIL-MSGID: =?utf-8?q?1590281954702042130?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Simon Ser commit ce90aaf5cde4ce057b297bb6c955caf16ef00ee6 upstream. Fix a seg fault which happens when an input file provided to 'objtool orc generate' doesn't have a '.shstrtab' section (for instance, object files produced by clang don't have this section). Signed-off-by: Simon Ser Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/c0f2231683e9bed40fac1f13ce2c33b8389854bc.1514666459.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar Cc: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- tools/objtool/orc_gen.c | 2 ++ 1 file changed, 2 insertions(+) --- a/tools/objtool/orc_gen.c +++ b/tools/objtool/orc_gen.c @@ -165,6 +165,8 @@ int create_orc_sections(struct objtool_f /* create .orc_unwind_ip and .rela.orc_unwind_ip sections */ sec = elf_create_section(file->elf, ".orc_unwind_ip", sizeof(int), idx); + if (!sec) + return -1; ip_relasec = elf_create_rela_section(file->elf, sec); if (!ip_relasec)