From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F41662E7378 for ; Thu, 9 Jul 2026 15:47:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783612024; cv=none; b=bl/yqoLCcx3bI3xj5dPrSHroy7TAXNZMOM7QXfmTNWeaipwSqzZgJuyoTANUXVjXfT7vV5LZM4ghWrQscfP4L3Xv3ZJY2ZClPw7CO08s/lvtbgYQTJjlDGWrJHktDTOlFDbZCazx2xissJcXjqi89U9IGBJM4E2yRThQclZ+yIM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783612024; c=relaxed/simple; bh=MgPfa4pKGE1SzEFbQCeqHMYKqdAxa7JEG0bUQwYux8M=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mRVRS5Aw0KkzwJ5lQVa4vumLftcO3CzF23/94I78NT8MSyUZskqOMfa61J2G6DPvrbOupCVYos/oSwvBvv1M8l90YGI2wNmehkECmQXp3pcB5AyS6wet4SkZh0tJ0ZU+4fgNRuTJy+xZ1igN0ECgmz/Jx3Ull4GuUeLCaZatiNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=VtSeojIQ; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="VtSeojIQ" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-47d81cf0c4cso24718f8f.2 for ; Thu, 09 Jul 2026 08:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783612021; x=1784216821; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=1ShG0iDDEU7To4XJxO6yX4MTZYqSurnuJSiTMgcIjD0=; b=VtSeojIQJgqW0gzFTXVyqVJTks+w6NoJsU9FAUzzfdIOG6DS/E7PIW/dG7POyUBxKq 7v6ixAGBizqM9xc8SyAIc5iTZirZOjm7d7orYEwqoaB9R4lwdazyFLWrS81xyhDAo0Ks NvgVJyGXBFc2wkvew1Vs85TvPUB3+EJJdOAuGil5Nhazfyfhgq21NMvUFM4ruFAHkobw kX5BwIdYUlm+TSZED6ESVUd68hlJM8e1GZblftYX6zyT6CmqaVPBEZbJw4YIrx5mBiF5 HY/MLvzQOJpI4UtAJO8Xl4y149/m4uNMStW+nf6UWc6lzRV1RhRNLy3XqOJZu4pz2Fot IrBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783612021; x=1784216821; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1ShG0iDDEU7To4XJxO6yX4MTZYqSurnuJSiTMgcIjD0=; b=C0PZa8H1FedKsZfRuJVax/sxVWh1HoCJM4xYf0WdL0kXW7hg+w0r0bAvZVqzxZA0PT 09MfRbsrEkD2EvAqaP/2Wte0ga+LhyZoHDxGixsBUSeEiHutPLkNDHQ0Z9E2KZQLyMME BvQB3IB8vVw8sdExu5CUKpiIO3XC32DwDRZCE/dFPOo11l4Hbi0KSF0BaEQ7wM6gKUjt y22edaiGZPWpy9+6E0hzspmkUsoV/vCZopSezIGrdMek/axN62d3GCfJPW9tOmGxDVzj 8bXM5fVsKkk8xcPpSWtKBabwLrWXMOFZNsWEvKCverkR+3t+3b/Iwj/H+YYjpvGAAco+ h2lw== X-Forwarded-Encrypted: i=1; AHgh+RrpWvgxXlaRyhzFEoxMnUVn4r/Gy9EDarCgKj9YaHgPNW9uyIhIVXE9pvImmoFCt4jhOao3bJoLmQMdaBQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5nHr8hq0NB7Z1leY2P4vZvJyAcqn6Fm9RUlLe0EyHuP3xuLY8 NDjPNgeRiUS9WujuT+PZPLJUZefjEYHlhADWZ1x8Odptf93LpI03jB7QwiLXIHoi9hnooYbqTpl kmA4735qJK4S31D3SLg== X-Received: from wrs28.prod.google.com ([2002:a05:6000:65c:b0:44a:cfa:ca21]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2201:b0:465:ba53:a006 with SMTP id ffacd0b85a97d-47df07394efmr8123926f8f.23.1783612021018; Thu, 09 Jul 2026 08:47:01 -0700 (PDT) Date: Thu, 9 Jul 2026 15:46:59 +0000 In-Reply-To: <20260703-pgtable_lt_b4-v3-1-e738e1f513a4@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260703-pgtable_lt_b4-v3-1-e738e1f513a4@collabora.com> Message-ID: Subject: Re: [PATCH v3] rust: iommu: add device lifetime to IoPageTable From: Alice Ryhl To: Deborah Brouwer , "Joerg Roedel (AMD)" , Will Deacon Cc: Robin Murphy , Miguel Ojeda , Boqun Feng , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , iommu@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, samitolvanen@google.com, laura.nao@collabora.com, boris.brezillon@collabora.com, daniel.almeida@collabora.com Content-Type: text/plain; charset="utf-8" On Fri, Jul 03, 2026 at 05:28:44PM -0700, Deborah Brouwer wrote: > Currently, using a raw IoPageTable is unsafe because the returned > IoPageTable is not tied to the device driver binding lifetime. > > Since device drivers now receive a lifetime parameter <'bound> > representing the interval during which a device driver is bound to its bus > device, add a lifetime parameter to IoPageTable. This ensures that > the returned IoPageTable cannot outlive the bus device binding. > > Also remove the option to create a page table as a device resource since > currently Devres is not compatible with resources that have a lifetime > parameter. This option can be restored once the lifetime-aware > wrapper for devres is available and if a use-case appears for it. > > Suggested-by: Boris Brezillon > Signed-off-by: Deborah Brouwer Joerg, this patch is a dependency for this other series: https://lore.kernel.org/rust-for-linux/20260708-fw-boot-b4-v5-0-7792ab68e359@collabora.com Would it be okay with you if I apply this patch via drm-rust-next together with the thing it's a dependency of? It cleanly merges together with 'rust: iommu: replace core::mem::zeroed with Zeroable::zeroed' that you already picked up, so taking them through separate trees will not lead to a merge conflict. Alice