netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4] netfilter: ebtables: CONFIG_COMPAT support
@ 2010-02-16 16:39 Florian Westphal
  2010-02-16 16:39 ` [PATCH 1/7] netfilter: ebtables: split do_replace into two functions Florian Westphal
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Florian Westphal @ 2010-02-16 16:39 UTC (permalink / raw)
  To: netfilter-devel

Version 4 of the ebtables CONFIG_COMPAT patch set.

Changes since v3:
- reformat to get rid of overly long lines.

One long line remains (a BUG_ON() ), fixing this would make this much
more ugly, so I'd rather remove the BUG_ON if that one line is still a
problem.

Changes since v2:
- remove last use of MEMPRINT macro
- remove BUGPRINT line instead of adding compat argument to copy_counters_to_user

First patches are preparation patches to reduce copy & paste in later
patches.  Patch 4 is the main CONFIG_COMPAT hunk, next ones
handles those ebtables binaries specifically built for 64 bit kernel
(i.e. pad in userspace).
Last two patches add CONFIG_COMPAT support to the targets/matches that
need special handling (maybe I missed some, though).

Tested on x86_64 with x86 userland by comparing output of 32 and 64 bit ebtables binaries.

Changes since v1 were:
- also move handling of ebt counter set/getsockopt handling to helper functions to avoid
copy & pasting the same code in the COMPAT handlers.
- add missing length check to compat_do_ebt_get_ctl().
- add a patch to handle "userspace-side-padding" in some ebtables 32bit userspace binaries.
- add "const *" qualifiers to the compat_from/to user functions.

The following changes since commit 3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7:
  Florian Westphal (1):
        netfilter: CONFIG_COMPAT: allow delta to exceed 32767

are available in the git repository at:

  git://git.breakpoint.cc/fw/nf-next-2.6.git ebt_config_compat_v4

Florian Westphal (7):
      netfilter: ebtables: split do_replace into two functions
      netfilter: ebtables: split copy_everything_to_user into two functions
      netfilter: ebtables: split update_counters into two functions
      netfilter: ebtables: add CONFIG_COMPAT support
      netfilter: ebtables: try native set/getsockopt handlers, too
      netfilter: ebt_limit: add CONFIG_COMPAT support
      netfilter: ebtables: mark: add CONFIG_COMPAT support

 net/bridge/netfilter/ebt_limit.c  |   16 +
 net/bridge/netfilter/ebt_mark.c   |   31 +
 net/bridge/netfilter/ebt_mark_m.c |   37 ++
 net/bridge/netfilter/ebtables.c   | 1159 +++++++++++++++++++++++++++++++++----
 4 files changed, 1124 insertions(+), 119 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Patch v3] netfilter: ebtables: CONFIG_COMPAT support
@ 2010-02-15 21:05 Florian Westphal
  2010-02-15 21:05 ` [PATCH 7/7] netfilter: ebtables: mark: add " Florian Westphal
  0 siblings, 1 reply; 12+ messages in thread
From: Florian Westphal @ 2010-02-15 21:05 UTC (permalink / raw)
  To: netfilter-devel

This is v3 of ebtables CONFIG_COMPAT patch set.
Only changes since v2 are those pointed out by Bart:
- remove MEMPRINT macro
- remove BUGPRINT line instead of adding compat argument to
  copy_counters_to_user().

Also, I rebased things on top of nf-next master.

The following changes since commit 3e5e524ffb5fcf2447eb5dd9f8e54ad22dd9baa7:
  Florian Westphal (1):
        netfilter: CONFIG_COMPAT: allow delta to exceed 32767

are available in the git repository at:

  git://git.breakpoint.cc/fw/nf-next-2.6.git ebt_config_compat_v3

Florian Westphal (7):
      netfilter: ebtables: split do_replace into two functions
      netfilter: ebtables: split copy_everything_to_user into two functions
      netfilter: ebtables: split update_counters into two functions
      netfilter: ebtables: add CONFIG_COMPAT support
      netfilter: ebtables: try native set/getsockopt handlers, too
      netfilter: ebt_limit: add CONFIG_COMPAT support
      netfilter: ebtables: mark: add CONFIG_COMPAT support

 net/bridge/netfilter/ebt_limit.c  |   16 +
 net/bridge/netfilter/ebt_mark.c   |   31 +
 net/bridge/netfilter/ebt_mark_m.c |   37 ++
 net/bridge/netfilter/ebtables.c   | 1118 +++++++++++++++++++++++++++++++++----
 4 files changed, 1083 insertions(+), 119 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH 0/7] netfilter: ebtables: CONFIG_COMPAT support
@ 2010-02-05  1:43 Florian Westphal
  2010-02-05  1:43 ` [PATCH 7/7] netfilter: ebtables: mark: add " Florian Westphal
  0 siblings, 1 reply; 12+ messages in thread
From: Florian Westphal @ 2010-02-05  1:43 UTC (permalink / raw)
  To: netfilter-devel

Hello netfilter team,

following patch series adds CONFIG_COMPAT
support to ebtables (unfortunately tested on x86_64 only).

First patches are minor bug fixes/preparation patches,
patch 5 is the main CONFIG_COMPAT hunk, 6 and 7 add CONFIG_COMPAT
support to the targets/matches that need special handling (maybe
I missed some, though).

 include/linux/netfilter/x_tables.h  |    2 +-
 net/bridge/netfilter/ebt_802_3.c    |    2 +-
 net/bridge/netfilter/ebt_arp.c      |    2 +-
 net/bridge/netfilter/ebt_arpreply.c |    2 +-
 net/bridge/netfilter/ebt_dnat.c     |    2 +-
 net/bridge/netfilter/ebt_ip.c       |    2 +-
 net/bridge/netfilter/ebt_ip6.c      |    2 +-
 net/bridge/netfilter/ebt_limit.c    |   18 +-
 net/bridge/netfilter/ebt_log.c      |    2 +-
 net/bridge/netfilter/ebt_mark.c     |   33 +-
 net/bridge/netfilter/ebt_mark_m.c   |   39 ++-
 net/bridge/netfilter/ebt_nflog.c    |    2 +-
 net/bridge/netfilter/ebt_pkttype.c  |    2 +-
 net/bridge/netfilter/ebt_redirect.c |    2 +-
 net/bridge/netfilter/ebt_snat.c     |    2 +-
 net/bridge/netfilter/ebt_stp.c      |    2 +-
 net/bridge/netfilter/ebt_ulog.c     |    2 +-
 net/bridge/netfilter/ebt_vlan.c     |    2 +-
 net/bridge/netfilter/ebtables.c     | 1064 ++++++++++++++++++++++++++++++++---
 net/netfilter/x_tables.c            |    6 +-

Florian Westphal (7):
      netfilter: ebtables: abort if next_offset is too small
      netfilter: ebtables: avoid explicit XT_ALIGN() in match/targets
      netfilter: CONFIG_COMPAT: allow delta to exceed 32767
      netfilter: ebtables: split do_replace into two functions
      netfilter: ebtables: add CONFIG_COMPAT support
      netfilter: ebt_limit: add CONFIG_COMPAT support
      netfilter: ebtables: mark: add CONFIG_COMPAT support

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

end of thread, other threads:[~2010-02-18 11:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 16:39 [PATCH v4] netfilter: ebtables: CONFIG_COMPAT support Florian Westphal
2010-02-16 16:39 ` [PATCH 1/7] netfilter: ebtables: split do_replace into two functions Florian Westphal
2010-02-16 16:39 ` [PATCH 2/7] netfilter: ebtables: split copy_everything_to_user " Florian Westphal
2010-02-16 16:39 ` [PATCH 3/7] netfilter: ebtables: split update_counters " Florian Westphal
2010-02-16 16:39 ` [PATCH 4/7] netfilter: ebtables: add CONFIG_COMPAT support Florian Westphal
2010-02-16 16:39 ` [PATCH 5/7] netfilter: ebtables: try native set/getsockopt handlers, too Florian Westphal
2010-02-16 16:39 ` [PATCH 6/7] netfilter: ebt_limit: add CONFIG_COMPAT support Florian Westphal
2010-02-16 16:39 ` [PATCH 7/7] netfilter: ebtables: mark: " Florian Westphal
2010-02-16 17:10 ` [PATCH v4] netfilter: ebtables: " Patrick McHardy
2010-02-18 11:10 ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2010-02-15 21:05 [Patch v3] " Florian Westphal
2010-02-15 21:05 ` [PATCH 7/7] netfilter: ebtables: mark: add " Florian Westphal
2010-02-05  1:43 [PATCH 0/7] netfilter: ebtables: " Florian Westphal
2010-02-05  1:43 ` [PATCH 7/7] netfilter: ebtables: mark: add " 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).