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=-7.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 CBDE3C71156 for ; Tue, 1 Dec 2020 17:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 841672168B for ; Tue, 1 Dec 2020 17:32:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="COBsdbub" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391072AbgLARbt (ORCPT ); Tue, 1 Dec 2020 12:31:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387840AbgLARbt (ORCPT ); Tue, 1 Dec 2020 12:31:49 -0500 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88977C0613D6 for ; Tue, 1 Dec 2020 09:31:03 -0800 (PST) Received: by mail-pj1-x1042.google.com with SMTP id iq13so1640513pjb.3 for ; Tue, 01 Dec 2020 09:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fIhrXegmFXx4Y1S8YgnbVoZcP9r/eMN50vMQw7Htjj0=; b=COBsdbubf4U1NB4bryhE6zpFJFlxC6tnZcSZU41etUauCccqXZsiquU+7Pg3YtVZk6 FaJj4o1AIWN+/OM9H6u8TAIFxZgoJVNQ/2jTBB5a/m2hHYR3qjgThVUzKnMTBTgmN/d+ qjZ/Lpe9hl7c2js/gywR+ayaeczGzpkDoU8ik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fIhrXegmFXx4Y1S8YgnbVoZcP9r/eMN50vMQw7Htjj0=; b=s2G3FgFfBsBsKgBZWWFqxkXbK44b0iSpb7QhzgzjkIm9zP0QBt/gQONa96OWZqLpz6 pePsVFVCSu+jtCE4VhqGmYA4t6rfMCQKbXknPocf3B/O1LnLGpcIwEF2MVZ7yodf/WmB G6RuIC8M+G+QGCNSJmmEK5WqKh/4ZTb6Rg9KBg+lyyQW2JcAu87gLh/EvbmstaH1x7Pu ISj67PbBV0HZRs88pty3fgED3yHvXPm5q7jFrE0Bx7PiUfHHtmrFs1YLHOL0t1O8y3n1 5Xlq5tveshXXJI8i+siEy27puWIHuexLDYFFLloU/QG9WMylr9W7RpQaKSZPNvxPagNo UaRg== X-Gm-Message-State: AOAM533xjSzZAO9ULoro0QGP/PjBxM+Z6LNQwPSYgV0bt3bjKHQtU60h RfKia9bSXqNwQGPlk/XjOlLe0Q== X-Google-Smtp-Source: ABdhPJxNXrz8lyJzMPvVj7dGfW+IUsSemW9FmHsAZMwUW4pvNI4+h4MvkJF21vQXTZU3MgV3CsB+ag== X-Received: by 2002:a17:90b:224a:: with SMTP id hk10mr3671202pjb.81.1606843863156; Tue, 01 Dec 2020 09:31:03 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j143sm400818pfd.20.2020.12.01.09.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 09:31:01 -0800 (PST) Date: Tue, 1 Dec 2020 09:31:00 -0800 From: Kees Cook To: Will Deacon Cc: Sami Tolvanen , Masahiro Yamada , Steven Rostedt , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , 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 Subject: Re: [PATCH v7 00/17] Add support for Clang LTO Message-ID: <202012010929.3788AF5@keescook> References: <20201118220731.925424-1-samitolvanen@google.com> <20201130120130.GF24563@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130120130.GF24563@willie-the-truck> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 12:01:31PM +0000, Will Deacon wrote: > Hi Sami, > > On Wed, Nov 18, 2020 at 02:07:14PM -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. > > > > Note that v7 brings back arm64 support as Will has now staged the > > prerequisite memory ordering patches [1], and drops x86_64 while we work > > on fixing the remaining objtool warnings [2]. > > Sounds like you're going to post a v8, but that's the plan for merging > that? The arm64 parts look pretty good to me now. I haven't seen Masahiro comment on this in a while, so given the review history and its use (for years now) in Android, I will carry v8 (assuming all is fine with it) it in -next unless there are objections. -- 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=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 96D6EC64E7A for ; Tue, 1 Dec 2020 17:32:33 +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 14ED920575 for ; Tue, 1 Dec 2020 17:32:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ojC+M6d0"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="COBsdbub" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14ED920575 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5nUYr9Iww6B5N0/vUjnxu855tBdbnQQFPONHc3p03PI=; b=ojC+M6d0XbpS1uuQ27PFhOJ6V QHqL9Lya4SDIwYPEqrRNRNS7p2BLjH+J5SmtmWNYBko+vt/J4ztlxwQw/XwWgEcJ0qYARITwFMRDJ BQ15wayHKG6NWZQhMAXm24C3A4y+mfgjjmtgIqTGCnsu5fk9Lax9jcaw38x6mR4tWWxR4JELFJQJh BADPH1NXN7WW7dO7kEb+8LPikp/OkZjOJyW0zSjUm9WB4K9UFMlOHoTYDKMp0c9T4290Ap/4cq8XR Ox4KK5Kf8bfUYTAxC+4Id+AaW020qQ7ZnuiVvsaq5YnUP/uFoGx+uP8b53qxd3oVCwcCU1sh+jdGG f4udRTrXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk9Ui-0008No-0x; Tue, 01 Dec 2020 17:31:16 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk9UZ-0008J5-2e for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2020 17:31:11 +0000 Received: by mail-pl1-x642.google.com with SMTP id x4so1511443pln.8 for ; Tue, 01 Dec 2020 09:31:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fIhrXegmFXx4Y1S8YgnbVoZcP9r/eMN50vMQw7Htjj0=; b=COBsdbubf4U1NB4bryhE6zpFJFlxC6tnZcSZU41etUauCccqXZsiquU+7Pg3YtVZk6 FaJj4o1AIWN+/OM9H6u8TAIFxZgoJVNQ/2jTBB5a/m2hHYR3qjgThVUzKnMTBTgmN/d+ qjZ/Lpe9hl7c2js/gywR+ayaeczGzpkDoU8ik= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fIhrXegmFXx4Y1S8YgnbVoZcP9r/eMN50vMQw7Htjj0=; b=G9a8DdiIvcWrdwmRSi4RQgoS8ftIMPF+ykxJV91yYBufJKnBaXqs6r4ITP5abl5pRU Ch01xdzKPLaRNcirqTL/GsD4iBAIDLQvXk3Sy1xmy8IrSRwA90dHIgbWgLbt5Eu7TasE Lhc5573dvjkTFCrmSSTfwZA4iA7baX0OpcxA4c20kIJXbDUz7qJHxfM+8792GKPxvo8+ +nkFgEGfIy/5Yr7+1zyAOGnblQkwnkuPclgThczF4RhZjM+fm6tj+uh/676rxUPpm3TD 5uGNzLIPM5aGzy9rREY/Thzaq9ypjFxER9bBoEIOfgpLUZv3mQ7wVaPI4CxaVbP0tfyS A2iA== X-Gm-Message-State: AOAM532JBEoEQW2wTuEWXCfaXxQBpcSDGBApA/isWknBE1M6EqwYPEcs 8hRaPOAk/lLAeUn+0gW8SraXfQ== X-Google-Smtp-Source: ABdhPJxNXrz8lyJzMPvVj7dGfW+IUsSemW9FmHsAZMwUW4pvNI4+h4MvkJF21vQXTZU3MgV3CsB+ag== X-Received: by 2002:a17:90b:224a:: with SMTP id hk10mr3671202pjb.81.1606843863156; Tue, 01 Dec 2020 09:31:03 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j143sm400818pfd.20.2020.12.01.09.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 09:31:01 -0800 (PST) Date: Tue, 1 Dec 2020 09:31:00 -0800 From: Kees Cook To: Will Deacon Subject: Re: [PATCH v7 00/17] Add support for Clang LTO Message-ID: <202012010929.3788AF5@keescook> References: <20201118220731.925424-1-samitolvanen@google.com> <20201130120130.GF24563@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201130120130.GF24563@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201201_123107_197080_740E31D6 X-CRM114-Status: GOOD ( 23.16 ) 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, "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Sami Tolvanen , 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 Mon, Nov 30, 2020 at 12:01:31PM +0000, Will Deacon wrote: > Hi Sami, > > On Wed, Nov 18, 2020 at 02:07:14PM -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. > > > > Note that v7 brings back arm64 support as Will has now staged the > > prerequisite memory ordering patches [1], and drops x86_64 while we work > > on fixing the remaining objtool warnings [2]. > > Sounds like you're going to post a v8, but that's the plan for merging > that? The arm64 parts look pretty good to me now. I haven't seen Masahiro comment on this in a while, so given the review history and its use (for years now) in Android, I will carry v8 (assuming all is fine with it) it in -next unless there are objections. -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel