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: <53354e12b55d7c558b4418d876598641d862737f.camel@mailbox.org>
Date: Thu, 04 Dec 2025 15:10:11 +0100
From: Philipp Stanner <phasta@...lbox.org>
To: Philipp Stanner <phasta@...nel.org>, Sumit Semwal
 <sumit.semwal@...aro.org>,  Gustavo Padovan <gustavo@...ovan.org>,
 Christian König <christian.koenig@....com>, Felix
 Kuehling <Felix.Kuehling@....com>, Alex Deucher
 <alexander.deucher@....com>, David Airlie <airlied@...il.com>, Simona
 Vetter <simona@...ll.ch>, Jani Nikula <jani.nikula@...ux.intel.com>, Joonas
 Lahtinen <joonas.lahtinen@...ux.intel.com>,  Rodrigo Vivi
 <rodrigo.vivi@...el.com>, Tvrtko Ursulin <tursulin@...ulin.net>, Huang Rui
 <ray.huang@....com>,  Matthew Auld <matthew.auld@...el.com>, Matthew Brost
 <matthew.brost@...el.com>, Maarten Lankhorst
 <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
 Thomas Zimmermann <tzimmermann@...e.de>, Lucas De Marchi
 <lucas.demarchi@...el.com>, Thomas Hellström
 <thomas.hellstrom@...ux.intel.com>
Cc: linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, amd-gfx@...ts.freedesktop.org, 
	intel-gfx@...ts.freedesktop.org, intel-xe@...ts.freedesktop.org
Subject: Re: [PATCH 0/6] dma-fence: Remove return code of dma_fence_signal()
 et al.

On Mon, 2025-12-01 at 11:50 +0100, Philipp Stanner wrote:
> Tested this with dma_buf selftests and drm_sched tests.
> 
> Changes in v2:
>   - Fix bug and don't turn the kernel into a smoking pile of ashes by
>     not setting the signaled-bit…
>   - Add functions (dma_fence_check_and_signal()) preserving the old
>     behavior of dma_fence_signal() & Co. (Felix)
>   - Use those new functions in amdkfd, xe, ttm and st-dma-fence.
>   - Be a bit less aggressive and keep the git-diff smaller.
>   - Add a patch using the flag-helper in Xe. (Matthew)
> 
> Barely anyone uses dma_fence_signal()'s (and similar functions') return
> code. Checking it is pretty much useless anyways, because what are you
> going to do if a fence was already signal it? Unsignal it and signal it
> again? ;p
> 
> Removing the return code simplifies the API and makes it easier for me
> to sit on top with Rust DmaFence.
> 
> Philipp Stanner (8):
>   dma-buf/dma-fence: Add dma_fence_test_signaled_flag()
>   dma-buf/dma-fence: Add dma_fence_check_and_signal()
>   amd/amdkfd: Use dma_fence_check_and_signal()
>   drm/xe: Use dma_fence_check_and_signal_locked()
>   dma-buf: Don't misuse dma_fence_signal()
>   drm/ttm: Use dma_fence_check_and_signal()
>   dma-buf/dma-fence: Remove return code of signaling-functions

Applied those 7 patches to drm-misc-next. Had to do a tiny rebase
because 033559473dd3b55558b535aa37b8848c207b5cbb is not yet in drm-
misc-next (dma-fence series was based on master at first, which
contains that commit).

>   drm/xe: Use dma_fence_test_signaled_flag()

Left for Matthow to pick up whenever he wishes.


P.

> 
>  drivers/dma-buf/dma-fence.c                   | 100 +++++++++++-------
>  drivers/dma-buf/st-dma-fence.c                |   4 +-
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   6 +-
>  .../gpu/drm/ttm/tests/ttm_bo_validate_test.c  |   2 +-
>  drivers/gpu/drm/xe/xe_exec_queue.c            |   9 +-
>  drivers/gpu/drm/xe/xe_hw_fence.c              |   4 +-
>  drivers/gpu/drm/xe/xe_pt.c                    |   3 +-
>  drivers/gpu/drm/xe/xe_sched_job.c             |   2 +-
>  include/linux/dma-fence.h                     |  35 ++++--
>  9 files changed, 102 insertions(+), 63 deletions(-)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ