Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1223183rdb; Wed, 6 Dec 2023 12:02:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBs4XiZdI1AZPUUCu6n9J5PjS56dEK6wwrsUFlfWyiJfjg/BLTrJWDkefn/UxYZAz+Z08p X-Received: by 2002:a17:90a:7405:b0:286:6cc1:3f19 with SMTP id a5-20020a17090a740500b002866cc13f19mr1546932pjg.80.1701892964209; Wed, 06 Dec 2023 12:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701892964; cv=none; d=google.com; s=arc-20160816; b=flkZ6KxlHc8Ym/po3rnKr0CgqKROXXgba1yYU3/sGf8oxEYtlLGYlTvsWGNpQD7qXJ L+88upPG65XjROAosdu0RX2ONZyCGd1jsJvvr/Ds/24wre3YYWqv6YCFpEj/YpYK0z5x +syRzE2r5srE6oOrQBx7gBBvMy66DZFBvaDwYQeagumYytksUlf1R0+AtEld0wmFIX39 IsoevrZjJXgnfm52wHzm2TjkP1xvVehJmNNfEDOOzM1XmZTZCzMWQnhi+oKvq1mSnh+r 0bM9dfuvny/cZiAs4JmxnObAUCVqd3LZkboGtUvRTtZIyemQwr7xeu4jUfhe/Ux9/VK0 Z8Yw== 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=IoH7rlLBVR0CZdZD7I1aTbDejNohFwpjFpDildbciTg=; fh=JIxeuSKmkjOkC/S5U71nR5vvZ9BznFfaXPNWbgNnKF4=; b=K0hYQv8zJu3+7U/jiC/Z+sdUwC+AKaRDACZmdGh5UnSjEiN2DOl0FRuwWL/kuRkF8S tQylAFtMaRkBH6MH9DYCv+Vs2/GbDwIYH0mGioz44IyKyShcRYxMtmRizCsJOlhClWes 3MDMIht5aOUPkbxc1NK59w628V802MKDNoc95pJghlqOz5ZCiApgfIFoBi2ZZej9lMwv R+Bb6NDRY73XjlIsUi/Br+K6pytn8McjmzVZrZvcUyMPJBZnbYcH3jfzrMrRumDefwlA dvS1YW+6IkN+TG0tfYF0rxGgPu4KdQE22gxm/HMUdL6d7r/Y58gNc78+Pl63M7Ab1Gr9 azdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dOEK3CCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z10-20020a170902708a00b001d062135ef8si274281plk.601.2023.12.06.12.02.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 12:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dOEK3CCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id ADD7681CCD9C; Wed, 6 Dec 2023 12:02:41 -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 S1442828AbjLFUC1 (ORCPT + 99 others); Wed, 6 Dec 2023 15:02:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379442AbjLFUC0 (ORCPT ); Wed, 6 Dec 2023 15:02:26 -0500 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [IPv6:2001:41d0:1004:224b::aa]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEBA0FA for ; Wed, 6 Dec 2023 12:02:32 -0800 (PST) Date: Wed, 6 Dec 2023 15:02:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701892950; 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=IoH7rlLBVR0CZdZD7I1aTbDejNohFwpjFpDildbciTg=; b=dOEK3CCoqwwxm9w4xFPD/78KwH+lY5Qdl4gkX+2N2i0EOFTM9ht+Tx5lMlPymo5St807I2 G5WLl70n+/WTiAi/dp+eYLTDQzyXihLAvesSYdFpj3H7UC3w/KOz435KDSJJ3leJA0TXeG H0nTO3ZXz2pZtb2QLuVHx6EK2p1hwSs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Peter Zijlstra Cc: Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Alexander Viro , Christian Brauner , 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 5/7] rust: file: add `Kuid` wrapper Message-ID: <20231206200224.rkdkuozztzg2wusj@moria.home.lan> References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-5-f81afe8c7261@google.com> <20231130103635.GA20191@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130103635.GA20191@noisy.programming.kicks-ass.net> 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 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, 06 Dec 2023 12:02:41 -0800 (PST) On Thu, Nov 30, 2023 at 11:36:35AM +0100, Peter Zijlstra wrote: > On Wed, Nov 29, 2023 at 01:12:17PM +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); > > Aren't these like ideal speculation gadgets? And shouldn't we avoid > functions like this for exactly that reason? I think asking the Rust people to care about that is probably putting too many constraints on them, unless you actually have an idea for something better to do... (loudly giving the CPU manufacturers the middle finger for making _all_ of us deal with this bullshit)