Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4708793rdh; Wed, 29 Nov 2023 08:32:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEvVLoDWPbTF13bl9CHM9pnTV5qh86X4PyQmiL+O/uRZ5Kmc8ChiEKSl4t17RcFwKOjam/ X-Received: by 2002:a17:902:c408:b0:1cf:662b:4523 with SMTP id k8-20020a170902c40800b001cf662b4523mr29104059plk.34.1701275526828; Wed, 29 Nov 2023 08:32:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701275526; cv=none; d=google.com; s=arc-20160816; b=PJXsREg2qKgPMgtAUcuHMBK3kWTwNwFX9DCsw2oMqY6d7t8eoAOK3AC5qa8Vl+faUL rfb2tjHQa6MmA1xuUrR6TQCYaKN91IPkRvtJkZ0RxGvidvM53br4DBF/vdb83KZO0Zdk RBu9V1RWxFIRlzFWTSTeXepXj+iavexiQfuapVa/BSWz8eQsaCH+OgU9d2nDQDwRfLa3 AaH5gg+XImmjNyO3DG6518kuPGPui4YgGO0KzS+sj2yFfyzUC1f1HoPZYBh8yonQ4hk7 0LLNIJAXEPMbMqHBAsjUztNSL8W0YY+jA5jCVxVnEdSWZlPiAPBwr8SIyvSM9MIvsfCh Lmnw== 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=TQsDR2/0q4rJW1TrJSVAR13rWZ1jHDsgG2PV21xldHc=; fh=nEaMtykN3yen8T6sC08/oNzV0+ox843bdf8+ebojgNE=; b=V/KBx5yDKDJqZQmH5/yHtfJLrrFaKQP5ZesQpIUSPTBabxIK13FIhHy77fgmuF3Ajx GKSevq/qSRAO3m0NuzeXXKhOTe36aviNZd43+SJboY2wf2aJmRRqkgo6QZy6izhzOCeF kLP9XgjPpmBy5yAp2O0MDoX+qZCpCxDr/UeJQtcb2L9+K/hwhZ2Kl6nkMI/8kdDUgt6t Y83hYdme9bcmte+fvMWKBF/+j8oimKa4UzX7K041W0N3KmVG9036jvC9L3DofdAEdNBd cjrzmjUVPjSJmJNr7Q6UwQouyjSZM0GgSd9FO0nsw1E93qLkVZCfG3ELM02tHox0xhfN YWwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f5uUeUH6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h5-20020a170902b94500b001c7615a8e09si14013888pls.593.2023.11.29.08.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:32:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f5uUeUH6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id BA92680B3B4E; Wed, 29 Nov 2023 08:32:03 -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 S229705AbjK2Qbr (ORCPT + 99 others); Wed, 29 Nov 2023 11:31:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjK2Qbr (ORCPT ); Wed, 29 Nov 2023 11:31:47 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76A1B10A for ; Wed, 29 Nov 2023 08:31:53 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 540D9C433C7; Wed, 29 Nov 2023 16:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701275513; bh=oeU9mJXNv22m4r52x0N8/9ZuPInwmlkw3ATWm9P9Cuo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f5uUeUH6sjnbA0eYQEji83M7RGbEQEXqKlIRrMRKUNcZ3ttH2/9R9LJZprO9hdZB0 OOChZr5JhbaymIJdJn2tYG5isatJ0BEXr5KMMvlvlfv08My8gB7DggTN/mV6zCgkal bP8nZ3cx3julG9+bzIDhu8ojwiSI5Kv5K0FrVZnPB6pYdqkd7rCm04oktDx6V/bgWY L1/eZnzL30J/+ydZezISNuByuKguIKo/1XqIFsbVbUmAf0FoZJzE2d2tKkSAVYiDwZ 2KHlT6dSSuXsCIhbMuKs+z1oceVjPMrETSIy0qNnM+sTXSxK6sPT5qIdbRvtgeJktc fAqEGaWUUYgIA== Date: Wed, 29 Nov 2023 17:31:44 +0100 From: Christian Brauner To: Alice Ryhl Cc: 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: <20231129-mitsingen-umweltschutz-c6f8d9569234@brauner> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231129-alice-file-v1-0-f81afe8c7261@google.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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]); Wed, 29 Nov 2023 08:32:03 -0800 (PST) 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? > rust/kernel/lib.rs | 3 + > rust/kernel/security.rs | 78 +++++++++ > rust/kernel/sync/condvar.rs | 2 +- > rust/kernel/task.rs | 71 ++++++++- > 10 files changed, 771 insertions(+), 2 deletions(-) > --- > base-commit: 98b1cc82c4affc16f5598d4fa14b1858671b2263 > change-id: 20231123-alice-file-525b98e8a724 > > Best regards, > -- > Alice Ryhl >