Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2826239pxb; Mon, 19 Apr 2021 15:15:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVkLTM8rLMeo8wjIiwjpj02pBK9qOeEXLWbRKLF0JBUy1Vxia9br6br+NG5xH53XB+6mcH X-Received: by 2002:a63:488:: with SMTP id 130mr13528005pge.359.1618870539063; Mon, 19 Apr 2021 15:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618870539; cv=none; d=google.com; s=arc-20160816; b=EoC3OtrQmlKlzXBUFBmMJp2rNxyoCEa/0Q+FSsIvcNKHQMu07G4NrDJ/qHknN9gs7x /czEU/Qvzq8mIiAQjMg82Dea8TnmAjKWIrg5fFFYGFv6jvJNcve/rsLs3h32LejtiVxp LAC/FPA724Z0am7/+k5NvAZbrE2hgUcmCFC1jyU0jIRhoI/x6uVRymervceGkKyz379/ I7zWByvOSFQ8ld8X/NeGRnWetA/rtGPvZ2RIscS41ba/Nvusmf6OFTcbCO/C1X26edoP ohh9Sne50IimlY39hpsUbfoSG5FoFFSTjUPJIoSEoCHsFXi+F+uvV7LkOsv44U7IEiNa 8hqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Mvwuk72OV8nQxYdIe9d627zTpbWzXnBqVHooi1BCdcI=; b=V5vIFt44+tGL23JKeX6Zj0bV+nURNTDWBJKdB8ot0/pHp0cAJdRvIdHKSHmSPQpUWt ZFhtwJzaHDIGEKSZV0KGr7dBLBKM1V9IRVAq5oYWCJCCiBkC+GLIdhQh83qHF8PxckJg 3vJJez/JI5p6c5SfoSrcgkA54qVv1uLOPdmxEJvdKaYbbVVSHxr8yDFFllCr6To/3i9j Zue9xaFxg0X1ZiPZcLXZGclygLpWGlgTDmzoPXQDuK8q+eiuUyOltLia9ubYq6F6nPg/ 0GwJ7zsv8nRRvIRY57/Ljfkyzr3A8eLMi9H+oURBNgRpCF/JDi1S+o1xJwppJuLCFITw K5jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ABIAZh0Y; 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 p20si19269117pld.334.2021.04.19.15.15.27; Mon, 19 Apr 2021 15:15:39 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ABIAZh0Y; 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 S241166AbhDSSvo (ORCPT + 99 others); Mon, 19 Apr 2021 14:51:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233736AbhDSSvm (ORCPT ); Mon, 19 Apr 2021 14:51:42 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D1B7C06174A for ; Mon, 19 Apr 2021 11:51:12 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id r20so40586090ljk.4 for ; Mon, 19 Apr 2021 11:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mvwuk72OV8nQxYdIe9d627zTpbWzXnBqVHooi1BCdcI=; b=ABIAZh0Yc6gK7Ft1wtnc4ohcPbNT4AIxM87QybtInWLGgYjHUnUzGJQO+0SQtmtF+P SJNEk+teRDbaI1T6wAN0fGq5AdHUpbsxHIxuCmNNPS1nc9teY9xfGzk1uG6n4KgcF6pi rwTMC5yQwaeCnKmG5juA/gDi6ahV1DltGgDNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mvwuk72OV8nQxYdIe9d627zTpbWzXnBqVHooi1BCdcI=; b=ody/gpIwG9p9Jz74llDQhUs5y7DALxtHibm0Ll+hQ1qqPUH43TYFikXNVbHMF7/Oxx NQ3hUrgDnc0znOq51MAX9oA8Oc80KCwe2kv7diZfdbggxKIisDA+1hCWRONoU71aVQmS DxbBkfU3Kiy/P5ox2xKO6qw5bmdpmfzKAD/l4DK9o16nPiNTSPOjZGTsj5PEbAVc3fqv f2mJlC4XzM+udRtssWni8gpcTtQccmhR12Ktmelr/yIhGLAbv5rnp9IiJGCfAxAzx/az qCe5i79mS1vzYd11JmytdtHNiUUp/O4HljYozxwNd4Dcp6d03Xqmb7UjZf0SUMcQCCwq frKA== X-Gm-Message-State: AOAM532aVLGFK+I16VnR8CoLiPNZJuAdly+N27HD5qz8KMbe2c6Op6Fl QjENfYxM0MkUUme7N/glUxDo0KIGwXO5yMeg X-Received: by 2002:a2e:7218:: with SMTP id n24mr12500473ljc.162.1618858269389; Mon, 19 Apr 2021 11:51:09 -0700 (PDT) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com. [209.85.208.170]) by smtp.gmail.com with ESMTPSA id z2sm1221400ljz.116.2021.04.19.11.51.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Apr 2021 11:51:08 -0700 (PDT) Received: by mail-lj1-f170.google.com with SMTP id r22so29921281ljc.5 for ; Mon, 19 Apr 2021 11:51:08 -0700 (PDT) X-Received: by 2002:a05:651c:1117:: with SMTP id d23mr12844637ljo.220.1618858268248; Mon, 19 Apr 2021 11:51:08 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <7287eac3-f492-bab1-9ea8-b89ceceed560@redhat.com> <3a874b15-5c21-9ed9-e5c3-995f915cba79@redhat.com> In-Reply-To: From: Linus Torvalds Date: Mon, 19 Apr 2021 11:50:52 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/13] [RFC] Rust support To: Paolo Bonzini Cc: Peter Zijlstra , Wedson Almeida Filho , ojeda@kernel.org, Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Will Deacon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 11:38 AM Paolo Bonzini wrote: > > It changes it for the worse, in that access to fields that are shared > across threads *must* either use atomic types Well, we won't be using those broken types in the core kernel, so that would all be entirely on the Rust side. And I don't expect the Rust side to do a lot of non-locked accesses, which presumably shouldn't need any of this anyway. If Rust code ends up accessing actual real kernel data structures with memory ordering, then that will be to types that do *not* follow the useless C++ atomics, and that in turn presumably means that it will be done as "unsafe" helpers that do what the LKMM does (ie READ_ONCE() and all the rest of it). Linus