Skip to contentSkip to conversation

drm-misc-fixes

GIT PULL Thomas Zimmermann 3 participants 10 messages May 29 – Jun 2

lore
Share & tools
lore
#0 lore raw

Hi Dave, Sima,

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

Best regards
Thomas

drm-misc-fixes-2026-05-29:
Short summary of fixes pull:

amdxdna:
- require IOMMU on AIE2

dumb-buffer:
- prevent overflows in dumb-buffer creation

dma-buf:
- fix UAF in dma_buf_fd() tracepoint

hyperv:
- improve protocol validation

ivpu:
- test write offset in debugfs

rocket:
- fix UAF in bo creation
The following changes since commit 9af1b6e175c82daf4b423da339a722d8e67a735a:

drm/virtio: use uninterruptible resv lock for plane updates (2026-05-20 18:12:11 +0300)

are available in the Git repository at:

https://gitlab.freedesktop.org/drm/misc/kernel.git tags/drm-misc-fixes-2026-05-29

for you to fetch changes up to 5ab62dd3687bcc2cc542b99385aabac5c996db6f:

drm: prevent integer overflows in dumb buffer creation helpers (2026-05-29 08:30:47 +0200)

----------------------------------------------------------------
Short summary of fixes pull:

amdxdna:
- require IOMMU on AIE2

dumb-buffer:
- prevent overflows in dumb-buffer creation

dma-buf:
- fix UAF in dma_buf_fd() tracepoint

hyperv:
- improve protocol validation

ivpu:
- test write offset in debugfs

rocket:
- fix UAF in bo creation

----------------------------------------------------------------
Berkant Koc (2):
drm/hyperv: validate resolution_count and fix WIN8 fallback drm/hyperv: validate VMBus packet size in receive callback

Dan Carpenter (1):
accel/ivpu: prevent uninitialized data bug in debugfs

David Carlier (1):
dma-buf: fix UAF in dma_buf_fd() tracepoint

Dhabaleshwar Das (1):
accel/rocket: fix UAF via dangling GEM handle in create_bo

Lizhi Hou (1):
accel/amdxdna: Block running when IOMMU is off

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

 drivers/accel/amdxdna/aie2_pci.c          |   5 ++
 drivers/accel/ivpu/ivpu_debugfs.c         |   2 +-
 drivers/accel/rocket/rocket_gem.c         |  17 +++--
 drivers/dma-buf/dma-buf.c                 |   6 +-
 drivers/gpu/drm/drm_dumb_buffers.c        |  14 +++-
 drivers/gpu/drm/hyperv/hyperv_drm_proto.c | 113 +++++++++++++++++++++++++-----
 6 files changed, 132 insertions(+), 25 deletions(-)
Signature · 5 lines
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)
#1 lore raw
Quoted 2 lines · Thomas Zimmermann

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel
#2 lore raw
Quoted 7 lines · Jani Nikula
Quoted 2 lines · Thomas Zimmermann

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

The IGT test kms_big_fb uses max width and height from GetResources, and i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

+ /* 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;

This is now in v7.1-rc6. Please revert ASAP.

BR,
Jani.

Quoted 10 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel
#3 lore raw
Quoted 21 lines · Jani Nikula
Quoted 7 lines · Jani Nikula
Quoted 2 lines · Thomas Zimmermann

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

The IGT test kms_big_fb uses max width and height from GetResources, and i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +6 -0
+       /* 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;
Quoted 1 line

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

Quoted 4 lines · Thomas Zimmermann

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Please also read [1] with its recent updates.

BR,
Jani.

[1] https://docs.kernel.org/process/security-bugs.html#what-qualifies-as-a-security-bug

Quoted 16 lines

BR,
Jani.

Quoted 10 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel
#4 lore raw

Hi

Am 01.06.26 um 17:49 schrieb Jani Nikula:

Quoted 8 lines · Jani Nikula
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Thomas Zimmermann
Quoted 2 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

That CI report is where?

Quoted 20 lines
Quoted 12 lines

The IGT test kms_big_fb uses max width and height from GetResources, and i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +6 -0
+       /* 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;
Quoted 1 line

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

Quoted 4 lines · Thomas Zimmermann

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

Quoted 5 lines

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Indeed. But that's how this fix got in.

It fixes a possible overflow elsewhere and using dumb buffers with higher values that given here is questionable. Instead of outright reverting this, let's first look what actually broke.

Best regards
Thomas

Quoted 25 lines

Please also read [1] with its recent updates.

BR,
Jani.

[1] https://docs.kernel.org/process/security-bugs.html#what-qualifies-as-a-security-bug

Quoted 14 lines

BR,
Jani.

Quoted 9 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

Signature · 6 lines
--
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)
#5 lore raw

Hi,

Quoted 23 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Thomas Zimmermann
Sent: Monday, 1 June 2026 20.27
To: Jani Nikula <[email protected]>; Dave Airlie <[email protected]>; Simona Vetter <[email protected]>
Cc: Joonas Lahtinen <[email protected]>; Tvrtko Ursulin <[email protected]>; Vivi, Rodrigo <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Brost, Matthew <[email protected]>; Thomas Hellström <[email protected]>; Oded Gabbay <[email protected]>; [email protected]; intel- [email protected]; [email protected]; dim- [email protected]
Subject: Re: [PULL] drm-misc-fixes

Hi

Am 01.06.26 um 17:49 schrieb Jani Nikula:

Quoted 3 lines · Jani Nikula
Quoted 2 lines · Jani Nikula
Quoted 1 line

On Fri, 29 May 2026, Thomas Zimmermann <[email protected]>

wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation
helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

That CI report is where?

See eg. https://intel-gfx-ci.01.org/tree/drm-tip/index.html?testfilter=kms_big
that is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16308

and
second one: https://intel-gfx-ci.01.org/tree/drm-tip/igt@[email protected]
that is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16296

there is also comment from Chaitanya now already
"issue is not seen after reverting and test "igt@vgem_basic@create" is passing

commit 5ab62dd3687bcc2cc542b99385aabac5c996db6f
Author: Rajat Gupta <[email protected]>
Date: Wed May 20 22:11:21 2026 -0700

drm: prevent integer overflows in dumb buffer creation helpers"

Br
Jani

Quoted 75 lines
Quoted 8 lines

Review

Quoted 8 lines

The IGT test kms_big_fb uses max width and height from GetResources, and
i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +2 -0
+       /* Reject unreasonable inputs early.  Dumb buffers are for software
+        * rendering; nothing legitimate needs more than 8192x8192 at

32bpp.

Quoted 9 lines
Quoted 6 lines
(quoted diff) +4 -0
+        * This prevents overflows in downstream alignment helpers.
+        */
+       if (args->width >= 8192 || args->height >= 8192 || args->bpp > 32)
+               return -EINVAL;

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

On Fri, 29 May 2026, Thomas Zimmermann <[email protected]>

Quoted 9 lines · wrote:
Quoted 4 lines

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Indeed. But that's how this fix got in.

It fixes a possible overflow elsewhere and using dumb buffers with higher values that given here is questionable. Instead of outright reverting this, let's first look what actually broke.

Best regards
Thomas

Quoted 4 lines

Please also read [1] with its recent updates.

Quoted 23 lines

BR,
Jani.

[1]
https://docs.kernel.org/process/security-bugs.html#what-qualifies-as-a
-security-bug

Quoted 14 lines

BR,
Jani.

Quoted 9 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

--
--
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)

#6 lore raw

Hi,

Quoted 58 lines

-----Original Message-----
From: Saarinen, Jani
Sent: Monday, 1 June 2026 22.24
To: 'Thomas Zimmermann' <[email protected]>; Jani Nikula <[email protected]>; Dave Airlie <[email protected]>; Simona Vetter <[email protected]>
Cc: Joonas Lahtinen <[email protected]>; Tvrtko Ursulin <[email protected]>; Vivi, Rodrigo <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Brost, Matthew <[email protected]>; Thomas Hellström <[email protected]>; Oded Gabbay <[email protected]>; [email protected]; intel- [email protected]; [email protected]; dim- [email protected]
Subject: RE: [PULL] drm-misc-fixes

Hi,

Quoted 10 lines

-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Thomas Zimmermann
Sent: Monday, 1 June 2026 20.27
To: Jani Nikula <[email protected]>; Dave Airlie <[email protected]>; Simona Vetter <[email protected]>
Cc: Joonas Lahtinen <[email protected]>; Tvrtko Ursulin <[email protected]>; Vivi, Rodrigo <[email protected]>; Maarten Lankhorst <[email protected]>; Maxime Ripard <[email protected]>; Brost, Matthew <[email protected]>;

Thomas

Quoted 13 lines

Hellström <[email protected]>; Oded Gabbay <[email protected]>; [email protected]; intel- [email protected]; [email protected]; dim- [email protected]
Subject: Re: [PULL] drm-misc-fixes

Hi

Am 01.06.26 um 17:49 schrieb Jani Nikula:

Quoted 3 lines · Jani Nikula
Quoted 2 lines · Jani Nikula
Quoted 1 line

On Fri, 29 May 2026, Thomas Zimmermann <[email protected]>

wrote:

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation
helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

That CI report is where?

See eg. https://intel-gfx-ci.01.org/tree/drm-tip/index.html?testfilter=kms_big
that is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16308

and
second one: https://intel-gfx-ci.01.org/tree/drm-
tip/igt@[email protected]
that is https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/16296

Quoted 8 lines

there is also comment from Chaitanya now already "issue is not seen after reverting and test "igt@vgem_basic@create" is passing

commit 5ab62dd3687bcc2cc542b99385aabac5c996db6f
Author: Rajat Gupta <[email protected]>
Date: Wed May 20 22:11:21 2026 -0700

drm: prevent integer overflows in dumb buffer creation helpers"

This proves revert is working (https://patchwork.freedesktop.org/series/167686/#rev1) :
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_167686v1/index.html?testfilter=vgem%7Cbig_fb

Quoted 81 lines

Br
Jani

Quoted 77 lines
Quoted 9 lines

Review

Quoted 9 lines

The IGT test kms_big_fb uses max width and height from GetResources, and
i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +3 -0
+       /* Reject unreasonable inputs early.  Dumb buffers are for software
+        * rendering; nothing legitimate needs more than 8192x8192
+ at

32bpp.

Quoted 9 lines
Quoted 6 lines
(quoted diff) +4 -0
+        * This prevents overflows in downstream alignment helpers.
+        */
+       if (args->width >= 8192 || args->height >= 8192 || args->bpp > 32)
+               return -EINVAL;

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

On Fri, 29 May 2026, Thomas Zimmermann <[email protected]>

Quoted 9 lines · wrote:
Quoted 4 lines

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm:
prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Indeed. But that's how this fix got in.

It fixes a possible overflow elsewhere and using dumb buffers with higher values that given here is questionable. Instead of outright reverting this, let's first look what actually broke.

Best regards
Thomas

Quoted 23 lines

Please also read [1] with its recent updates.

BR,
Jani.

[1]
https://docs.kernel.org/process/security-bugs.html#what-qualifies-as

(quoted diff) +0 -2
-a
-security-bug
Quoted 11 lines

BR,
Jani.

Quoted 4 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

This is not how we're supposed to roll. What's going on?

BR,
Jani.

--
--
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)

#7 lore raw
In reply to Thomas Zimmermann
Quoted 5 lines · Thomas Zimmermann

Hi

Am 01.06.26 um 17:49 schrieb Jani Nikula:

Quoted 2 lines · Jani Nikula
Quoted 1 line · Jani Nikula
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines · Thomas Zimmermann
Quoted 2 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

That CI report is where?

It's currently really thin on details, I'm afraid [1].

[1] https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16308

Quoted 26 lines
Quoted 20 lines
Quoted 12 lines

The IGT test kms_big_fb uses max width and height from GetResources, and i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +6 -0
+       /* 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;
Quoted 1 line

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

Quoted 4 lines · Thomas Zimmermann

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

Quoted 5 lines

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Quoted 5 lines

Indeed. But that's how this fix got in.

It fixes a possible overflow elsewhere and using dumb buffers with higher values that given here is questionable. Instead of outright reverting this, let's first look what actually broke.

There's the kms_big_fb.c test [2]. It uses drmModeGetResources() to get the max framebuffer size for the device. It's 16384x16384 for most Intel devices that aren't ancient [3]. (Ditto for AMD I think.) Now the CREATE_DUMB ioctl fails, because 5ab62dd3687b introduced new arbitrary fixed scanout size limits that don't reflect the actual device limits.

Why is it questionable to use dumb buffers that are within the device limits? Why is it not questionable to add arbitrary fixed limits?

Don't get me wrong, fixing overflows is great, but this part is an unwarranted UABI change, and they shouldn't be rushed in masqueraded as security fixes.

BR,
Jani.

[2] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/intel/kms_big_fb.c?ref_type=heads#L994

[3] https://gitlab.freedesktop.org/drm/i915/kernel/-/blob/drm-intel-next/drivers/gpu/drm/i915/display/intel_display_driver.c?ref_type=heads#L133

Signature · 1 line
Jani Nikula, Intel
#8 lore raw

Hi

Am 01.06.26 um 21:52 schrieb Jani Nikula:

Quoted 44 lines · Thomas Zimmermann
Quoted 4 lines

Hi

Am 01.06.26 um 17:49 schrieb Jani Nikula:

Quoted 1 line · Jani Nikula
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines · Jani Nikula
Quoted 6 lines · Thomas Zimmermann
Quoted 2 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

That CI report is where?

It's currently really thin on details, I'm afraid [1].

[1] https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16308

Quoted 27 lines
Quoted 20 lines
Quoted 12 lines

The IGT test kms_big_fb uses max width and height from GetResources, and i915 and xe use max_width 16384 and max_height 16384 in mode config.

The regressing commit adds random hard limits not based on anything:

(quoted diff) +6 -0
+       /* 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;
Quoted 1 line

This is now in v7.1-rc6. Please revert ASAP.

Ah, missed this clue in the pull request:

Quoted 4 lines · Thomas Zimmermann

here is this week's PR from drm-misc-fixes. There's one cross-subsys commit to the dma-buf code. Commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") has not Link tag because it went through the security list.

Quoted 5 lines

We have the whole review and CI processes in place to catch silly mistakes, and then we proceed to shoot ourselves in the foot and bypass all of that because "security", and expedite the regressions everywhere. I'll bet this will be in stable kernels in no time too. This is stupid.

Indeed. But that's how this fix got in.

Quoted 8 lines
Quoted 3 lines

It fixes a possible overflow elsewhere and using dumb buffers with higher values that given here is questionable. Instead of outright reverting this, let's first look what actually broke.

There's the kms_big_fb.c test [2]. It uses drmModeGetResources() to get the max framebuffer size for the device. It's 16384x16384 for most Intel devices that aren't ancient [3]. (Ditto for AMD I think.) Now the CREATE_DUMB ioctl fails, because 5ab62dd3687b introduced new arbitrary fixed scanout size limits that don't reflect the actual device limits.

Then let's increase the size limits to 16384 and the bpp to 64. That's still within uint32 and (AFAICT) should support all devices.

Quoted 3 lines

Why is it questionable to use dumb buffers that are within the device limits? Why is it not questionable to add arbitrary fixed limits?

Buffers of that size can be larger than the PCI BAR, which results in mapping errors. So we'll have to enforce some limits on dumb buffers at some point soon. (Driver-native ioctls is another story.)

Quoted 4 lines

Don't get me wrong, fixing overflows is great, but this part is an unwarranted UABI change, and they shouldn't be rushed in masqueraded as security fixes.

It's all there to make it safe. [1] I've gone through drivers and converted the majority of dumb-buffer code to the helpers, but it's whack-a-mole in the end.

[1] https://elixir.bootlin.com/linux/v7.0.10/source/drivers/gpu/drm/drm_dumb_buffers.c#L94

Best regards
Thomas

Quoted 11 lines

BR,
Jani.

[2] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/intel/kms_big_fb.c?ref_type=heads#L994

[3] https://gitlab.freedesktop.org/drm/i915/kernel/-/blob/drm-intel-next/drivers/gpu/drm/i915/display/intel_display_driver.c?ref_type=heads#L133

Signature · 6 lines
--
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)
#9 lore raw
In reply to Jani Nikula

Am 01.06.26 um 17:28 schrieb Jani Nikula:

Quoted 6 lines · Thomas Zimmermann
Quoted 2 lines

Rajat Gupta (1):
drm: prevent integer overflows in dumb buffer creation helpers

Looks like this commit 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers") regressed in our CI, awaiting confirmation.

A possible patch for this issue is at https://lore.kernel.org/dri-devel/[email protected]/

Quoted 11 lines

No matter what, it's immediately suspect because AFAICT it was not posted on the lists, and the commit doesn't have a Link: trailer pointing at the patch.

This is not how we're supposed to roll. What's going on?

BR,
Jani.

Signature · 6 lines
--
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)