From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (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 71A7B47CC91 for ; Fri, 16 Oct 2026 12:31:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792153887; cv=none; b=ELqJPvU23B+7SQ5ya4WgQe279yFB+6BM/+VxwXEsh6wIButc4NjwtVpiFlBPgt+h4UBYrsnZ7V7rjO+xoYYMM3aZHff1NcECZc6VTIfNARnHTrc3TFlS4fWP5q74ZBvIwVXcUuPb7uPRJw6RY6OzZuM+3osbgceFk5bu6vDpeD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792153887; c=relaxed/simple; bh=7GYnwhI3jVn6b4pynLH+o13sxdIvDiuogpoaPN+NUKU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=YUKS7GeiY9m35nvOPLwCZRiXZ/S9X7JA7BP8eDBlPc125erL+G9RoxCn1udxt2fiVcbznfkAIcY27vLvdnjPdYrLqse99zoVen+4OhZ67JzcKnvUZhqyOD7J3I2ePfV1VhOXMcHvetXk1nv++pnm3jbF0RJ4JV1jifIYx1+JzwQ= 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=k2Be9rfY; arc=none smtp.client-ip=209.85.128.69 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="k2Be9rfY" Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a1ad49096fso10174865e9.0 for ; Fri, 16 Oct 2026 05:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1792153884; x=1792758684; darn=vger.kernel.org; h=content-transfer-encoding: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=7GYnwhI3jVn6b4pynLH+o13sxdIvDiuogpoaPN+NUKU=; b=k2Be9rfYIL9Pei36b3BrPQAFs1l7MhyyWe40PSciakTilBjJV4Qn6D+oqAA4S9sDK6 TaQ4X3uOadMYqeon4GWEcLQ9PqfVH0NKtY3s/qimv2TGc7PEc34uTKwsGJ/u71u7RbEs SjqOvzzoR2dHcSsTy/GCZHoAq6GlDDoyNmn2+yPxmdVv3PHqmosYEHRLDgEK2qOQSdKt 8DxdAlWxXbEj7FOKxRd9Wiu0otOJCNvTQfSph/JmtBRgsCmw1RF4D7+a9n4YqB5mTlo4 lNbKvW4dZaF1GqR3v9XykddNvxCrM+F/Bqq0ksl0r4RYNUw7Eh8JMJ/TuFGapOlIFLZ1 z52w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792153884; x=1792758684; h=content-transfer-encoding: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=7GYnwhI3jVn6b4pynLH+o13sxdIvDiuogpoaPN+NUKU=; b=CgfLsejuhpCwm2yJWFBevMHEbwK0PZAZsJe/VhsVPC36ziIq5pVEiSWbhvKnD3Rnsc JcixwuWBpUhk267NvalnumvyeiamzR9jpToaqo7hcT6hDfMgmfqelwDOsRuNGZW9nmk6 t/gcmaQDqFBp10mRFECVPH0Bjb01wdb48L7oYvAiPUX2RgATEjbEEX1XiiQ8Xrtp0A/H 5oYQbMhcz8kPFBRLotBsFOco64MYpN39gvXMr9LDx0FUWEaJqtmeojKdWKpGONdG0sFK /J6U9ElcGEhAl+xeYOFWhDwDRbXiDMqL+rMR5/36n5Gnp7TBzhfmKoH0qB2QcNCtNyzJ 7zOQ== X-Forwarded-Encrypted: i=1; AKwUvBwtcg9VDiXp+ECTup8n7UvXZabbVxXIncdP+ZyK0bzoEBZExhNoc91QD6gBuv+dteuXYaOUMc/AjGhn2Pw=@vger.kernel.org X-Gm-Message-State: AFq9FYJkgk2FoQwnXRgoulvzUIjmr14t1oL4Ltok1Sqn2aGc1NRoih89 q5GjiJMBesl7Eh1x06ET8M8vqJIzVaGBhqjrKs8HFKtfV4pSOm/+u5UjaE65hXorVG8lYWVmC39 maNsrUsTPu98ukdx10Q== X-Received: from wmee11.prod.google.com ([2002:a05:600c:218b:b0:4a1:bd96:2aa0]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:c106:b0:4a1:7a1e:6910 with SMTP id 5b1f17b1804b1-4a1c6635d15mr53398115e9.4.1792153883281; Fri, 16 Oct 2026 05:31:23 -0700 (PDT) Date: Fri, 16 Oct 2026 12:31:22 +0000 In-Reply-To: <20260930122755.1657820-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260930122755.1657820-2-phasta@kernel.org> X-Mailer: git-send-email 2.56.0.212.g129ede20d9-goog Message-ID: <20261016123122.3744636-1-aliceryhl@google.com> Subject: Re: [PATCH v2] rust: DmaFence: Remove static lifetime From: Alice Ryhl To: Philipp Stanner Cc: Alice Ryhl , Sumit Semwal , "=?UTF-8?q?Christian=20K=C3=B6nig?=" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , "=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?=" , Benno Lossin , Andreas Hindborg , Trevor Gross , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , "=?UTF-8?q?Onur=20=C3=96zkan?=" , linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 30, 2026 at 02:27:56PM +0200, Philipp Stanner wrote: > A FenceCallbackRegistration can stem from another party than the one > that has created a Fence. Should that party forget the registration > object (for example through a refcount cycle) and then unload the > module, a fence signaling would run into the unloaded module, causing > UAF bugs. >=20 > So far, this has been solved by demanding that the payload data of the > registration object demanding static lifetime. >=20 > It turns out, however, that this is harmful because the static lifetime > bubbles up to all users, ultimately potentially causing a large amount > of driver data to be static, which renders the lifetime obsolete. >=20 > Solve this issue instead through an unsafe requirement which demands > that the user does not forget the registration object. This is also the > solution chosen by ScopedWork. >=20 > Suggested-by: Danilo Krummrich > Signed-off-by: Philipp Stanner > Reviewed-by: Onur =C3=96zkan Reviewed-by: Alice Ryhl Applied to drm-rust-next. Thanks!