netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/4] netfilter: xtables: improve jumpstack handling
@ 2015-07-08 21:15 Florian Westphal
  2015-07-08 21:15 ` [PATCH -next 1/4] xtables: compute exact size needed for jumpstack Florian Westphal
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Florian Westphal @ 2015-07-08 21:15 UTC (permalink / raw)
  To: netfilter-devel; +Cc: eric.dumazet

During NFWS 2015 Eric Dumazet suggested various ideas to make
the xtables table traversers function setup less expensive.

In particular, the *_do_table functions keep track of the current
stack pointer.

It appears that we can simplify this to always start from 0
(therefore allowing us to avoid the save/restore) provided we make sure
that we use an alternate jump stack when we enter the traverser recursively
via TEE target.

This implements a few of Erics suggestions.

NOTE1: The last patch is only RFC material, see the patch description.

Its the clasic question wheter we're willing to reject bizarre ruleset
or not.  If this patch is acceptable, we can avoid one more dereference
by using percpu allocation for the jumpstack.

Florian Westphal (4):
      xtables: compute exact size needed for jumpstack
      netfilter: move tee_active to core
      netfilter: xtables: don't save/restore jumpstack offset
      netfilter: xtables: add upper limit on call chain depth

 include/linux/netfilter.h          |   11 ++++++
 include/linux/netfilter/x_tables.h |    1 
 net/ipv4/netfilter/arp_tables.c    |   31 +++++++++--------
 net/ipv4/netfilter/ip_tables.c     |   65 +++++++++++++++++++++----------------
 net/ipv6/netfilter/ip6_tables.c    |   49 ++++++++++++++++-----------
 net/netfilter/core.c               |    3 +
 net/netfilter/x_tables.c           |   30 ++++++++++-------
 net/netfilter/xt_TEE.c             |   13 +++----
 8 files changed, 122 insertions(+), 81 deletions(-)

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

end of thread, other threads:[~2015-07-09  9:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-08 21:15 [PATCH -next 0/4] netfilter: xtables: improve jumpstack handling Florian Westphal
2015-07-08 21:15 ` [PATCH -next 1/4] xtables: compute exact size needed for jumpstack Florian Westphal
2015-07-08 21:15 ` [PATCH -next 2/4] netfilter: move tee_active to core Florian Westphal
2015-07-08 21:15 ` [PATCH -next 3/4] netfilter: xtables: don't save/restore jumpstack offset Florian Westphal
2015-07-08 21:47   ` Jan Engelhardt
2015-07-09  0:29     ` Florian Westphal
2015-07-09  8:16       ` Jan Engelhardt
2015-07-09  7:54   ` Eric Dumazet
2015-07-09  9:14     ` Florian Westphal
2015-07-08 21:15 ` [PATCH RFC -next 4/4] netfilter: xtables: add upper limit on call chain depth Florian Westphal

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).