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, 15 Jun 2007 17:22:43 +0100
From:	Kieran Mansley <kmansley@...arflare.com>
To:	Zhu Han <schumi.han@...il.com>
Cc:	xen-devel@...ts.xensource.com, netdev@...r.kernel.org,
	herbert@...dor.apana.org.au
Subject: Re: [Xen-devel] [PATCH 4/4] [Net] Support accelerated network
	plugin modules

On Fri, 2007-06-15 at 11:59 -0400, Zhu Han wrote:
> Hi, Kieran,
> 
> I'm just wonder why you try to acquire the lock and increase the
> hooks_usecount each time when you use the hook routine. Is there any
> generic ways to synchronze the code path using hook routines and
> netfront_accelerator_unloaded, considering you can synchronize the
> tx/rx data path easily.

The lock protects the use_count variable.  The use_count variable
prevents the plugin module unloading while it is being used.  I couldn't
just use the lock to prevent the module unloading as the hook function
(i) might block (and holding a spin_lock would be rather antisocial)
(ii) might call back into netfront and try to take the lock again, which
would deadlock.

The data path hooks do not block, and are already protected by locks, so
these are also taken when trying to unload the plugin module.  For this
reason it's not necessary to use the hooks_usecount on the data path.

I think that RCU would only work in this situation if the hook functions
didn't block, and wouldn't affect the data path locking overhead as it
wouldn't be necessary there.  

Kieran





-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ