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]
Date:   Fri, 11 Mar 2022 10:06:11 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Leon Romanovsky <leonro@...dia.com>
Cc:     <idosch@...dia.com>, <petrm@...dia.com>,
        <simon.horman@...igine.com>, <netdev@...r.kernel.org>,
        <jiri@...nulli.us>
Subject: Re: [RFT net-next 1/6] devlink: expose instance locking and add
 locked port registering

On Fri, 11 Mar 2022 19:49:36 +0200 Leon Romanovsky wrote:
> > No, no, that function is mostly for rcu dereference checking.
> > The calls should be eliminated as dead code on production systems.  
> 
> On systems without LOCKDEP, the devl_lock_is_held function will be
> generated to be like this:
> bool devl_lock_is_held(struct devlink *devlink)
> {
> 	return WARN_ON_ONCE(true);
> }
> EXPORT_SYMBOL_GPL(devl_lock_is_held);

I think you missed my first sentence. Anyway, this is what I'll do in
v1:

#ifdef CONFIG_LOCKDEP
/* For use in conjunction with LOCKDEP only e.g. rcu_dereference_protected() */
bool devl_lock_is_held(struct devlink *devlink)
{
	return lockdep_is_held(&devlink->lock);
}
EXPORT_SYMBOL_GPL(devl_lock_is_held);
#endif

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ