Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp889038rdb; Fri, 1 Dec 2023 00:55:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4xd2toBcCQKUcQCVm7VEoPAa4LQK/b18wGNWxvc0N2fo7YZ1juBBIG+LzPXj/JyhYarYN X-Received: by 2002:a17:90a:357:b0:280:cd15:9684 with SMTP id 23-20020a17090a035700b00280cd159684mr26180380pjf.37.1701420923987; Fri, 01 Dec 2023 00:55:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701420923; cv=none; d=google.com; s=arc-20160816; b=enS6PAp9uEOM5tLELHj43yJQHRM8JTEAK6IBBvr0yuHC5YH5Kz0Svu5TsoVmyDJjGD N8ChX/h+yaVdA8RT17dPUrLx05N7qp4eThpdul3Ps37el8fZ6/mQ5+roq4S3g1LIKhjp AOtdUgIfFPcQ79XR5PwmVDe4uSTUcXHGoAH2TNO4/iiGSFVGXfoS04bozFBPALt9Xo1E cbbFnAVYeMwFU7Gjroev35qyr/SWF0jpbdi23RpeVFDlrydCTSyOUFcN0xn0TdSnbaWz 7kprEpUfRBbcIccWX6E5gnrc0HARHSb+0maFxjRzOORv+0+1WU752Ix4jdz6chp1ZDnl jS9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vKnBzxozdWGnbst5MfQIf7+dcwp9ORvwYNVmV8gAJa4=; fh=/prSlm0yH8eSVsoWN6q6zd6qsK7qKo7bNvp3ZizMj1c=; b=ubrIL/WznS4XYcZQoc3BAgzgTkBdTM8TTj9b34Pr6sF30P3+FdcFCrO6i1LrZZvk9o 2VO2VtsscqrLRL0uM7rIrnpQXMjQwyE6aWVNHKm89PSXVCoWejNS5qTkuU4if5Sv7GIp mZy8GfnNmtrem4HYivyfhLxuTdCnKutZdfICBJXj0YsWThEJSTJwfRzv6D2a/Y1CDopz ycohRPolftw02bu1B2YkAW835eh9XZR8fll0sdSq55Py15S3fTLrfViT/pA0mCppA3s9 W8BRziU8gUFbHo42yc22EGtrTVSUJfV2GPGuHfNqvxSFZz/XX09KX5hsbp2EvbGRxbN5 Gpog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=O93ILxbm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id b9-20020a17090ae38900b0028654b61b78si1381433pjz.165.2023.12.01.00.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 00:55:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=O93ILxbm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 27E8083A2BED; Fri, 1 Dec 2023 00:55:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377946AbjLAIyi (ORCPT + 99 others); Fri, 1 Dec 2023 03:54:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377930AbjLAIyg (ORCPT ); Fri, 1 Dec 2023 03:54:36 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62854171B; Fri, 1 Dec 2023 00:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vKnBzxozdWGnbst5MfQIf7+dcwp9ORvwYNVmV8gAJa4=; b=O93ILxbmPEQqoZHpPZGIxT73YX Ws5I1XRxugT5Keh77aOXi8td3S1Njs/BHg90kcQL/c6NvAJYe64sKiLvtQ/GWtJ6SDi49vgpyzP6F 2XCZYR8+lst5QCL8VQQtupxDV9YiltQ7cK+1ub8OKr6PFSSyO13DnLVj0GhfAjPtugE0njegR/8zM uxqO2oJiKmecPxGFBgU+/P7arSmdeuj4hulfDyq5zqp2t72mPl8XgtWYFInQz8Oke/uEdd4KCJg8z J7xSPs6UxEVZklWRo+luSJrjgrvbUMqqhNcFHY1bChjFr42ChlcO3bFtUiwbfw+hRKwtekgUd2oER aJDNePNg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1r8zH7-0029rP-2X; Fri, 01 Dec 2023 08:53:32 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id BB6A93004AB; Fri, 1 Dec 2023 09:53:28 +0100 (CET) Date: Fri, 1 Dec 2023 09:53:28 +0100 From: Peter Zijlstra To: Boqun Feng Cc: Matthew Wilcox , Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alexander Viro , Christian Brauner , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Dan Williams , Kees Cook , Thomas Gleixner , Daniel Xu , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org, Josh Triplett Subject: Re: [PATCH 1/7] rust: file: add Rust abstraction for `struct file` Message-ID: <20231201085328.GE3818@noisy.programming.kicks-ass.net> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-1-f81afe8c7261@google.com> <20231129152305.GB23596@noisy.programming.kicks-ass.net> <20231130104226.GB20191@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 01 Dec 2023 00:55:17 -0800 (PST) On Thu, Nov 30, 2023 at 07:25:01AM -0800, Boqun Feng wrote: > On Thu, Nov 30, 2023 at 11:42:26AM +0100, Peter Zijlstra wrote: > > On Wed, Nov 29, 2023 at 09:08:14AM -0800, Boqun Feng wrote: > > > > > But but but, I then realized we have asm goto in C but Rust doesn't > > > support them, and I haven't thought through how hard tht would be.. > > > > You're kidding right? > > > > I'm not, but I've found this: > > https://github.com/Amanieu/rfcs/blob/inline-asm/text/0000-inline-asm.md#asm-goto Reading that makes all this even worse, apparently rust can't even use memops. So to summarise, Rust cannot properly interop with C, it cannot do inline asm from this side of the millenium. Why are we even trying to use it again?