From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B573C433E0 for ; Sat, 9 Jan 2021 00:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AE072333E for ; Sat, 9 Jan 2021 00:29:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbhAIA3t (ORCPT ); Fri, 8 Jan 2021 19:29:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbhAIA3t (ORCPT ); Fri, 8 Jan 2021 19:29:49 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3E8EC061573 for ; Fri, 8 Jan 2021 16:29:08 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id x12so6526769plr.10 for ; Fri, 08 Jan 2021 16:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eveSrO3foL1YR94SADi/xGNY6RU/HiTPaoR//1jI2bc=; b=cemTR8rQ+v7aAc1j8X9bSjTtMv/2eIij1J0jQdOW7eNBqbQFCd58aSYpax3rZVT2eY aoIsHA/4koMVUbI+TLf/cwAkcwY2XCmvpLcT//0ZhklFs+Yz+KCOHvj4iDKgepwwDCy2 psVcFqYTpa0VlbUiLHsCrmO18jt6/WbjHzn9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eveSrO3foL1YR94SADi/xGNY6RU/HiTPaoR//1jI2bc=; b=fsb1f0F0jODtr/T4utGg4qdCAijqoVlso+CaykLse0LrGRYJKhfB3v2ED+LrO5hDxm VuLLuqmxsh1yWezsBq0E2kNhyb26vAl3WDPStxe0odkod3L6FkdhCPbgORDxdid+BrwZ OAdj2CIGmWu8rSsCmHWAHWnKOuWkP+H/WAHCRDQQgJhdjwggriVCpEd0ZF9KaMebU8zX jMVKotLM5JomYpKisuPXik/O9N2FaKoNgOUWQgwakuoSrNXqPXb+30SPlOuDjcYlDLWs 7vx4QnYOGz5VubTtvzHLxe2ghO7w9h+lRdlHBOBp2lc6H15BqvfzCAj3wgiICD6Skzwy YeRQ== X-Gm-Message-State: AOAM531PUDExq3SEr+l8iX+mI1FQUDXKZ2sE24b9OC+u+hnmJGOc0OZX A9OBMKdIKXeFZQ0thpRL5lAX8w== X-Google-Smtp-Source: ABdhPJxOK52D16pcAwbT6jFjbq8GC4r4IJlAOsTNR/onet1CRy5aKa4cGbW3hXo1Ls7QfN7irIfQYg== X-Received: by 2002:a17:90a:db08:: with SMTP id g8mr6363172pjv.163.1610152148560; Fri, 08 Jan 2021 16:29:08 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p16sm9332768pju.47.2021.01.08.16.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 16:29:07 -0800 (PST) From: Kees Cook To: Steven Rostedt , Sami Tolvanen , Will Deacon , Masahiro Yamada Cc: Kees Cook , clang-built-linux@googlegroups.com, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, "Paul E. McKenney" , Josh Poimboeuf , linux-kernel@vger.kernel.org, Peter Zijlstra , Greg Kroah-Hartman , kernel-hardening@lists.openwall.com, Nick Desaulniers , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v9 00/16] Add support for Clang LTO Date: Fri, 8 Jan 2021 16:27:13 -0800 Message-Id: <161015202326.2511797.6087273163265436487.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201211184633.3213045-1-samitolvanen@google.com> References: <20201211184633.3213045-1-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Dec 2020 10:46:17 -0800, Sami Tolvanen wrote: > This patch series adds support for building the kernel with Clang's > Link Time Optimization (LTO). In addition to performance, the primary > motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) > to be used in the kernel. Google has shipped millions of Pixel > devices running three major kernel versions with LTO+CFI since 2018. > > Most of the patches are build system changes for handling LLVM > bitcode, which Clang produces with LTO instead of ELF object files, > postponing ELF processing until a later stage, and ensuring initcall > ordering. > > [...] Applied to kspp/lto/v5.11-rc2, thanks! I'll let 0-day grind on this over the weekend and toss it in -next on Monday if there aren't any objections. [01/16] tracing: move function tracer options to Kconfig https://git.kernel.org/kees/c/3b15cdc15956 [02/16] kbuild: add support for Clang LTO https://git.kernel.org/kees/c/833174494976 [03/16] kbuild: lto: fix module versioning https://git.kernel.org/kees/c/6eb20c5338a0 [04/16] kbuild: lto: limit inlining https://git.kernel.org/kees/c/f6db4eff0691 [05/16] kbuild: lto: merge module sections https://git.kernel.org/kees/c/d03e46783689 [06/16] kbuild: lto: add a default list of used symbols https://git.kernel.org/kees/c/81bfbc27b122 [07/16] init: lto: ensure initcall ordering https://git.kernel.org/kees/c/7918ea64195d [08/16] init: lto: fix PREL32 relocations https://git.kernel.org/kees/c/a51d9615ffb5 [09/16] PCI: Fix PREL32 relocations for LTO https://git.kernel.org/kees/c/dc83615370e7 [10/16] modpost: lto: strip .lto from module names https://git.kernel.org/kees/c/5c0312ef3ca0 [11/16] scripts/mod: disable LTO for empty.c https://git.kernel.org/kees/c/3d05432db312 [12/16] efi/libstub: disable LTO https://git.kernel.org/kees/c/b12eba00cb87 [13/16] drivers/misc/lkdtm: disable LTO for rodata.o https://git.kernel.org/kees/c/ed02e86f1752 [14/16] arm64: vdso: disable LTO https://git.kernel.org/kees/c/d73692f0f527 [15/16] arm64: disable recordmcount with DYNAMIC_FTRACE_WITH_REGS https://git.kernel.org/kees/c/09b812ac146f [16/16] arm64: allow LTO to be selected https://git.kernel.org/kees/c/1354b8946c46 -- Kees Cook From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02EABC433DB for ; Sat, 9 Jan 2021 00:30:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B92E723A79 for ; Sat, 9 Jan 2021 00:30:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B92E723A79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FJ1RB5iEhwoOHUU/kuFm9rrxRZwSeURUX5ovTXUn5Vg=; b=BhpIYU4XLEr1TZYk9l/H9MdB1 vpDklFJYeLCEGd2KVd9S9kdRSDGOc68fjmB74yT/aHln02JksYkajpC9Zk9uJEpkNlfXRxCCvFVFC pewuX9dKpJ509xR7iv0Q6s1oaG8gJsGRFBvYQTiDmoTZpmAdc2xGjqhrNPcC8hFxxjtNRO4t4OBQj lpB+50xoSUyiRtOmkHGNvISx6kHu+6rPx/DNbSoO+LW6puUuJaMOQ+jHhuhozRjG+LSKJz06cqhSu XjeSruCSW0U/Dir33oXJSwr0TCwkEisrK9IXOTz2KDJnwjMRKBiYaiiy/gAVNgc7f61KQPOzfFBv9 XaBv86w/Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ky283-0005hz-Mv; Sat, 09 Jan 2021 00:29:15 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ky280-0005gu-K1 for linux-arm-kernel@lists.infradead.org; Sat, 09 Jan 2021 00:29:13 +0000 Received: by mail-pl1-x635.google.com with SMTP id x18so6540523pln.6 for ; Fri, 08 Jan 2021 16:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eveSrO3foL1YR94SADi/xGNY6RU/HiTPaoR//1jI2bc=; b=cemTR8rQ+v7aAc1j8X9bSjTtMv/2eIij1J0jQdOW7eNBqbQFCd58aSYpax3rZVT2eY aoIsHA/4koMVUbI+TLf/cwAkcwY2XCmvpLcT//0ZhklFs+Yz+KCOHvj4iDKgepwwDCy2 psVcFqYTpa0VlbUiLHsCrmO18jt6/WbjHzn9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eveSrO3foL1YR94SADi/xGNY6RU/HiTPaoR//1jI2bc=; b=GVWZo1FwSpzgCq6on+DjsgkQuCa8vM9dEuetGBfqaz8RI0nnh8bTRl3Kk41wWWtV8T rWSC0nqHu0KEMHifnbcptNSfPLpSF656MBFzxZUqM7rVucwQvZgTdJqNBhPuCf7l2AjA k+wu8LDTM3Y0cXLt4oOKtDP4vcuUUw0G04en6mMBhQj1yX8Rh8afTkXJrVMHWPfH/Nsz 5G0e1KwMUS8ytq6hCw8cw81R8xN3M+/d+3Rl2gxQcLM+tzvA/kRL5778sYqutFlr9sru ixfz2FZfLe03teQoGUgBLxqnQvPk2+8i/ImfRSUFyt6bxEwq8XsG22mzBSHUL5Yf5Z18 +iiw== X-Gm-Message-State: AOAM530mx3sQQ20Y9Sy7tshSO3qXskuzLwibDOjw/zTSHScS6lU0oFhD zL2jf44V02SGzCxpoEtZW3CIQw== X-Google-Smtp-Source: ABdhPJxOK52D16pcAwbT6jFjbq8GC4r4IJlAOsTNR/onet1CRy5aKa4cGbW3hXo1Ls7QfN7irIfQYg== X-Received: by 2002:a17:90a:db08:: with SMTP id g8mr6363172pjv.163.1610152148560; Fri, 08 Jan 2021 16:29:08 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id p16sm9332768pju.47.2021.01.08.16.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 16:29:07 -0800 (PST) From: Kees Cook To: Steven Rostedt , Sami Tolvanen , Will Deacon , Masahiro Yamada Subject: Re: [PATCH v9 00/16] Add support for Clang LTO Date: Fri, 8 Jan 2021 16:27:13 -0800 Message-Id: <161015202326.2511797.6087273163265436487.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201211184633.3213045-1-samitolvanen@google.com> References: <20201211184633.3213045-1-samitolvanen@google.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_192912_700861_C7BDC171 X-CRM114-Status: GOOD ( 17.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Kees Cook , "Paul E. McKenney" , linux-kbuild@vger.kernel.org, Peter Zijlstra , linux-pci@vger.kernel.org, kernel-hardening@lists.openwall.com, Nick Desaulniers , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Greg Kroah-Hartman , Josh Poimboeuf , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 11 Dec 2020 10:46:17 -0800, Sami Tolvanen wrote: > This patch series adds support for building the kernel with Clang's > Link Time Optimization (LTO). In addition to performance, the primary > motivation for LTO is to allow Clang's Control-Flow Integrity (CFI) > to be used in the kernel. Google has shipped millions of Pixel > devices running three major kernel versions with LTO+CFI since 2018. > > Most of the patches are build system changes for handling LLVM > bitcode, which Clang produces with LTO instead of ELF object files, > postponing ELF processing until a later stage, and ensuring initcall > ordering. > > [...] Applied to kspp/lto/v5.11-rc2, thanks! I'll let 0-day grind on this over the weekend and toss it in -next on Monday if there aren't any objections. [01/16] tracing: move function tracer options to Kconfig https://git.kernel.org/kees/c/3b15cdc15956 [02/16] kbuild: add support for Clang LTO https://git.kernel.org/kees/c/833174494976 [03/16] kbuild: lto: fix module versioning https://git.kernel.org/kees/c/6eb20c5338a0 [04/16] kbuild: lto: limit inlining https://git.kernel.org/kees/c/f6db4eff0691 [05/16] kbuild: lto: merge module sections https://git.kernel.org/kees/c/d03e46783689 [06/16] kbuild: lto: add a default list of used symbols https://git.kernel.org/kees/c/81bfbc27b122 [07/16] init: lto: ensure initcall ordering https://git.kernel.org/kees/c/7918ea64195d [08/16] init: lto: fix PREL32 relocations https://git.kernel.org/kees/c/a51d9615ffb5 [09/16] PCI: Fix PREL32 relocations for LTO https://git.kernel.org/kees/c/dc83615370e7 [10/16] modpost: lto: strip .lto from module names https://git.kernel.org/kees/c/5c0312ef3ca0 [11/16] scripts/mod: disable LTO for empty.c https://git.kernel.org/kees/c/3d05432db312 [12/16] efi/libstub: disable LTO https://git.kernel.org/kees/c/b12eba00cb87 [13/16] drivers/misc/lkdtm: disable LTO for rodata.o https://git.kernel.org/kees/c/ed02e86f1752 [14/16] arm64: vdso: disable LTO https://git.kernel.org/kees/c/d73692f0f527 [15/16] arm64: disable recordmcount with DYNAMIC_FTRACE_WITH_REGS https://git.kernel.org/kees/c/09b812ac146f [16/16] arm64: allow LTO to be selected https://git.kernel.org/kees/c/1354b8946c46 -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel