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: <CALnjE+pg1ecFjisxnHyrMsBCyZ6daF=wCH+FxEc8XtCqAwyo6g@mail.gmail.com>
Date:	Mon, 22 Apr 2013 16:49:05 -0700
From:	Pravin Shelar <pshelar@...ira.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, dev@...nvswitch.org, jesse@...ira.com
Subject: Re: [PATCH net-next v2 1/2] genl: Allow concurrent genl callbacks.

On Mon, Apr 22, 2013 at 3:55 PM, David Miller <davem@...emloft.net> wrote:
> From: Pravin Shelar <pshelar@...ira.com>
> Date: Mon, 22 Apr 2013 13:41:41 -0700
>
>> Therefore scatchpad in SKB is protected and parallel netlink dump operations
>> can go only on different netlink sockets.
>
> What about configuration changes running in parallel with the dump?
>
> You must synchronize with those too, otherwise protecting the
> intra-dump state is meaningless since the underlying objects
> can change underneath the dump.

That is synchronized using rw-sem.
This is how locking looks like:

genl_dump() (if lockless = true)
  SEM_READ_LOCK()
  Per_sock_mutex()
  -->netlink_dump()
  Per_sock_unmutex()
  SEM_READ_UNLOCK()
---

genl_conf_changes:
  SEM_WRITE_LOCK()
  GENL_LOCK()
     conf_changes()
  GENL_UNLOCK()
  SEM_WRITE_UNLOCK()
---

Now I think I shld call this parallel operations rather than lockless
operations, since I do take read lock for entire genl-ops
.
Let me send updated patch.
--
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