Merged into drm-misc-fixes
Am 02.06.26 um 13:24 schrieb Thomas Zimmermann:
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]>
---
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
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)