Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp387440rdb; Thu, 30 Nov 2023 07:25:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt1kvAj0266NmgGTCs04xI7/OTVski8f2OUhQqzqgUAap0MU9vb9HKvFHWe16GhgeDE8Ac X-Received: by 2002:a17:902:c101:b0:1d0:d3e:ef02 with SMTP id 1-20020a170902c10100b001d00d3eef02mr8064701pli.55.1701357932279; Thu, 30 Nov 2023 07:25:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701357932; cv=none; d=google.com; s=arc-20160816; b=ckWSnxyhjdPZPF9nrfFZAbb5K1w1UeKMbFvRwsPeZw6RbGNPRl5lJLTAoxJ/ujJDpI Xm8iaJZTlqnc4+V1DamI6L/Y3RpEJY/HOLtjvArZfL70UACLwHSWDkFOhrx8ExICTAnx 24rdDHC1Ku+kU8+ghiWseowxYbi4akzPXTWFrGZoFxxOiYghhab/Rku8ftn9s4dLTDX7 B87eT23sV07isQHgmyyfrY1JtF/K7cAKFuOqGH52yHWZ+872Q2xr9a0rBm2z1HYhWkGY J8WDnIOgzgj9Y0XkxjZEdacpoXsiGurGqzVyFv9SRruoQAgi6IuU4mlv49ywnsE13Z3j eNUw== 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:feedback-id :dkim-signature; bh=iYxckIwC9xbehezW7h9apLIAUAGmTaUwXE2pwY1GWQE=; fh=TGooMUIhrAD1aQNum7cAGmjPsdCTF2FYfESUpHILi/s=; b=PglzTwg5Adjdbcmioq5GyU07G2dnOJyieEUxxnMpWGfBgmyHXv4BM6wkBYHTuZoVux EmB5nomrbXz5Sa2ttk/i3yb7djuawU0LP4LNNqZXEEw3pzB5R/ADaeugfV50+hBlQxo+ ekoTUcVT0E1QMDvgS0mAVAwvyZ3BmOKi1nULCcUyNduCAGFhIuihDTLFHodC7wRiqWgM 0V1Wot1cC+cNgxJ5Ufew1XUhYdJ7QGEt2FMy1S46tP811FJcMyHQx9p5LEaWZ53V5Pk8 Y/RGgbyz8Y/8lMXuwAwbz2Vv/ojBEFZbTHVenNQLE0LvEiERJT9oEKoDq2/2TQYEAcod Zeng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lZRhiFQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j5-20020a170903024500b001cf5cae80e5si1450270plh.114.2023.11.30.07.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:25:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lZRhiFQB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5EADB80CF50A; Thu, 30 Nov 2023 07:25:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346283AbjK3PZK (ORCPT + 99 others); Thu, 30 Nov 2023 10:25:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346305AbjK3PZB (ORCPT ); Thu, 30 Nov 2023 10:25:01 -0500 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC83410E0; Thu, 30 Nov 2023 07:25:06 -0800 (PST) Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-67a3f1374bdso5931186d6.2; Thu, 30 Nov 2023 07:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701357906; x=1701962706; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=iYxckIwC9xbehezW7h9apLIAUAGmTaUwXE2pwY1GWQE=; b=lZRhiFQBXHvVsL353F44BE+L3vRTbhaV4okHoj6nsepw8bJMP80C099GqUqsQRa75I af9suGQt+qR/bE5wWeq+Ls5aKt6dCPp6QXFTTNnXZ/sr2ZkQFVEg1dTcSxRrLUbUKUZn aS+RMnw2kjp8PrE190hzh6bip9nBVwUr2tcXFTIYOfR/Q/PB4GcT5On/T9dLHwrah14u hSk+1zB1/r0HTpeBEAV544QP3uFNsztplwDxHVsUFMJkNc0ZR2JjLDjHKi1G5SuA1wvN oVGpowIhxkCskCWZVL3OTU05lstfQMXj6yYS4M1ASnl6gXOB0hQnNfQvXqVSRzRGRZax 1HKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701357906; x=1701962706; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iYxckIwC9xbehezW7h9apLIAUAGmTaUwXE2pwY1GWQE=; b=iL5RSWfPLIOvug3PcR5BUHvGVCCOUXQvepk5z/fCNq/NDbg2W/HrU4uFORrArNj2ME sRuoheIjJ69UfhTOMGxCkwLxCKCAIhFhTVhZTXhNQOHrK8MCxUH3aM8/y5kko3+iTCPw YuxlOBncL3KsbLFJucKf921qqta85hTY9VfmcuwogRYWm9OB6XNj3c44btugCG/DY1xh EYzwk4w26RrL9ubRkfCtyQ+mvKa8xwb0z8/6Drb3xR4RGebdjNgyaPOI7eNTVx/UtIYi K5jsVzhRpjPOB4sjg6MICDD9LFGRACx1HnJrP7D9dq968iPemk9UPt1bc7CwhNhbrP76 3+Iw== X-Gm-Message-State: AOJu0YxM5ImDLTV5bTS7cm9ql1FonbXnApPkixH7uQSjkTyDczkq5ZFz 7cXLHSv74XiUNEJZZ6fyBH4= X-Received: by 2002:a05:6214:5581:b0:67a:65d9:6c53 with SMTP id mi1-20020a056214558100b0067a65d96c53mr7128461qvb.1.1701357906005; Thu, 30 Nov 2023 07:25:06 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id a13-20020a0ce34d000000b0067a28752199sm584504qvm.10.2023.11.30.07.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:25:05 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id AC26927C0054; Thu, 30 Nov 2023 10:25:04 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 30 Nov 2023 10:25:04 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeijedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeelueeiffdugeeliedvjeethfettdeiffffueeiffelhfejgefghedtjedv ffffhfenucffohhmrghinhepghhithhhuhgsrdgtohhmpddttddttddqihhnlhhinhgvqd grshhmrdhmugenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvge ehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhm sehfihigmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Nov 2023 10:25:03 -0500 (EST) Date: Thu, 30 Nov 2023 07:25:01 -0800 From: Boqun Feng To: Peter Zijlstra 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: 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: <20231130104226.GB20191@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 07:25:29 -0800 (PST) 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 seems to me, the plan for this is something like below: asm!( "cmp {}, 42", "jeq {}", in(reg) val, label { println!("a"); }, fallthrough { println!("b"); } ); But it's not implemented yet. Cc Josh in case that he knows more about this. Regards, Boqun > I thought we *finally* deprecated all compilers that didn't support > asm-goto and x86 now mandates asm-goto to build, and then this toy > language comes around ? > > What a load of crap ...