From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="f7sWydai" 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 53F84112; Wed, 6 Dec 2023 04:34:32 -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=r8reRFycb0Atah5iaBjoNtNIC5cecXDQ0jXEw5GxuRE=; b=f7sWydaiK+oeu4P4WF61PAzdkX hWE6AEt1dMN2zq6wRzVq+L5Ue00Cw0BTq+V+IUydwNrQhkwyL3DPep2ORkCXVlRvL9T3CPpfn8t4w ZYWCFo6OJioGHuyCT+iXJKm4itcVw8paebhEFv/n+qo1MSJO5diXi7RRd/p9MywKiXbwTbn5JyBlZ cFnmMsFgCRKsx4+JWiYbEuHivDPjGpu+BtCShwuKGzFHxfoj1KaKmTbV8SiFTXCgNOiPC6t4E58a6 7x6NHM/NS10Ihe7NAisXnLORbcpMYI6xKyNypVedTqgB4og+3OqwFH7RvI8bxqULR+b40rP1Grs/O HKNkMAHg==; 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 1rAr6K-005A3G-0P; Wed, 06 Dec 2023 12:34:04 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id CD81E300451; Wed, 6 Dec 2023 13:34:02 +0100 (CET) Date: Wed, 6 Dec 2023 13:34:02 +0100 From: Peter Zijlstra To: Alice Ryhl Cc: 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 , 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 , 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 v2 5/7] rust: file: add `Kuid` wrapper Message-ID: <20231206123402.GE30174@noisy.programming.kicks-ass.net> References: <20231206-alice-file-v2-0-af617c0d9d94@google.com> <20231206-alice-file-v2-5-af617c0d9d94@google.com> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206-alice-file-v2-5-af617c0d9d94@google.com> On Wed, Dec 06, 2023 at 11:59:50AM +0000, Alice Ryhl wrote: > diff --git a/rust/helpers.c b/rust/helpers.c > index fd633d9db79a..58e3a9dff349 100644 > --- a/rust/helpers.c > +++ b/rust/helpers.c > @@ -142,6 +142,51 @@ void rust_helper_put_task_struct(struct task_struct *t) > } > EXPORT_SYMBOL_GPL(rust_helper_put_task_struct); > > +kuid_t rust_helper_task_uid(struct task_struct *task) > +{ > + return task_uid(task); > +} > +EXPORT_SYMBOL_GPL(rust_helper_task_uid); > + > +kuid_t rust_helper_task_euid(struct task_struct *task) > +{ > + return task_euid(task); > +} > +EXPORT_SYMBOL_GPL(rust_helper_task_euid); So I still object to these on the ground that they're obvious and trivial speculation gadgets. We should not have (exported) functions that are basically a single dereference of a pointer argument. And I do not appreciate my feedback on the previous round being ignored.