[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260113-kickass-sensible-basilisk-66d487@houat>
Date: Tue, 13 Jan 2026 16:56:31 +0100
From: Maxime Ripard <mripard@...nel.org>
To: Xiao Kan <814091656@...com>
Cc: maarten.lankhorst@...ux.intel.com, tzimmermann@...e.de,
airlied@...il.com, simona@...ll.ch, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, w@....eu, security@...nel.org, kanxiao666@...il.com,
xiao.kan@...sung.com
Subject: Re: [PATCH v2] drm: Account property blob allocations to memcg
Hi,
On Mon, Jan 05, 2026 at 11:14:13AM -0500, Xiao Kan wrote:
> DRM_IOCTL_MODE_CREATEPROPBLOB allows userspace to allocate arbitrary-sized
> property blobs backed by kernel memory.
>
> Currently, the blob data allocation is not accounted to the allocating
> process's memory cgroup, allowing unprivileged users to trigger unbounded
> kernel memory consumption and potentially cause system-wide OOM.
>
> Mark the property blob data allocation with GFP_ACCOUNT so that the memory
> is properly charged to the caller's memcg. This ensures existing cgroup
> memory limits apply and prevents uncontrolled kernel memory growth without
> introducing additional policy or per-file limits.
>
> Changes since v1:
> - Drop the per-drm_file blob count limit.
> - Account blob data allocations to memcg via GFP_KERNEL_ACCOUNT instead.
>
> Signed-off-by: Xiao Kan <814091656@...com>
> Signed-off-by: Xiao Kan <xiao.kan@...sung.com>
It looks like you sent two different patches labelled v2? Sending a new
version in itself is not a problem (and even encourage), but you should
always bump the version number.
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (274 bytes)
Powered by blists - more mailing lists