Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1565636ybh; Thu, 16 Jul 2020 16:15:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw21bfVu5zPreuuceYJIPPvYX+W+/CdoEwyOhfeRSKRxQ6NtZ+AJkBwpnnEI3zhexmVRrGG X-Received: by 2002:a17:906:3146:: with SMTP id e6mr5893975eje.2.1594941312347; Thu, 16 Jul 2020 16:15:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594941312; cv=none; d=google.com; s=arc-20160816; b=K9lCX1XSLK0NueYsmwMZf688Huba/0ff83FkoYaLfCHlAL7NNNkg7V29pGs7XZURvv ltanVZ31yOTq5EADVGfd+c8kpNF1+Upp6jb6T9NJzY0VDRkzP5bCntvodwtc8dKLNZpI gbITICmgfJRuTX1Emrvlw2tAFO2hxdgMWc1YSkNt27eZ1T8QkPPR6IAzECbCNe2fXhIX Fhckj9MROsj6AIgLxEcTueUl9ZaK95MTmRdlDvMJg5nS4j2skkoU9NpawlnNb1CHvoca S4m6RFYZkjAzjiArn8558wRA4pUuSAb/4MfO6G3YoU4vpFtY26PzbH6EKWR/v63Ejq+F RwLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=67D0gnyVcAvjicSNnZM8QkcvyP0UrYI4yIO1C5WKp+4=; b=PqmEp34UIvg8P/9+KV5kBmN/WNULf/YCAU0kB1t2ZpAeTD2CYjbM+7cbPVshSvrwUL vSHIO2aY27onBzIq1LUaR5/bfg4T38h2hBaHkHOcbOkrG1OL+sb/Jpbj2cy/uwpK5Q5f pSMQjwAB8csklpuUiMpRo4AA8Inrr7CxtkhAqIFRKvmD4b+oxHVz9+sW77ABEudAZdk1 CRDVJ5Go9mmbLAClA/QUNMaz1spjSjXi4gN3xhWRa5XQOi8pVg+ObO1Z2wa/hnquydD8 Sor1ihu3x0bUnhjuS6dxubadQE0hUqjqrimOWOVZnj/odv+mg/318mdvoiyrxOQ1akwA L4Iw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw19si3712273ejb.752.2020.07.16.16.14.50; Thu, 16 Jul 2020 16:15:12 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726337AbgGPXMh (ORCPT + 99 others); Thu, 16 Jul 2020 19:12:37 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58101 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbgGPXMg (ORCPT ); Thu, 16 Jul 2020 19:12:36 -0400 X-Originating-IP: 50.39.163.217 Received: from localhost (50-39-163-217.bvtn.or.frontiernet.net [50.39.163.217]) (Authenticated sender: josh@joshtriplett.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id D26B420003; Thu, 16 Jul 2020 23:12:22 +0000 (UTC) Date: Thu, 16 Jul 2020 16:12:17 -0700 From: Josh Triplett To: Arnd Bergmann Cc: Adrian Bunk , Nick Desaulniers , alex.gaynor@gmail.com, geofft@ldpreload.com, jbaublitz@redhat.com, Masahiro Yamada , Linus Torvalds , Greg KH , Miguel Ojeda , Steven Rostedt , LKML , clang-built-linux Subject: Re: Linux kernel in-tree Rust support Message-ID: <20200716231217.GA378765@localhost> References: <20200712123151.GB25970@localhost> <20200712193944.GA81641@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 16, 2020 at 03:06:01PM +0200, Arnd Bergmann wrote: > On Sun, Jul 12, 2020 at 9:39 PM Josh Triplett wrote: > > On Sun, Jul 12, 2020 at 03:31:51PM +0300, Adrian Bunk wrote: > > > > > > As an example: > > > Ubuntu LTS releases upgrade to a new Rust version every 1-2 months. > > > Ubuntu 16.04 started with Rust 1.7.0 and is now at Rust 1.41.0. > > > > > > It would not sound good to me if security updates of distribution > > > kernels might additionally end up using a different version of the > > > Rust compiler - the toolchain for the kernel should be stable. > > > > > > Would Rust usage in the kernel require distributions to ship > > > a "Rust for Firefox" and a "Rust for the kernel"? > > > > Rust has hard stability guarantees when upgrading from one stable > > version to the next. If code compiles with a given stable version of > > Rust, it'll compile with a newer stable version of Rust. Given that, a > > stable distribution will just need a single sufficiently up-to-date Rust > > that meets the minimum version requirements of both Firefox and Linux. > > > > (That would not apply if the kernel used nightly Rust, since > > nightly-only features are allowed to change before becoming stable; > > that's one reason why we should use stable Rust, and try to get Firefox > > to stick to stable Rust.) > > I would expect we'd want a fairly tight coupling between kernel > releases and minimum rust releases at first. Whatever is the latest > stable rust version during the kernel's merge window might be > assumed to be the minimum version for the life of that kernel, but > an LTS release would not suddenly start relying on features > from a newer compiler (thought it might warn about known bugs). Agreed; we should be careful that any backported fix to an LTS kernel does not increase the required Rust toolchain. > While Linux used to build with 12 year old compilers (4.1 until > 2018), we now require a 6 year old gcc (4.9) or 1 year old > clang/llvm. I don't know whether these will fully converge over > time but it seems sensible that the minimum rust frontend version > we require for a new kernel release would eventually also fall > in that range, requiring a compiler that is no more than a few > years old, but not requiring the latest stable release. I expect in the short term that we will likely have a need for features from recent stable releases, especially when those features were added specifically to support the kernel or similar, but the rate at which we need new features will slow over time, and eventually we'll go from "latest stable" to "within a year or so".