Hi, 
> -----Original Message-----
> From: Thomas Zimmermann <[email protected]>
> Sent: Tuesday, 2 June 2026 14.24
> To: [email protected]; [email protected]; Saarinen,
> Jani <[email protected]>; [email protected]; [email protected];
> [email protected]; [email protected]
> Cc: [email protected]; [email protected]; intel-
> [email protected]; Thomas Zimmermann <[email protected]>
> Subject: [PATCH] drm/dumb-buffer: Drop buffer-size limits for now
> 
> The size limits break some of the CI tests. So drop them for now. Keep the
> other overflow tests from commit 5ab62dd3687b ("drm: prevent integer
> overflows in dumb buffer creation helpers") in place.
> 
> There is still a pre-existing overflow check for 32-bit type limits in
> drm_mode_create_dumb() that will catch the really absurd size requests.
> Drivers that still do not use drm_mode_size_dumb() should be updated. The
> helper calculates dumb-buffer geometry with overflow checks.
> 
> Signed-off-by: Thomas Zimmermann <[email protected]>
> Fixes: 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer
> creation helpers")
> Reported-by: Jani Nikula <[email protected]>
> Closes: https://lore.kernel.org/dri-
> devel/[email protected]/
> Cc: Rajat Gupta <[email protected]>
> Cc: Thomas Zimmermann <[email protected]>
> Cc: Maarten Lankhorst <[email protected]>
> Cc: Maxime Ripard <[email protected]>
Seems to satisfy CI :
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_167736v1/index.html?testfilter=vgem%7Ckms_big.*line

Br,
Jani
> ---
>  drivers/gpu/drm/drm_dumb_buffers.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dumb_buffers.c
> b/drivers/gpu/drm/drm_dumb_buffers.c
> index e60130b2bb0c..8e9ff17538e7 100644
> --- a/drivers/gpu/drm/drm_dumb_buffers.c
> +++ b/drivers/gpu/drm/drm_dumb_buffers.c
> @@ -201,13 +201,6 @@ int drm_mode_create_dumb(struct drm_device
> *dev,
>       if (!args->width || !args->height || !args->bpp)
>               return -EINVAL;
> 
> -     /* Reject unreasonable inputs early.  Dumb buffers are for software
> -      * rendering; nothing legitimate needs more than 8192x8192 at
> 32bpp.
> -      * This prevents overflows in downstream alignment helpers.
> -      */
> -     if (args->width >= 8192 || args->height >= 8192 || args->bpp > 32)
> -             return -EINVAL;
> -
>       /* overflow checks for 32bit size calculations */
>       if (args->bpp > U32_MAX - 8)
>               return -EINVAL;
> 
> base-commit: a980196655477a8f5067112946401fe52e510664
> --
> 2.54.0

Reply via email to