From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D714CD6E56 for ; Wed, 3 Jun 2026 12:05:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D62E10FCCC; Wed, 3 Jun 2026 12:05:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=garyguo.net header.i=@garyguo.net header.b="HxNvRGkE"; dkim-atps=neutral Received: from CWXP265CU009.outbound.protection.outlook.com (mail-ukwestazon11021093.outbound.protection.outlook.com [52.101.100.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9F14110FCC9 for ; Wed, 3 Jun 2026 12:05:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NNQhPhPw69ghJqTeMflM+LpLRGpoJ7LW0+aAPBsmeL1+gHbsORKUUgtUlJC9B22zYiyyf7DAxlKIvgmXN8VTYUm+NH0sAZyKcP6R1VH4SCqq4sNuIQ7GNyXSGWpKY7oLC68d8bkVyjfmoY6hdS/D927IkNywxAfOfljwIDCm0W6Lb74zkU9ArIh8qxAuhZmAeVB2CvmLxMaNjVyGNF3lVInzn1wVLx0YwSAiHvTcuFPmWkkQxQIb5NVX2XzNDkUGdyfBq37fWZICfyVWuKNRveLgnYXjMeavVpBgK5lv9AA4L8aWkimk157QYrW5wVNVQZOKSubpjp3sohuY4tWvYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/WuB2yhn5r5KUd+0rQRstQKEruwydO6FmBKt1a0gjcY=; b=sSCOCiNzNtMglMil07miHzezKsTnHjMw7gLDxMWu6MKsV21YIJbJ5Apq3oAMMph26dUxrjE0Ajt1CZNz0kxUpV8dJ1NUOUbUjRjbA4xM4yl0+XBzl9Owl+nMyhQredObbXw6qQs5M0fukzuvC7gve8rd7zOatGPbMEWsZgEeBnD9aca0nnNWmKprlY1kiy39rJyTUnqMZlzi3XGvO000yAXzV+cjQnFD2PX7SX0MBP7F73/CLaMKjBI4RqRqdU4+L/oYv/v2cX/poDfUUbufSRQLMPA52wd8NyoadPFTwqOLGz2dax2e3/ssBSJVJ+KVd/vdPS25KylKyKf9ocJK+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=garyguo.net; dmarc=pass action=none header.from=garyguo.net; dkim=pass header.d=garyguo.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=garyguo.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/WuB2yhn5r5KUd+0rQRstQKEruwydO6FmBKt1a0gjcY=; b=HxNvRGkEEZi+636pTqO6SBWORy/p93isxwrCNUvSPVeGYTgPo+yiWeaXoVMZ2CWijT9uF6Nf8GLOBdU1xOnkqXA/bDIdfyOnQKbICEpUXBa2sgwXmCcSX7gDZBbw7mc7CztCoQL4JMAhe/hKHV4GK+RGNFJgUgGcANvIfL32CZU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=garyguo.net; Received: from LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:488::16) by LO2P265MB5205.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:254::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.7; Wed, 3 Jun 2026 12:05:53 +0000 Received: from LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM ([fe80::1c3:ceba:21b4:9986]) by LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM ([fe80::1c3:ceba:21b4:9986%4]) with mapi id 15.21.0092.006; Wed, 3 Jun 2026 12:05:45 +0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 03 Jun 2026 13:05:45 +0100 Message-Id: Cc: , , , , , Subject: Re: [PATCH v2 3/7] rust: auxiliary: add registration_data_with() for ForLt types From: "Gary Guo" To: "Danilo Krummrich" , , , , , , , , , , , , , , , , , , , X-Mailer: aerc 0.21.0 References: <20260603011020.2073650-1-dakr@kernel.org> <20260603011020.2073650-4-dakr@kernel.org> In-Reply-To: <20260603011020.2073650-4-dakr@kernel.org> X-ClientProxiedBy: LO4P123CA0622.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:294::7) To LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:488::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LOVP265MB8871:EE_|LO2P265MB5205:EE_ X-MS-Office365-Filtering-Correlation-Id: 3eaeeeda-d24a-4572-73c7-08dec168716d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|10070799003|376014|7416014|1800799024|366016|921020|6133799003|56012099006|4143699003|22082099003|18002099003; X-Microsoft-Antispam-Message-Info: pN2NTQse2jcc84JRBr0QSRsgTvL7y/g7vZEkRkZRxWtQV9JmLKj8yeb3pCVCgtMheBTL4p7lvprAkQ4YjgEh0UrxUYjagmtvl9XbDUlaHm8OB7FQNeIfrpX6SrhSX/JYutwGu+ubAjP4nxSGucEvg9C2iNBcgBTVasUUvXDdW9HqPsRT1Wx/gu0Av/ok6KrhgY2RU5zaitN8ovpEfUjp15VPwRCXZcyvZtTtYbC81lRKsf61GFv0iAjtqPzvpLUaafjxFSr6UCFzh95rzezPc6u1m9DowU7YKgEGauBHXJlpXuN/LvTlevVucwbkRInkrgcazTs85kSS8r0rUbHRMg5APYxEIj1YPcWj+8IF2YTnoUTNKwCI9KawdihAhuP9g/oa7sla8vZw/iJRscbvGICp4vQ/kFn0T+dmdmB1EGpjsqUlza1cT91jLphxMcjDAuMQl5nUpl0+BvFIHTYptb7T0PdaXw811R0FV2Xsa8sNcK+AquRn3buHDWsp8OHSS+BO5Za2rZ7Mbh7KEBbrYm0HZ/aYLZPoZ1tCAPFLY3Td59reCJ0+6Pexesjcr6dHQu/s5bOnGpoHsnHrBvNEQ4meNzEEllNs+s+X34sYG62Cm6VJn1vFMeVUeFWh1wJRYvwxZjtV4ZTrn9pTUgDOT23KvEQjj2tr3O+rrlYDHYiAja+D46CjzoGoLVT7U34/03pIe4Clhk6hqn4SgK7+z2dUX5XOzaoKOVL20Xgf61w= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230040)(10070799003)(376014)(7416014)(1800799024)(366016)(921020)(6133799003)(56012099006)(4143699003)(22082099003)(18002099003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MmJkVHZNQXpZMXpUaUNCZnRqdUtsV3daeElQellTVHhybVB1d29HUHdzOWV2?= =?utf-8?B?Ulo5UzJqY1pKQ20zZk03TGV5Y2N5Q1JDTWVyb3dCNGVGaVlrNXZBSFFpdXRO?= =?utf-8?B?eUN5alRRMzBqbTZBQWw4ZThnNlh2T294WVNsemlWbWhZcEJ6MW9tczFtTWd6?= =?utf-8?B?YWdvSmtFdEhra0R1ZUtXOVhCUnBoZjMvWGp4eVQ5V1NGMEM4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L2dvNlZUaXJkYWY0dVlERmt2YXBiWmE4cWdiNHY1em5YK0JlK1hWb2Mz?= =?utf-8?B?UXhJM1ZFMis2T0tWbFdlL1NXbUdSYkRERm1Kc3JaZHBacFhmVEJ2aWlDdWtB?= =?utf-8?B?aHNReG0yN1hBUXkyMU1VTERFT2dQb1ZhT0RFNFZyUHRJRUVQY3BTcjNSdG42?= =?utf-8?B?QzF1L0ZvUmE5WGs3eTdpdHkya3FPdXJRU1dHV1hGTUtKQk0zSXFTbVRvMWVS?= =?utf-8?B?QkdmRVMwZzlPWU0zKzlpNy85cWhIMTA2NDR2RTB1NnJZL3pEMFREQVF0Nldu?= =?utf-8?B?VVFJbjJSdDEzUkFMTkhFazJFQ1RpNEhHeXJESHZ0M1htbm4za3Zmdz09?= X-OriginatorOrg: garyguo.net X-MS-Exchange-CrossTenant-Network-Message-Id: 3eaeeeda-d24a-4572-73c7-08dec168716d X-MS-Exchange-CrossTenant-AuthSource: LOVP265MB8871.GBRP265.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2026 12:05:45.7763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bbc898ad-b10f-4e10-8552-d9377b823d45 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2BUSqTPA+g1p5js3eG72zFEZboAlnGUu3ddtpS5/4b+OcwitD7MnMjhaQcaiSM66GwSM0Hj3XoQ7i3/78i0QfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LO2P265MB5205 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed Jun 3, 2026 at 2:10 AM BST, Danilo Krummrich wrote: > Add registration_data_with() taking a for<'a> closure that receives > Pin<&'a F::Of<'a>>, which works with any ForLt type. Taking a for<'a> > closure rather than returning a direct reference prevents callers from > choosing a concrete lifetime for the data, which is required for > soundness with non-covariant ForLt types. > > Extract the common null-check, TypeId-check and KBox-borrow logic into a > private registration_data_pinned() helper shared by both > registration_data_with() and the existing registration_data(). > > Relax Registration's bound from CovariantForLt to ForLt so that > non-covariant types can be registered. > > Signed-off-by: Danilo Krummrich > --- > rust/kernel/auxiliary.rs | 89 ++++++++++++++++++++++++++++++---------- > 1 file changed, 68 insertions(+), 21 deletions(-) > > diff --git a/rust/kernel/auxiliary.rs b/rust/kernel/auxiliary.rs > index 40a0af74a8e5..81549a3e347e 100644 > --- a/rust/kernel/auxiliary.rs > +++ b/rust/kernel/auxiliary.rs > @@ -21,6 +21,7 @@ > prelude::*, > types::{ > CovariantForLt, > + ForLt, > ForeignOwnable, > Opaque, // > }, > @@ -270,18 +271,15 @@ pub fn parent(&self) -> &device::Device { > unsafe { parent.as_bound() } > } > =20 > - /// Returns a pinned reference to the registration data set by the r= egistering (parent) driver. > + /// Returns the stored registration data as a pinned `'static` refer= ence. > /// > - /// `F` is the [`CovariantForLt`](trait@CovariantForLt) encoding of = the data type. The returned > - /// reference has its lifetime shortened from `'static` to `&self`'s= borrow lifetime via > - /// [`CovariantForLt::cast_ref`]. > + /// Performs null and [`TypeId`] checks, then borrows the stored [`K= Box`]. > /// > - /// Returns [`EINVAL`] if `F` does not match the type used by the pa= rent driver when calling > - /// [`Registration::new()`]. > + /// # Safety > /// > - /// Returns [`ENOENT`] if no registration data has been set, e.g. wh= en the device was > - /// registered by a C driver. > - pub fn registration_data(&self) -> Resu= lt>> { > + /// The returned `'static` lifetime was transmuted from the device's= bound lifetime during > + /// registration. Callers must shorten it before exposing it. > + unsafe fn registration_data_pinned(&self) -> Res= ult>> { > // SAFETY: By the type invariant, `self.as_raw()` is a valid `st= ruct auxiliary_device`. > let ptr =3D unsafe { (*self.as_raw()).registration_data_rust }; > if ptr.is_null() { > @@ -306,10 +304,58 @@ pub fn registration_data(&self) -> Result let wrapper =3D unsafe { Pin::>>>::borrow(ptr) }; > =20 > // SAFETY: `data` is a structurally pinned field of `Registratio= nData`. > - let pinned: Pin<&F::Of<'_>> =3D unsafe { wrapper.map_unchecked(|= w| &w.data) }; > + Ok(unsafe { wrapper.map_unchecked(|w| &w.data) }) > + } > + > + /// Access the registration data set by the registering (parent) dri= ver through a closure. > + /// > + /// `F` is the [`ForLt`](trait@ForLt) encoding of the data type. The= closure receives a pinned > + /// reference to the registration data. > + /// > + /// For covariant types that implement [`trait@CovariantForLt`], pre= fer > + /// [`registration_data`](Self::registration_data) which returns a d= irect reference. > + /// > + /// Returns [`EINVAL`] if `F` does not match the type used by the pa= rent driver when calling > + /// [`Registration::new()`]. > + /// > + /// Returns [`ENOENT`] if no registration data has been set, e.g. wh= en the device was > + /// registered by a C driver. > + pub fn registration_data_with( > + &self, > + f: impl for<'a> FnOnce(Pin<&'a F::Of<'a>>) -> R, > + ) -> Result { > + // SAFETY: The HRTB closure prevents the caller from smuggling i= n references with a > + // concrete short lifetime, making the round-trip from `'static`= sound regardless of > + // variance. > + let pinned =3D unsafe { self.registration_data_pinned::()? }; > + > + // SAFETY: See above; the closure's HRTB makes the round-trip so= und. > + let short =3D unsafe { F::cast_ref_unchecked(pinned.get_ref()) }= ; This shouldn't be necessary, you can just directly call `f`. Best, Gary > + > + // SAFETY: The data was pinned before the lifetime was shortened= ; pinning is > + // orthogonal to lifetimes. > + Ok(f(unsafe { Pin::new_unchecked(short) })) > + } > =20 > - // SAFETY: The data was pinned when stored; `cast_ref` only shor= tens > - // the lifetime, so the pinning guarantee is preserved. > + /// Returns a pinned reference to the registration data set by the r= egistering (parent) driver. > + /// > + /// This method is only available when `F` implements [`trait@Covari= antForLt`], which guarantees > + /// safe lifetime shortening via [`CovariantForLt::cast_ref`]. > + /// > + /// For non-covariant types, use the closure-based [`Self::registrat= ion_data_with`]. > + /// > + /// Returns [`EINVAL`] if `F` does not match the type used by the pa= rent driver when calling > + /// [`Registration::new()`]. > + /// > + /// Returns [`ENOENT`] if no registration data has been set, e.g. wh= en the device was > + /// registered by a C driver. > + pub fn registration_data(&self) -> Resu= lt>> { > + // SAFETY: CovariantForLt guarantees covariance, so cast_ref saf= ely shortens the > + // `'static` lifetime. > + let pinned =3D unsafe { self.registration_data_pinned::()? }; > + > + // SAFETY: The data was pinned before the lifetime was shortened= ; pinning is orthogonal > + // to lifetimes. > Ok(unsafe { Pin::new_unchecked(F::cast_ref(pinned.get_ref())) }) > } > } > @@ -399,22 +445,23 @@ struct RegistrationData { > /// This type represents the registration of a [`struct auxiliary_device= `]. When its parent device > /// is unbound, the corresponding auxiliary device will be unregistered = from the system. > /// > -/// The type parameter `F` is a [`CovariantForLt`](trait@CovariantForLt)= encoding of the > -/// registration data type. For non-lifetime-parameterized types, use > -/// [`CovariantForLt!(T)`](macro@CovariantForLt). > -/// The data can be accessed by the auxiliary driver through [`Device::r= egistration_data()`]. > +/// The type parameter `F` is a [`ForLt`](trait@ForLt) encoding of the r= egistration > +/// data type. For non-lifetime-parameterized types, use [`ForLt!(T)`](m= acro@ForLt). > +/// > +/// The data can be accessed by the auxiliary driver through [`Device::r= egistration_data()`] and > +/// [`Device::registration_data_with()`]. > /// > /// # Invariants > /// > /// `self.adev` always holds a valid pointer to an initialized and regis= tered > /// [`struct auxiliary_device`] whose `registration_data_rust` field poi= nts to a > /// valid `Pin>>>`. > -pub struct Registration<'a, F: CovariantForLt + 'static> { > +pub struct Registration<'a, F: ForLt + 'static> { > adev: NonNull, > _phantom: PhantomData>, > } > =20 > -impl<'a, F: CovariantForLt> Registration<'a, F> > +impl<'a, F: ForLt> Registration<'a, F> > where > for<'b> F::Of<'b>: Send + Sync, > { > @@ -526,7 +573,7 @@ pub fn new( > } > } > =20 > -impl Drop for Registration<'_, F> { > +impl Drop for Registration<'_, F> { > fn drop(&mut self) { > // SAFETY: By the type invariant of `Self`, `self.adev.as_ptr()`= is a valid registered > // `struct auxiliary_device`. > @@ -548,7 +595,7 @@ fn drop(&mut self) { > } > =20 > // SAFETY: A `Registration` of a `struct auxiliary_device` can be releas= ed from any thread. > -unsafe impl Send for Registration<'_, F> where for<'a= > F::Of<'a>: Send {} > +unsafe impl Send for Registration<'_, F> where for<'a> F::Of<'= a>: Send {} > =20 > // SAFETY: `Registration` does not expose any methods or fields that nee= d synchronization. > -unsafe impl Sync for Registration<'_, F> where for<'a= > F::Of<'a>: Send {} > +unsafe impl Sync for Registration<'_, F> where for<'a> F::Of<'= a>: Send {}