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 269E53998A6 for ; Mon, 6 Jul 2026 07:07:37 +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=1783321663; cv=none; b=sIWoS9fuy9IAoY5GSDV+grn3uIoRhkkpAzqzHBEalR+94BMcRxzFQl3fpejVtddzVXKnfZSTuCDw7ndiCAwu4zuVx2A/o+6WkHht0+A3zwA6LVqXD/9wrBC9zE33Icnse7Bp9dGT7mYO1/tN8h/hfShk1Q/FDKIMGhzL2KfHjqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783321663; c=relaxed/simple; bh=pHaT0UF2+/TYyEtU2KWnSTLxajZpJo3t4LkID/vIQT0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IBf4KyS7E5WVoJjFANFHHcBGQ/Ynmgn9QK3OMNWHloBRJ4hDgXaUeUSj4WkaULGiesAjMrGN9OnNl8avAP2z1zaPlB8Vla3fqCUuEQ5yj5yfQSm6cigfzrg60Y7nHDAxBOyHX7Bdbua/e/LWuHeJKI0PEtTKEW7TcrcZxD84Q60= 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=qLG46Nfw; 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="qLG46Nfw" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-470cb859d96so1311568f8f.3 for ; Mon, 06 Jul 2026 00:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783321654; x=1783926454; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=9KUrzbaJQC6Xrx/utKgCBD6Z3BLENLPOFpin94j9wAk=; b=qLG46NfwLFRPit0lUzdcg9PM3+R153it5Z/VrkY+LRd39PQi9oK7QkzG1NWf2IApYW mYH9WqfHR878jJkjCBEbaKMvdfmn2OzBif8w0p1islmrPs28qo/yoDQJWcvjEIvksrO9 cxNhLV0bFZbP3q42MVx4OOu3YWAUEpwugNyAp9v4BLSkSyKcPCRigSVUTgfeeQ01twcf 3WJaaQxWwSJqTLBdVOAcDfe0RTomW54ZcdgIaDCAJ8SLJQyqacuBr++UGbdc3xpQbFAo XikZtPbsO4PSQTQiNEQ9yirSoQk4WbmV5k1oHkxCS8qB+M15cNBaHifSzUAh43ap89Pp IWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783321654; x=1783926454; h=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; bh=9KUrzbaJQC6Xrx/utKgCBD6Z3BLENLPOFpin94j9wAk=; b=iDDZ/s7Ls+FhQV04InKqezmPLAX6rBhf9XZPogK9KZb6qYM7Kq/IXkpdw4IIY1wZ6S MrW4BFQoo0n9s6TMM5z1sLDG8a3K219uiNX7qVL4jPO2hkGhYWCWpep2drHxE8vhDXIp SqowPVe7KXo3vJ9X4AY/xX5WMphMGXwUvRPBL6BZ26zM7DMtjEKy+ZFV81YnRe9aDMWS fUCu3eBMojJzqKRuqIOg9QdDD96fUYUvRPZTp/9sofEEv74lKH/y7Qp2gmG7HHhulgAx eMeH+AU4SYZBRx5w0UsBLPjKCziIhD3pBBx6/BdLhzZsLXG5UwzVW8xq6U3b/3jxPeqn sVQA== X-Forwarded-Encrypted: i=1; AHgh+Rrp+4y68pTZiiFh2UgCIpYUDVZCy999LOqMJyEXeX976VvRQlS2ly+9N9DTjM2QM89rePOUxg/7xpriM/8=@vger.kernel.org X-Gm-Message-State: AOJu0Yzx4R+m6/snCdJd0RXsB92QOFFccnfN4pihB6NVGrK1L6ZiOCGK 57yCvq0TrzZQc9CX6PNqtDlt8O2OW3MY4jPv64gB+MMrMTAj975rEJsSN/ehdp0O9TMklfBxqSk 5QzwUgZe/ziGEJYP5PA== X-Received: from wrbfq16.prod.google.com ([2002:a05:6000:2a10:b0:46e:e0c2:b4c3]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:299c:10b0:46f:7127:9f70 with SMTP id ffacd0b85a97d-47aaabde0aemr6910526f8f.18.1783321653615; Mon, 06 Jul 2026 00:07:33 -0700 (PDT) Date: Mon, 6 Jul 2026 07:07:32 +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 Cc: "Joerg Roedel (AMD)" , Will Deacon , 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 Reviewed-by: Alice Ryhl