Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp381594pxu; Tue, 1 Dec 2020 13:43:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyr1xDWUfCh4CVDMu7bWDqZLfxapAeu2rTr3rnqHzY64ck7iVYCHZBwtU52Ur542bfoNS+m X-Received: by 2002:a17:906:26c6:: with SMTP id u6mr4896886ejc.349.1606858985976; Tue, 01 Dec 2020 13:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606858985; cv=none; d=google.com; s=arc-20160816; b=qtPgLAc0BuJI5lRdqQmP6xtW2qp6z2NoZuqRV5MNgIk4EY2xazxLJN85VupFPJOIFY ZMwhlbz9oaEvAB32KGaDC243TTmhKpkVDgm0HyAOnQZgtSoDumWNzyLSDelSjqGnSLId BlNO1ddelyP3pKkz4DYztdsJ54BvsDxGA8xn9t/O5f1PXdpu7Lt1qxPa3U7SAhJ6YBaz G8k12VUE8fOsmxmCNuWRDkP8VUP6oqdZ1hgDW93xbKIC3YdPJ87pBXEajfw5aBYRRc1P /FlX4zW7gDQCTQFhmzO6tG2UsIaVsA5XuXNJBeWaumZtUJ/Wneot2DHnoEkhqZdKezuu pQ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=2x/zjVn7tqzzMwlgW94lOF/53GHge2qEfxVssZKSVKU=; b=EYge6BSfZPokJx/5NGvB8DCf6l0vHKYDrCoxv8HrTOf9tgm9In8dlhJQ65QjHqi2bi QUCDr3SsZX3dMAIBpco3aQIceUi5UJdOj/tNPFI2M2r9Sc8WJJbY3BvYQL47RxDJV0ma AhePNftsAMFDHRwSeiWgvb45Dyyj7FKrnQmrSUy5dx5hDgItNvzs5r1kxrkkQSv0Sk0U EGY6sMuHxCVKMWfZfErIqK+2QB8QyNrTm6CKVKqlASWP0Ah+hH+V3ehIuUi3eIhEIJuz K9GIQ/KqdAghWAMZB91gF9mH6UKfxy0KnTQ5Eoe1SB5x00GgWj2OZBF70mvpb+FmziV/ E60A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N2hjZ+w1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si796736ejv.263.2020.12.01.13.42.43; Tue, 01 Dec 2020 13:43:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N2hjZ+w1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389855AbgLAVj3 (ORCPT + 99 others); Tue, 1 Dec 2020 16:39:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389777AbgLAVj1 (ORCPT ); Tue, 1 Dec 2020 16:39:27 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FEEEC094259 for ; Tue, 1 Dec 2020 13:37:41 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id k7so4017206ybm.13 for ; Tue, 01 Dec 2020 13:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=2x/zjVn7tqzzMwlgW94lOF/53GHge2qEfxVssZKSVKU=; b=N2hjZ+w1m+tzNKULGFriHMyI0W/WLxUEDGY1DnBMXxPtD5xhjPfovZ1l0CpNo2iRQO +tTomPyUoponyE1362CelbbrDZwWrvZ66ad2D/JxuGm1GX6gaUseX8hQbfi3OUGkhp0H 9SmgV/+6Q7Bt3K0LuNqv/RrzRFY59diqYwZBhEZG9fnh7VFPaEUCT6hXis0JB7dm8/Jq tWSPkyod8RuoKjamef9WjpoKLdp1BdmoMZ4kk/XBfD1LF2w8eoyA6CMmckQwNxU7jj5H YD9zFativ+Sd8bT4A5VYcPCPPXLEbmnubfljTsMu/1a5ZsRn5Qy9mkUKuq9Y0tLJtllx jchQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=2x/zjVn7tqzzMwlgW94lOF/53GHge2qEfxVssZKSVKU=; b=WVN/y3tYBWPWFc0Vmb0zm9/SIgiwW9uDQVUAqkp5eVtLl2SnZxryFzuQaDlznVpsR2 fz3OfLIGCS4dHufvxNpKM1Sk8O+xZl6+nWkUVGhijDWu7IkSaDJ28OdK7tweDRaK3blL ZDJTh66BiVrE9LfzihuxreM1qe1t0jfxj58QFKRegem4saOVKKxRcNPDfwDxaYc5lsSt MP+Tw4rPPxa/KKURuetZNualLgl+mUqMHbD8qlXiE3BzxWg9XxThiP+ca5rzJokbR/Is 2sMPbH4venX88Sx0hJw3Mk5Ek4EBA1HJ5HVs4carzgQQPp1I1eu7Yd7mw/foKLjjDk7r ZkjQ== X-Gm-Message-State: AOAM530CZglrK4DcDNMSmeK9YEE8zL6vfOC32pI9rv2MZdEYD340tvlH aMckC7ODfv/XsbcO2BblYqkklFpwJYNZ4kwc9FE= Sender: "samitolvanen via sendgmr" X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:f693:9fff:fef4:1b6d]) (user=samitolvanen job=sendgmr) by 2002:a25:c106:: with SMTP id r6mr7621086ybf.519.1606858660290; Tue, 01 Dec 2020 13:37:40 -0800 (PST) Date: Tue, 1 Dec 2020 13:37:03 -0800 In-Reply-To: <20201201213707.541432-1-samitolvanen@google.com> Message-Id: <20201201213707.541432-13-samitolvanen@google.com> Mime-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> X-Mailer: git-send-email 2.29.2.576.ga3fc446d84-goog Subject: [PATCH v8 12/16] efi/libstub: disable LTO From: Sami Tolvanen To: Masahiro Yamada , Steven Rostedt , Will Deacon Cc: Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Sami Tolvanen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With CONFIG_LTO_CLANG, we produce LLVM bitcode instead of ELF object files. Since LTO is not really needed here and the Makefile assumes we produce an object file, disable LTO for libstub. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook --- drivers/firmware/efi/libstub/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 8a94388e38b3..c23466e05e60 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -38,6 +38,8 @@ KBUILD_CFLAGS := $(cflags-y) -Os -DDISABLE_BRANCH_PROFILING \ # remove SCS flags from all objects in this directory KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) +# disable LTO +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS)) GCOV_PROFILE := n # Sanitizer runtimes are unavailable and cannot be linked here. -- 2.29.2.576.ga3fc446d84-goog