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: <20250708144437.GBaG0u1c4E6aV5ekTH@fat_crate.local>
Date: Tue, 8 Jul 2025 16:44:37 +0200
From: Borislav Petkov <bp@...en8.de>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: christian.koenig@....com, asrivats@...hat.com,
	maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
	airlied@...il.com, simona@...ll.ch, jean-christophe@...llain.net,
	superm1@...nel.org, satadru@...il.com,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	Bert Karwatzki <spasswolf@....de>,
	Sumit Semwal <sumit.semwal@...aro.org>, linux-media@...r.kernel.org,
	linaro-mm-sig@...ts.linaro.org, stable@...r.kernel.org
Subject: Re: [PATCH v3] drm/framebuffer: Acquire internal references on GEM
 handles

On Mon, Jul 07, 2025 at 03:11:55PM +0200, Thomas Zimmermann wrote:
> Acquire GEM handles in drm_framebuffer_init() and release them in
> the corresponding drm_framebuffer_cleanup(). Ties the handle's
> lifetime to the framebuffer. Not all GEM buffer objects have GEM
> handles. If not set, no refcounting takes place. This is the case
> for some fbdev emulation. This is not a problem as these GEM objects
> do not use dma-bufs and drivers will not release them while fbdev
> emulation is running. Framebuffer flags keep a bit per color plane
> of which the framebuffer holds a GEM handle reference.
> 
> As all drivers use drm_framebuffer_init(), they will now all hold
> dma-buf references as fixed in commit 5307dce878d4 ("drm/gem: Acquire
> references on GEM handles for framebuffers").
> 
> In the GEM framebuffer helpers, restore the original ref counting
> on buffer objects. As the helpers for handle refcounting are now
> no longer called from outside the DRM core, unexport the symbols.
> 
> v3:
> - don't mix internal flags with mode flags (Christian)
> v2:
> - track framebuffer handle refs by flag
> - drop gma500 cleanup (Christian)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
> Fixes: 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers")
> Reported-by: Bert Karwatzki <spasswolf@....de>
> Closes: https://lore.kernel.org/dri-devel/20250703115915.3096-1-spasswolf@web.de/
> Tested-by: Bert Karwatzki <spasswolf@....de>
> Tested-by: Mario Limonciello <superm1@...nel.org>
> Cc: Thomas Zimmermann <tzimmermann@...e.de>
> Cc: Anusha Srivatsa <asrivats@...hat.com>
> Cc: Christian König <christian.koenig@....com>
> Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> Cc: Maxime Ripard <mripard@...nel.org>
> Cc: Sumit Semwal <sumit.semwal@...aro.org>
> Cc: "Christian König" <christian.koenig@....com>
> Cc: linux-media@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linaro-mm-sig@...ts.linaro.org
> Cc: <stable@...r.kernel.org>
> ---
>  drivers/gpu/drm/drm_framebuffer.c            | 31 ++++++++++++++--
>  drivers/gpu/drm/drm_gem.c                    | 38 ++++++++++++--------
>  drivers/gpu/drm/drm_gem_framebuffer_helper.c | 16 ++++-----
>  drivers/gpu/drm/drm_internal.h               |  2 +-
>  include/drm/drm_framebuffer.h                |  7 ++++
>  5 files changed, 68 insertions(+), 26 deletions(-)

Thanks, that fixes it:

Reported-by: Borislav Petkov (AMD) <bp@...en8.de>
Tested-by: Borislav Petkov (AMD) <bp@...en8.de>

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ