From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f73.google.com (mail-ed1-f73.google.com [209.85.208.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 79BDA30D3EF for ; Mon, 13 Jul 2026 15:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783956951; cv=none; b=cOXpuX0XC2jJ+Ek4AVPDq3ZO5I0mmkyokkRnZETaSuwQLNcVtOrl3XiMFnHH0244CR7tSPzgEnqN1wmvLXaKa750lJW2xM9oa0XBDD994te9rHV4MH5KufX3JakkSN+eXZHBP8qbDRfXKReTdclEVJTJUjQgBesfWfvPPURWgBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783956951; c=relaxed/simple; bh=/+VDDljuUJgrqVoL7d8VkVrTcvD3lziVLdeX6XyuqXE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=a/ylQGdtFOAaFaXwK7j5nj4+inpXnnWtIyeIxJATO+01MA7Om0mErkJ9TGVu5M4BK9aI2dUzFNUitzUfLq3u3gHsFLRBLAuIrGRWLxWMlCn9xKkUI8p/n5qa2AThfpuAFNRGJCk6jGgOUnBdjGkpJTAel7mM0Uqi4TcNkHjFHEE= 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=JB1TDuKm; arc=none smtp.client-ip=209.85.208.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="JB1TDuKm" Received: by mail-ed1-f73.google.com with SMTP id 4fb4d7f45d1cf-6983e384c66so3045844a12.1 for ; Mon, 13 Jul 2026 08:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1783956943; x=1784561743; 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=UZgc/vupwsueMqB4x7/Q5vvpLkG8Vv1Z1ubKbDy/+14=; b=JB1TDuKmy9yrGojKdJaeJ5xcFyhwmxdHuV1LxT+M9XFbR6pCj+/5bbSvoykOi38mHd ZbEXKeaUtt2nlQoScgcBBf5tkX55KQH3tVsk215E9OEfNAB4XgkQ71U96U3qlhn706we QkXNBwZeZ4CT77yxHMDW3KKF8ZHnaOZ6JB4br0N0rgpK0vdl2uyR+e6GhzKJmK2b2wST oLbW33BpNAFTnhKhdu4VSQkXRIw0CC41UiXwE80TnvtgO5zFxm4NoenPwsSFnMrssm49 jg+N9ZBDEnJua86v4dQnw5mFDdwqvMCkpwi6PN6qbBZ1hs2Zklf2YHAbcEKt5rcL+fqE 08zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783956943; x=1784561743; 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=UZgc/vupwsueMqB4x7/Q5vvpLkG8Vv1Z1ubKbDy/+14=; b=iJ3FwPOQS35xZZaMxQdHiaopZvhmmypKVA4m0qgNVDSrFLlhfAbxouYjXRlchvoTRG wDFRM/eHsQ3tj6uZR8n98TpNUvecuS7hpdGQJNuoheuApnjJw3ZEYsPQn7xgEbGRkytd yoDy3iWYCsqaldRo1tOfBK6/NMryyWwal6at9B2nvPR281izFX70FHr064P9JODwYlgc n5OzgjzfsGtfhd70UphMl5OJtHOEcXHby6UZqC4NCJJAjUgsLaNj9BIk66IvT0ohGXo7 GSKGFxMV5cdKtuZRDILObzHWGiTFci+YODLcxbZqm7hrkod8XUG5Sdqh/pz3Ju8Xf3hI jrSg== X-Forwarded-Encrypted: i=1; AHgh+RoZnv/ymYumDpAR3cYjuYwzbvB4Dbvq3YphZeRpFKUuC6Dza6Od8t1tlWfm5HbseXsOqAboWLgNpI1tYDo=@vger.kernel.org X-Gm-Message-State: AOJu0YxgSk8mp+nRdat0nWofU0yq95Xb3PX/1fzGDB/fQTYbgUzLzrKI WAPuaI7Sap/0UiiPoFnygRJQ61Fo1mDyIPZttNJTdtOJQ5/7dXQ/iqtouxLT89WlEC9YukHmsY/ PmJiwj6FMJt4zH3/RZg== X-Received: from edbif2.prod.google.com ([2002:a05:6402:5d82:b0:698:bf45:cd4f]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6402:2686:b0:698:87ac:33c2 with SMTP id 4fb4d7f45d1cf-69c5ef830e2mr4273388a12.9.1783956942642; Mon, 13 Jul 2026 08:35:42 -0700 (PDT) Date: Mon, 13 Jul 2026 15:35:41 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260707160200.2798072-1-1479826151@qq.com> Message-ID: Subject: Re: [PATCH v2] rust: drm: fix GEM object pointer safety docs From: Alice Ryhl To: Yilin Chen <1479826151@qq.com> Cc: David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, Miguel Ojeda , Danilo Krummrich , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Tue, Jul 07, 2026 at 04:33:33PM +0000, Yilin Chen wrote: > IntoGEMObject::from_raw() receives a pointer to struct drm_gem_object, > not a pointer to Self. The previous documentation used Self even though > the function argument is the embedded GEM object pointer. > > However, the pointer must not be any arbitrary valid drm_gem_object. The > implementations recover Self with container_of(), so the GEM object must > be embedded in a valid Self instance. This patch documents that requirement > explicitly. > > Assisted-by: Codex:GPT-5 > Signed-off-by: Yilin Chen <1479826151@qq.com> Merged into drm-rust-next. Thanks!