From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH nftables 0/4] more transaction updates
Date: Thu, 29 May 2014 11:48:23 +0200 [thread overview]
Message-ID: <1401356907-6840-1-git-send-email-pablo@netfilter.org> (raw)
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
next reply other threads:[~2014-05-29 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 9:48 Pablo Neira Ayuso [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401356907-6840-1-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).