lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9dcdfec8-4551-4370-8695-80960e3c632f@suse.de>
Date: Fri, 20 Jun 2025 07:17:15 +0200
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Zenghui Yu <zenghui.yu@...ux.dev>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
 airlied@...il.com, simona@...ll.ch, maarten.lankhorst@...ux.intel.com,
 mripard@...nel.org
Subject: Re: [report] DMA-API: platform vgem: mapping sg segment longer than
 device claims to support [len=1048576] [max=65536]

Hi

Am 19.06.25 um 18:07 schrieb Zenghui Yu:
> Hi Thomas,
>
> On 2025/6/19 00:25, Thomas Zimmermann wrote:
>> Hi
>>
>> Am 18.06.25 um 18:03 schrieb Zenghui Yu:
>>> Hi all,
>>>
>>> Running the dmabuf-heap test [*] on mainline kernel triggers the
>>> following splat:
>>>
>>>   ------------[ cut here ]------------
>>>   DMA-API: platform vgem: mapping sg segment longer than device claims to support [len=1048576] [max=65536]
>> Thanks for the bug report. We have a possible fix in the latest drm-
>> misc-next tree. Does it work if use replace DRM_GEM_SHMEM_DRIVER_OPS
>> with DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT at [1]?
>>
>> [1] https://elixir.bootlin.com/linux/v6.16-rc2/source/drivers/gpu/drm/vgem/vgem_drv.c#L118
> Thanks for the heads up! So I applied commit 660cd44659a0
> ("drm/shmem-helper: Import dmabuf without mapping its sg_table") [*] in
> my local tree, together with your suggestion:
>
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c
> b/drivers/gpu/drm/vgem/vgem_drv.c
> index 2752ab4f1c97..ba0d4e611bd2 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -115,7 +115,7 @@ static const struct drm_driver vgem_driver = {
>   	.num_ioctls 			= ARRAY_SIZE(vgem_ioctls),
>   	.fops				= &vgem_driver_fops,
>
> -	DRM_GEM_SHMEM_DRIVER_OPS,
> +	DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT,
>   	.gem_create_object		= vgem_gem_create_object,
>
>   	.name	= DRIVER_NAME,
>
> The warning message disappeared with that. Thanks again!

Thanks for testing. I'll attempt to get this change into upstream in the 
near future.

Best regards
Thomas

>
> [*]
> https://gitlab.freedesktop.org/drm/kernel/-/commit/660cd44659a05c5fbfce6d2bb1ce448aa0f35594
>
> Zenghui

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ