Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp672715pxb; Wed, 18 Nov 2020 14:10:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5WuN03oeZ98CfO5gSKhW5/HVi0s7s8cctoOuXQiSbrpOc/XL8T3+MtDZg71FzBgGPl5Fw X-Received: by 2002:a17:906:c096:: with SMTP id f22mr24962026ejz.488.1605737416830; Wed, 18 Nov 2020 14:10:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605737416; cv=none; d=google.com; s=arc-20160816; b=DJY8bG384gh2FZ4O7wMXjvnj73WiCCQI1ne2GN7DPZJW2vb22fPaNRHEbUgbjzn8hE PIH2ssEhq/UIOAXaZrcaIE8J058wqe5vmya/K4QqduZMi78Fe3A80ru3DsHDZZuImRDQ K1dfJhHwJY1GHBT8N/g6zjQN7YJFX1OVwsbgtFFZQFb0ldPSIS0tXIxAdXgeuJoRPvLG ZTDQHrEndTlEV0/V4kB2grUUZ8WqALFIwUN8tKmMfMjMhFV0hF+lF9Vwr+nxEbgIwomp 3PItEitmHj4yefLibiv3HTdXfVPIadG3el7Xpgh+wxH9+NZE2qJap/1zRgba3gTN//GS uJ5A== 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=4XuhSBro4JmbEzc1ahwEF0ocfPBDRGYBwGKNTvA6UGE=; b=v8Ysx2geD7kOA1rduk/FFURFbYhqKN6RR9LiKqgMGCxPsGHe+/u5rQIgEFwNuk2wFp wmh9/grp/KlhT8bH0yFcqmCir4YjI1UTTJaJ2EziTNP2maPs2IzX7fAlt8ZyrQm1gBHV oDeznvpeeaanFvK2ud+0PJfFUCHSlFqCHdotQYsS+Ms0olo8i6AHu7GtYD4CsgbrtzL4 E5/6kGzhWXHMAkTdUP8/cw047q7P4Sd0MAJXEfNKHSc9wsZagXhnilCllzLZNnopMtDZ YyqZK9SHXbH24e/tJ7n2kaVTnPmGHLkvP7Fe0l15ESai0Y3Eeei0uDHnD1mP/7mib8G2 YgTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=sYNH5IyS; 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 63si17693309edb.454.2020.11.18.14.09.52; Wed, 18 Nov 2020 14:10:16 -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=sYNH5IyS; 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 S1727438AbgKRWIE (ORCPT + 99 others); Wed, 18 Nov 2020 17:08:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726815AbgKRWIC (ORCPT ); Wed, 18 Nov 2020 17:08:02 -0500 Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B128C061A4D for ; Wed, 18 Nov 2020 14:08:01 -0800 (PST) Received: by mail-qv1-xf49.google.com with SMTP id ek3so2542233qvb.0 for ; Wed, 18 Nov 2020 14:08:01 -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=4XuhSBro4JmbEzc1ahwEF0ocfPBDRGYBwGKNTvA6UGE=; b=sYNH5IySg/OAzl6C1030j5KrdvL/TknJ66ncYZZ0VJfRnkJWabJqF72HyVEtrFqsuV xHZDm78BMKoevfVrShC34UAWPm7inA3f5NPp/T5mwxJWNUaUEmUhisnupmkn6fu/2Gwc kjHvUXUV8ClEbbYTv/sJSHv6xAYf/ZgciW+HWWd1Obttcn34VOfLfUiaEuwE1mBQcIyI J7VEKckt5CvBwsRjuSRuQDHCbWNKrS0m4sNytF7pqSs/Xbr+4gRn0wdtIjpFJpzvj09z m7KNcyrQeKkKkgoq4NE1+LYU1VECryxaLniuQ5P+UABuyCF4PafQeFexbMmZ21dv9FUI l/PQ== 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=4XuhSBro4JmbEzc1ahwEF0ocfPBDRGYBwGKNTvA6UGE=; b=Q4oUq7JKRDjt9PX3WFgL2qURLpLXUiGRbLLOTYyrQJvR2Xd3Lwr9TleYUQzMtCeWME DpL2mOfwqyaxtJEcJgWds1+rl9o7nUupLAMb50l+7REnW4pJmciFu9FHjcMhLIoWycEX W+uGnkKq89HrMbVUy6mlbcfXbqICBIffj4RGjVPR6UomAksTw10xsI91GFm5yxyEQ0Ns PWuN7CCjwkTxjQQiSEPQXLU7P6OLeHw2SegYQZdRDZAx2ukCRl8u+RUDmrlI7kP6XSF0 f0uptY2WAHi7TCGMIdDBb6KEw5XS2ySwggkrVji6EXvgn7vln+3NnB0P3cwY0tiYym/q REqw== X-Gm-Message-State: AOAM531OI5qupxnauB9zPws1Vx713auSFMiKAFswy9bh4xvVYF3qPjxy CHhLTYa5CjKurON+3pMZTzCrzkdDjI4JFUdU+Gw= 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:a0c:e790:: with SMTP id x16mr7088555qvn.21.1605737280219; Wed, 18 Nov 2020 14:08:00 -0800 (PST) Date: Wed, 18 Nov 2020 14:07:26 -0800 In-Reply-To: <20201118220731.925424-1-samitolvanen@google.com> Message-Id: <20201118220731.925424-13-samitolvanen@google.com> Mime-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH v7 12/17] 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.299.gdc1121823c-goog