27 Mar, 2009

1 commit

  • A number of standard posix types are used in exported headers, which
    is not allowed if __STRICT_KERNEL_NAMES is defined. In order to
    get rid of the non-__STRICT_KERNEL_NAMES part and to make sane headers
    the default, we have to change them all to safe types.

    There are also still some leftovers in reiserfs_fs.h, elfcore.h
    and coda.h, but these files have not compiled in user space for
    a long time.

    This leaves out the various integer types ({u_,u,}int{8,16,32,64}_t),
    which we take care of separately.

    Signed-off-by: Arnd Bergmann
    Acked-by: Mauro Carvalho Chehab
    Cc: David Airlie
    Cc: Arnaldo Carvalho de Melo
    Cc: YOSHIFUJI Hideaki
    Cc: netdev@vger.kernel.org
    Cc: linux-ppp@vger.kernel.org
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: David Woodhouse
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar

    Arnd Bergmann
     

20 Nov, 2008

1 commit


08 Oct, 2008

1 commit


22 May, 2008

1 commit

  • Greg Steuck points out that some of the netfilter
    headers can't be used in userspace without including linux/types.h
    first. The headers include their own linux/types.h include statements,
    these are stripped by make headers-install because they are inside
    #ifdef __KERNEL__ however. Move them out to fix this.

    Reported and Tested by Greg Steuck.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

01 Feb, 2008

1 commit

  • Typical table module registers xt_table structure (i.e. packet_filter)
    and link it to list during it. We can't use one template for it because
    corresponding list_head will become corrupted. We also can't unregister
    with template because it wasn't changed at all and thus doesn't know in
    which list it is.

    So, we duplicate template at the very first step of table registration.
    Table modules will save it for use during unregistration time and actual
    filtering.

    Do it at once to not screw bisection.

    P.S.: renaming i.e. packet_filter => __packet_filter is temporary until
    full netnsization of table modules is done.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

29 Jan, 2008

6 commits


07 Nov, 2007

1 commit


16 Oct, 2007

1 commit


18 Jul, 2007

1 commit


11 Jul, 2007

1 commit


08 Jun, 2007

1 commit

  • check_compat_entry_size_and_hooks iterates over the matches and calls
    compat_check_calc_match, which loads the match and calculates the
    compat offsets, but unlike the non-compat version, doesn't call
    ->checkentry yet. On error however it calls cleanup_matches, which in
    turn calls ->destroy, which can result in crashes if the destroy
    function (validly) expects to only get called after the checkentry
    function.

    Add a compat_release_match function that only drops the module reference
    on error and rename compat_check_calc_match to compat_find_calc_match to
    reflect the fact that it doesn't call the checkentry function.

    Reported by Jan Engelhardt

    Signed-off-by: Dmitry Mishin
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Dmitry Mishin
     

11 May, 2007

1 commit


26 Apr, 2007

1 commit


06 Mar, 2007

1 commit

  • Fix {nf,ip}_ct_iterate_cleanup unconfirmed list handling:

    - unconfirmed entries can not be killed manually, they are removed on
    confirmation or final destruction of the conntrack entry, which means
    we might iterate forever without making forward progress.

    This can happen in combination with the conntrack event cache, which
    holds a reference to the conntrack entry, which is only released when
    the packet makes it all the way through the stack or a different
    packet is handled.

    - taking references to an unconfirmed entry and using it outside the
    locked section doesn't work, the list entries are not refcounted and
    another CPU might already be waiting to destroy the entry

    What the code really wants to do is make sure the references of the hash
    table to the selected conntrack entries are released, so they will be
    destroyed once all references from skbs and the event cache are dropped.

    Since unconfirmed entries haven't even entered the hash yet, simply mark
    them as dying and skip confirmation based on that.

    Reported and tested by Chuck Ebbert

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

13 Feb, 2007

1 commit

  • CONNTRACK_STAT_INC assumes rcu_read_lock in nf_hook_slow disables
    preemption as well, making it legal to use __get_cpu_var without
    disabling preemption manually. The assumption is not correct anymore
    with preemptable RCU, additionally we need to protect against softirqs
    when not holding ip_conntrack_lock.

    Add CONNTRACK_STAT_INC_ATOMIC macro, which disables local softirqs,
    and use where necessary.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

09 Feb, 2007

5 commits


24 Jan, 2007

1 commit

  • With the introduction of x_tables we accidentally broke compatibility
    by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
    XT_TABLE_MAXNAMELEN, which is two bytes larger.

    On most architectures it doesn't really matter since we don't have
    any tables with names that long in the kernel and the structure
    layout didn't change because of alignment requirements of following
    members. On CRIS however (and other architectures that don't align
    data) this changed the structure layout and thus broke compatibility
    with old iptables binaries.

    Changing it back will break compatibility with binaries compiled
    against recent kernels again, but since the breakage has only been
    there for three releases this seems like the better choice.

    Spotted by Jonas Berlin .

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

04 Dec, 2006

1 commit


03 Dec, 2006

10 commits


16 Nov, 2006

1 commit

  • 66 and 67 for getsockopt on IPv6 socket is doubly used for IPv6 Advanced
    API and ip6tables. This moves numbers for ip6tables to 68 and 69.
    This also kills XT_SO_* because {ip,ip6,arp}_tables doesn't have so much
    common numbers now.

    The old userland tools keep to behave as ever, because old kernel always
    calls functions of IPv6 Advanced API for their numbers.

    Signed-off-by: Yasuyuki Kozakai
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Yasuyuki Kozakai
     

29 Sep, 2006

2 commits