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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLggJViOUQGB-oK764PdL37LioFWt3gNpYijq_Q8Cmi8mjw@mail.gmail.com>
Date: Thu, 28 Aug 2025 11:38:57 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Danilo Krummrich <dakr@...nel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	Boris Brezillon <boris.brezillon@...labora.com>, 
	Daniel Almeida <daniel.almeida@...labora.com>, Steven Price <steven.price@....com>, 
	Liviu Dudau <liviu.dudau@....com>, Rob Clark <robin.clark@....qualcomm.com>, 
	Rob Herring <robh@...nel.org>, Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, 
	Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, dri-devel@...ts.freedesktop.org, 
	linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v3 3/3] gpuvm: remove gem.gpuva.lock_dep_map

On Thu, Aug 28, 2025 at 11:27 AM Danilo Krummrich <dakr@...nel.org> wrote:
>
> On Wed Aug 27, 2025 at 3:38 PM CEST, Alice Ryhl wrote:
> >  #ifdef CONFIG_LOCKDEP
> > -/**
> > - * drm_gem_gpuva_set_lock() - Set the lock protecting accesses to the gpuva list.
> > - * @obj: the &drm_gem_object
> > - * @lock: the lock used to protect the gpuva list. The locking primitive
> > - * must contain a dep_map field.
> > - *
> > - * Call this if you're not proctecting access to the gpuva list with the
> > - * dma-resv lock, but with a custom lock.
> > - */
> > -#define drm_gem_gpuva_set_lock(obj, lock) \
> > -     if (!WARN((obj)->gpuva.lock_dep_map, \
> > -               "GEM GPUVA lock should be set only once.")) \
> > -             (obj)->gpuva.lock_dep_map = &(lock)->dep_map
> > -#define drm_gem_gpuva_assert_lock_held(obj) \
> > -     lockdep_assert((obj)->gpuva.lock_dep_map ? \
> > -                    lock_is_held((obj)->gpuva.lock_dep_map) : \
> > +#define drm_gem_gpuva_assert_lock_held(gpuvm, obj) \
> > +     lockdep_assert(drm_gpuvm_immediate_mode(gpuvm) ? \
> > +                    lock_is_held(&(obj)->gpuva.lock.dep_map) : \
>
> NIT: I think this can just be:
>
>         lockdep_is_held(&(obj)->gpuva.lock)
>
> If you want I can fix it up on apply.

IF that works, then sure.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ