Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1225427rdb; Wed, 6 Dec 2023 12:05:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IF6aFmzNRF/6GvRaEHXaM8XifFHA5jYssLC+yheV1UN02I0zh1pWAk/9ndv1EWO3tW0OsHz X-Received: by 2002:a05:6a00:2281:b0:6ce:6898:c426 with SMTP id f1-20020a056a00228100b006ce6898c426mr1441420pfe.31.1701893157387; Wed, 06 Dec 2023 12:05:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701893157; cv=none; d=google.com; s=arc-20160816; b=j/IDZO9pTtuQCi2uRQLG4KnpnFF6XyOKrkICzaYeKY1tHEqsCVO89Mt0o1EFvWnMfx YYInZUFhqSuVo8zceo2+I7qoW7ybNgVZ7XuTZl7Uy0pAz10ppNIa6EdeH8jsxXjKeGuO Tq8/LEApCq8azVFUBSdGlRVDBOa+p99MRMFoWp6c9zYg37OWhrhi79qyJF8iNZSVASjc RvmTNh1OnoYbnYfsMgj8idole1rQzMcfKgOIxJ4dW4f9pnfXaONrK2LrPbBiGhOAoRLm JHQK9L0DSmUGexnN/jkfUptqgN4AcfU1RCJnr0BYibI0GA03W0AKRM7KnWNwAwsAp5l2 wvlg== 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:dkim-signature:date; bh=DVvoOu1nO86z3rBa8QuPbOMrMP9wXD66qlron+EA3cE=; fh=4hF6HfveFd6icy6Brnss3oOJpc/aUF5n2nOK/94NxXc=; b=UZJC+gvB86rynI9I3TUAkO6JcMPREVi/JVjyE5QNdA5rl/vLoSCPKYVX66C3pY+f/y wW+rr+WM2I++fNNOHagRmqQhOghy3Hm4NgeFdET2KYyphqKh1MDjADNC3vHSvPLkXwhf LaCpxKxF3LOPCHI12hSfMhZY0XnPXKl4mcVDCDvvAj7mJpSDXDLAGkuWrDn97vIFxNy+ Ed24IlcKTSxvsUDsfJw3d969cyuuSAXeqliZq2j6Ey77FU2NSI4VB4O9WOrzy5uoy6yq REDSCmGseYbFVZ/dELQDYLV7oplBrSs2j5+kKnqULMU78uWYzi1p8uEQpaS+BxK1LXHZ MxzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DSiuBhxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id q5-20020a056a00084500b006ce751b81f2si443440pfk.227.2023.12.06.12.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 12:05:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DSiuBhxP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B7B23803B72B; Wed, 6 Dec 2023 12:05:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442828AbjLFUFI (ORCPT + 99 others); Wed, 6 Dec 2023 15:05:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379448AbjLFUFH (ORCPT ); Wed, 6 Dec 2023 15:05:07 -0500 Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C40E818D for ; Wed, 6 Dec 2023 12:05:11 -0800 (PST) Date: Wed, 6 Dec 2023 15:05:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701893109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DVvoOu1nO86z3rBa8QuPbOMrMP9wXD66qlron+EA3cE=; b=DSiuBhxPyccRtaejPvhXZlfY+WUmmoAG44XwRHcEdfGJBybAFDIVPzSo5beyiAod1NLpqs weR1wnTb3NW0mykvRvaRUtxrAKom72MmdaTaRfkE7TpFUmBBxHibdx33wzqmmVwJ93iCbK K+vNgW4NlzokdYfH2sJudsiA3i2BwfY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christian Brauner Cc: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Peter Zijlstra , Alexander Viro , Greg Kroah-Hartman , Arve =?utf-8?B?SGrDuG5uZXbDpWc=?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Dan Williams , Kees Cook , Matthew Wilcox , Thomas Gleixner , Daniel Xu , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 0/7] File abstractions needed by Rust Binder Message-ID: <20231206200505.nsmauqpetkyisyjd@moria.home.lan> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-mitsingen-umweltschutz-c6f8d9569234@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129-mitsingen-umweltschutz-c6f8d9569234@brauner> X-Migadu-Flow: FLOW_OUT 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 12:05:30 -0800 (PST) On Wed, Nov 29, 2023 at 05:31:44PM +0100, Christian Brauner wrote: > On Wed, Nov 29, 2023 at 12:51:06PM +0000, Alice Ryhl wrote: > > This patchset contains the file abstractions needed by the Rust > > implementation of the Binder driver. > > > > Please see the Rust Binder RFC for usage examples: > > https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-0-08ba9197f637@google.com/ > > > > Users of "rust: file: add Rust abstraction for `struct file`": > > [PATCH RFC 02/20] rust_binder: add binderfs support to Rust binder > > [PATCH RFC 03/20] rust_binder: add threading support > > > > Users of "rust: cred: add Rust abstraction for `struct cred`": > > [PATCH RFC 05/20] rust_binder: add nodes and context managers > > [PATCH RFC 06/20] rust_binder: add oneway transactions > > [PATCH RFC 11/20] rust_binder: send nodes in transaction > > [PATCH RFC 13/20] rust_binder: add BINDER_TYPE_FD support > > > > Users of "rust: security: add abstraction for security_secid_to_secctx": > > [PATCH RFC 06/20] rust_binder: add oneway transactions > > > > Users of "rust: file: add `FileDescriptorReservation`": > > [PATCH RFC 13/20] rust_binder: add BINDER_TYPE_FD support > > [PATCH RFC 14/20] rust_binder: add BINDER_TYPE_FDA support > > > > Users of "rust: file: add kuid getters": > > [PATCH RFC 05/20] rust_binder: add nodes and context managers > > [PATCH RFC 06/20] rust_binder: add oneway transactions > > > > Users of "rust: file: add `DeferredFdCloser`": > > [PATCH RFC 14/20] rust_binder: add BINDER_TYPE_FDA support > > > > Users of "rust: file: add abstraction for `poll_table`": > > [PATCH RFC 07/20] rust_binder: add epoll support > > > > This patchset has some uses of read_volatile in place of READ_ONCE. > > Please see the following rfc for context on this: > > https://lore.kernel.org/all/20231025195339.1431894-1-boqun.feng@gmail.com/ > > > > This was previously sent as an rfc: > > https://lore.kernel.org/all/20230720152820.3566078-1-aliceryhl@google.com/ > > > > Signed-off-by: Alice Ryhl > > --- > > Alice Ryhl (4): > > rust: security: add abstraction for security_secid_to_secctx > > rust: file: add `Kuid` wrapper > > rust: file: add `DeferredFdCloser` > > rust: file: add abstraction for `poll_table` > > > > Wedson Almeida Filho (3): > > rust: file: add Rust abstraction for `struct file` > > rust: cred: add Rust abstraction for `struct cred` > > rust: file: add `FileDescriptorReservation` > > > > rust/bindings/bindings_helper.h | 9 ++ > > rust/bindings/lib.rs | 1 + > > rust/helpers.c | 94 +++++++++++ > > rust/kernel/cred.rs | 73 +++++++++ > > rust/kernel/file.rs | 345 ++++++++++++++++++++++++++++++++++++++++ > > rust/kernel/file/poll_table.rs | 97 +++++++++++ > > That's pretty far away from the subsystem these wrappers belong to. I > would prefer if wrappers such as this would live directly in fs/rust/ > and so live within the subsystem they belong to. I think I mentioned > that before. Maybe I missed some sort of agreement here? I spoke to Miguel about this and it was my understanding that everything was in place for moving Rust wrappers to the proper directory - previously there was build system stuff blocking, but he said that's all working now. Perhaps the memo just didn't get passed down? (My vote would actually be for fs/ directly, not fs/rust, and a 1:1 mapping between .c files and the .rs files that wrap them).