Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4719374rdh; Wed, 29 Nov 2023 08:49:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfT3cvxX8seuka9GP4J0osVUzljVtg22mTuFOfdXO5/kYkPTm4p9BvSH3KkHNigXYF3o4P X-Received: by 2002:a17:902:7789:b0:1ca:86b:7ed9 with SMTP id o9-20020a170902778900b001ca086b7ed9mr20550071pll.40.1701276544240; Wed, 29 Nov 2023 08:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701276544; cv=none; d=google.com; s=arc-20160816; b=ZIozQlXwvcHaiysRWMsofRklumAqqPBhnZwvTUTbN/1sU0qULtBHR8CoabGYx0Nw1e jD+hLb4owDUoLNs7ORwN60EBFr85J5uF0wWAmAXGmXXzPsIU+AKE3jyYy7ynpyGdtIXf VK/IvXhnczqNcRrEA3dMwRO7cFHH7d4ShVdRb2jnRQVt6OZPQXKEHCotovk0icVdPpbr xHuRAyR+M2Tvw5/tWKZib3TWcYvXZsXU/KCS6v3NxaaUgvkP3peW5KJTQGvcbaYVyqPl MjJBnrdu4TzysqFG4Em+W3S3/TL1Jg4AK+buuDOPTpppCrBgMPsFKSekuYqNE32OHDfX RIwQ== 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=tiPBXf1kZm2l8+7WRSaX1GLajBl09o/Tkot6Kx1Gxo0=; fh=d2Oqw9QC3Gc5z87Bplh7Gwg5beuZahaJTQU0vAw5ZxU=; b=yGo2a/MnRvkw/gwr/XX6M0vNfDkd431uQoKqgttChIoeL/HOHA43c5BII0kW+0fP0E q13ryKuMEQUTyOHhzvh6JvRCGWRQSBWvR0fanD0LW1IGprUy/nEoDon15SGfnwe0Qp5b N3lk3A+ModXML93NV16LagUbW7mjQr+CIb6gr5ehilRTEY+oFXGzbl5nKGrxi5JVOdWC 5dcHtpqlRSPEspCJ3kAaD7uiZFgMl8RnQyrmy2T1yGzWur4JF8aGrFwfJZnfNrACzn2+ PNZ0Cj5HsevAeE6JkHNKQQWDUEYSJepJ8umNXli50BDAEoQIvFMwuFEnrD8gizHuz1WW Gf9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=o9BTJ3na; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id l19-20020a170902f69300b001cfa22e6bd7si13368790plg.179.2023.11.29.08.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:49:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=o9BTJ3na; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 0EE46802F870; Wed, 29 Nov 2023 08:49:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbjK2Qsv (ORCPT + 99 others); Wed, 29 Nov 2023 11:48:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230324AbjK2Qst (ORCPT ); Wed, 29 Nov 2023 11:48:49 -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 2C80AB6; Wed, 29 Nov 2023 08:48:54 -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=tiPBXf1kZm2l8+7WRSaX1GLajBl09o/Tkot6Kx1Gxo0=; b=o9BTJ3na+CayHjCSRZpl2hxliT eZWFH3ECXx+oJ7DlR9ag0VtHn0Z2tXkZTZiOvVe7bHtsuQ2Zk9r/lDdgnScTBopq4dC6DPa2dPJLe GESlCC6PcoctemBjNadjUc3b0BfqJynYCAP/nZ2+XcPvqv/AXjCMh8rDWbqRguQroRYlEihFRLapB WN7LI1bGNDmTpb6vOAozO/72c90oKSQmni3CfkKhnCbzWDdaoenV2KOOJIPzsP5kG6gXPdkT7oHQk N4a3SxtqtYwrH4xc8IqSk38EGJBCMQEF9RsKJuWJSCttRemeHKUGu9TW6jqf3w3QQiY15NlTOpSVL TMUlR9wg==; 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 1r8NjU-000QPZ-1K; Wed, 29 Nov 2023 16:48:20 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 2EE9E30017D; Wed, 29 Nov 2023 17:48:15 +0100 (CET) Date: Wed, 29 Nov 2023 17:48:15 +0100 From: Peter Zijlstra To: Christian Brauner Cc: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alexander Viro , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , 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 5/7] rust: file: add `Kuid` wrapper Message-ID: <20231129164815.GI23596@noisy.programming.kicks-ass.net> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-5-f81afe8c7261@google.com> <20231129-etappen-knapp-08e2e3af539f@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231129-etappen-knapp-08e2e3af539f@brauner> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:49:03 -0800 (PST) On Wed, Nov 29, 2023 at 05:28:27PM +0100, Christian Brauner wrote: > > +pid_t rust_helper_task_tgid_nr_ns(struct task_struct *tsk, > > + struct pid_namespace *ns) > > +{ > > + return task_tgid_nr_ns(tsk, ns); > > +} > > +EXPORT_SYMBOL_GPL(rust_helper_task_tgid_nr_ns); > > I'm a bit puzzled by all these rust_helper_*() calls. Can you explain > why they are needed? Because they are/can be static inlines and that > somehow doesn't work? Correct, because Rust can only talk to C ABI, it cannot use C headers. Bindgen would need to translate the full C headers into valid Rust for that to work. I really think the Rust peoples should spend more effort on that, because you are quite right, all this wrappery is tedious at best.