netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nftables 0/4] more transaction updates
@ 2014-05-29  9:48 Pablo Neira Ayuso
  2014-05-29  9:48 ` [PATCH nftables 1/4] netfilter: nf_tables: release objects in reverse order in the abort path Pablo Neira Ayuso
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Pablo Neira Ayuso @ 2014-05-29  9:48 UTC (permalink / raw)
  To: netfilter-devel; +Cc: kaber

Hi,

This patchset contains updates for the new transaction infrastructure,
they are:

* Make sure that this releases objects in reverse order in the abort path
  to avoid possible use after free. No need the reverse iteration this in
  the commit path since they already come in the right order according
  to object dependencies.

* Introduce locking to the rbtree that is used for interval sets.

* Allow to delete several objects using a batch, this updates the use
  counter semantics applying the following rules:

  1) If you add/delete a chain, it increments/decrements the table use counter.
  2) If you add/delete a rule, it increments/decrements the chain use counter.
  3) If you add/delete a set, it increments/decrements the table use counter.
  4) If you bind an anonymous set to a rule, it decrements the table use
     counter. This avoids an -EBUSY error since bound anonymous sets are
     released quite late in the commit/abort path, from the rcu callback. This
     should be safe since the rule updated the chain use counter, so it is not
     possible to remove a table with bound anonymous sets. This rules does not
     apply to unbound anonymous sets.

* Use atomic memory allocations in the anonymous set notification path from
  the rcu callback.

Pablo Neira Ayuso (4):
  netfilter: nf_tables: release objects in reverse order in the abort path
  netfilter: nf_rbtree: introduce locking
  netfilter: nf_tables: allow to delete several objects from a batch
  netfilter: nf_tables: atomic allocation in set notifications from rcu callback

 net/netfilter/nf_tables_api.c |   55 +++++++++++++++++++++++++++++------------
 net/netfilter/nft_rbtree.c    |   22 ++++++++++++++++-
 2 files changed, 60 insertions(+), 17 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-29 17:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-29  9:48 [PATCH nftables 0/4] more transaction updates Pablo Neira Ayuso
2014-05-29  9:48 ` [PATCH nftables 1/4] netfilter: nf_tables: release objects in reverse order in the abort path Pablo Neira Ayuso
2014-05-29  9:48 ` [PATCH nftables 2/4] netfilter: nf_rbtree: introduce locking Pablo Neira Ayuso
2014-05-29  9:48 ` [PATCH nftables 3/4] netfilter: nf_tables: allow to delete several objects from a batch Pablo Neira Ayuso
2014-05-29  9:48 ` [PATCH nftables 4/4] netfilter: nf_tables: atomic allocation in set notifications from rcu callback Pablo Neira Ayuso
2014-05-29 17:41   ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).