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: <Zqlu8gq2d8mtn7rC@DUT025-TGLU.fm.intel.com>
Date: Tue, 30 Jul 2024 22:53:38 +0000
From: Matthew Brost <matthew.brost@...el.com>
To: Tejun Heo <tj@...nel.org>
CC: <intel-xe@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
	<linux-kernel@...r.kernel.org>, <jiangshanlai@...il.com>,
	<christian.koenig@....com>, <ltuikov89@...il.com>, <daniel@...ll.ch>
Subject: Re: [RFC PATCH 1/3] workqueue: Add interface for user-defined
 workqueue lockdep map

On Tue, Jul 30, 2024 at 12:34:08PM -1000, Tejun Heo wrote:
> Hello, Matthew.
> 
> On Tue, Jul 30, 2024 at 03:17:40PM -0700, Matthew Brost wrote:
> > +/**
> > + * wq_init_user_lockdep_map - init user lockdep map for workqueue
> > + * @wq: workqueue to init lockdep map for
> > + * @lockdep_map: lockdep map to use for workqueue
> > + *
> > + * Initialize workqueue with a user defined lockdep map. WQ_USER_OWNED_LOCKDEP
> > + * must be set for workqueue.
> > + */
> > +void wq_init_user_lockdep_map(struct workqueue_struct *wq,
> > +			      struct lockdep_map *lockdep_map)
> > +{
> > +	if (WARN_ON_ONCE(!(wq->flags & WQ_USER_OWNED_LOCKDEP)))
> > +		return;
> > +
> > +	wq->lockdep_map = lockdep_map;
> > +}
> > +EXPORT_SYMBOL_GPL(wq_init_user_lockdep_map);
> 
> Would it be possible to make it a one-piece interface - ie. add
> alloc_workqueue_lockdep_map() which takes an external lockdep map rather
> than splitting it over two calls?
> 

I didn't want to change the export alloc_workqueue() arguments so I went
with this approach. Are you suggesting export a new function
alloc_workqueue_lockdep_map() which will share an internal
implementation with the existing alloc_workqueue() but passes in a
lockdep map? That could work.

Matt

> Thanks.
> 
> -- 
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ