01 Nov, 2011

1 commit


24 May, 2011

1 commit

  • The %pK format specifier is designed to hide exposed kernel pointers,
    specifically via /proc interfaces. Exposing these pointers provides an
    easy target for kernel write vulnerabilities, since they reveal the
    locations of writable structures containing easily triggerable function
    pointers. The behavior of %pK depends on the kptr_restrict sysctl.

    If kptr_restrict is set to 0, no deviation from the standard %p behavior
    occurs. If kptr_restrict is set to 1, the default, if the current user
    (intended to be a reader via seq_printf(), etc.) does not have CAP_SYSLOG
    (currently in the LSM tree), kernel pointers using %pK are printed as 0's.
    If kptr_restrict is set to 2, kernel pointers using %pK are printed as
    0's regardless of privileges. Replacing with 0's was chosen over the
    default "(null)", which cannot be parsed by userland %p, which expects
    "(nil)".

    The supporting code for kptr_restrict and %pK are currently in the -mm
    tree. This patch converts users of %p in net/ to %pK. Cases of printing
    pointers to the syslog are not covered, since this would eliminate useful
    information for postmortem debugging and the reading of the syslog is
    already optionally protected by the dmesg_restrict sysctl.

    Signed-off-by: Dan Rosenberg
    Cc: James Morris
    Cc: Eric Dumazet
    Cc: Thomas Graf
    Cc: Eugene Teo
    Cc: Kees Cook
    Cc: Ingo Molnar
    Cc: David S. Miller
    Cc: Peter Zijlstra
    Cc: Eric Paris
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Dan Rosenberg
     

18 May, 2010

1 commit

  • This patch removes from net/ (but not any netfilter files)
    all the unnecessary return; statements that precede the
    last closing brace of void functions.

    It does not remove the returns that are immediately
    preceded by a label as gcc doesn't like that.

    Done via:
    $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
    xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

17 Feb, 2010

1 commit

  • Add __percpu sparse annotations to net.

    These annotations are to make sparse consider percpu variables to be
    in a different address space and warn if accessed without going
    through percpu accessors. This patch doesn't affect normal builds.

    The macro and type tricks around snmp stats make things a bit
    interesting. DEFINE/DECLARE_SNMP_STAT() macros mark the target field
    as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly. All
    snmp_mib_*() users which used to cast the argument to (void **) are
    updated to cast it to (void __percpu **).

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Cc: Patrick McHardy
    Cc: Arnaldo Carvalho de Melo
    Cc: Vlad Yasevich
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Tejun Heo
     

23 Jan, 2010

1 commit


05 Sep, 2009

1 commit


23 Jul, 2008

1 commit

  • Commit 20c2c1fd6c842caf70dcb1d94b9d58861949fd3d
    (sctp: add sctp/remaddr table to complete RFC remote address table OID)
    added an unused sctp_assoc_proc_exit() function that seems to have been
    unintentionally created when copying the assocs code.

    Signed-off-by: Adrian Bunk
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Adrian Bunk
     

10 May, 2008

1 commit

  • Add support for RFC3873 remote address table OID.

    +--(5) sctpAssocRemAddrTable
    | |
    | |--(-) sctpAssocId (shared index)
    | |
    | +--(1) sctpAssocRemAddrType (index)
    . |
    . +--(2) sctpAssocRemAddr (index)
    . |
    +--(3) sctpAssocRemAddrActive
    |
    +--(4) sctpAssocRemAddrHBActive
    |
    +--(5) sctpAssocRemAddrRTO
    |
    +--(6) sctpAssocRemAddrMaxPathRtx
    |
    +--(7) sctpAssocRemAddrRtx
    |
    +--(8) sctpAssocRemAddrStartTime

    This patch places all the requsite data in /proc/net/sctp/remaddr.

    Signed-off-by: Neil Horman
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Neil Horman
     

13 Apr, 2008

2 commits

  • Replacing (almost) all invocations of list_for_each() with
    list_for_each_entry() tightens up the code and allows for the deletion
    of numerous list iterator variables that are no longer necessary.

    Signed-off-by: Robert P. J. Day
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Robert P. J. Day
     
  • Recently I posted a patch to add some informational items to
    /proc/net/sctp/assocs. All the information is correct, but because
    of how the seqfile show operation is laid out, some of the formatting
    is backwards. This patch corrects that formatting, so that the new
    information appears at the end of each line, rather than in the middle.

    Signed-off-by: Neil Horman
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Neil Horman
     

06 Mar, 2008

1 commit


04 Mar, 2008

1 commit


01 Mar, 2008

2 commits


29 Feb, 2008

1 commit


10 Feb, 2008

1 commit


05 Feb, 2008

1 commit

  • I was notified by Randy Stewart that lksctp claims to be
    "the reference implementation". First of all, "the
    refrence implementation" was the original implementation
    of SCTP in usersapce written ty Randy and a few others.
    Second, after looking at the definiton of 'reference implementation',
    we don't really meet the requirements.

    Signed-off-by: Vlad Yasevich

    Vlad Yasevich
     

10 Nov, 2007

1 commit


11 Jul, 2007

1 commit


13 Feb, 2007

1 commit

  • Many struct file_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

11 Feb, 2007

1 commit


03 Dec, 2006

4 commits

  • Users adjusted.

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • instances of ->cmp_addr() are fine with switching both arguments
    to net-endian; callers other than in sctp_cmp_addr_exact() (both
    as ->cmp_addr(...) and direct calls of instances) adjusted;
    sctp_cmp_addr_exact() switched to net-endian itself and adjustment
    is done in its callers

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • No actual modifications of method instances are needed -
    they don't look at port numbers. Switch callers...

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     
  • Part 1: rename sctp_chunk->source, sctp_sockaddr_entry->a,
    sctp_transport->ipaddr and sctp_transport->saddr (to ..._h)

    The next patch will reintroduce these fields and keep them as
    net-endian mirrors of the original (renamed) ones. Split in
    two patches to make sure that we hadn't forgotten any instanes.

    Later in the series we'll eliminate uses of host-endian variants
    (basically switching users to net-endian counterparts as we
    progress through that mess). Then host-endian ones will die.

    Other embedded host-endian sctp_addr will be easier to switch
    directly, so we leave them alone for now.

    Signed-off-by: Al Viro
    Signed-off-by: David S. Miller

    Al Viro
     

12 Oct, 2006

1 commit


23 Sep, 2006

1 commit

  • This patch adds more statistics info under /proc/net/sctp/snmp
    that should be useful for debugging. The additional events that
    are counted now include timer expirations, retransmits, packet
    and data chunk discards.

    The Data chunk discards include all the cases where a data chunk
    is discarded including high tsn, bad stream, dup tsn and the most
    useful one(out of receive buffer/rwnd).

    Also moved the SCTP MIB data structures from the generic include
    directories to include/sctp/sctp.h.

    Signed-off-by: Sridhar Samudrala
    Signed-off-by: David S. Miller

    Sridhar Samudrala
     

11 Apr, 2006

1 commit

  • for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
    in the past where people were using for_each_cpu() where they should have been
    iterating across only online or present CPUs. This is inefficient and
    possibly buggy.

    We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
    future.

    This patch replaces for_each_cpu with for_each_possible_cpu under /net

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

18 Jan, 2006

2 commits

  • This patch corrects the panic by casting the argument to the
    pointer of correct size. On big-endian systems we ended up loading
    only 32 bits of data because we are treating the pointer as an int*.
    By treating this pointer as loff_t*, we'll load the full 64 bits
    and then let regular integer demotion take place which will give us
    the correct value.

    Signed-off-by: Vlad Yaseivch
    Signed-off-by: Sridhar Samudrala

    Vlad Yasevich
     
  • When creating a very large number of associations (and endpoints),
    /proc/assocs and /proc/eps will not show all of them. As a result
    netstat will not show all of the either. This is particularly evident
    when creating 1000+ associations (or endpoints). As an example with
    1500 tcp style associations over loopback, netstat showed 1420 on my
    system instead of 3000.

    The reason for this is that the seq_operations start method is invoked
    multiple times bacause of the amount of data that is provided. The
    start method always increments the position parameter and since we use
    the position as the hash bucket id, we end up skipping hash buckets.

    This patch corrects this situation and get's rid of the silly hash-1
    decrement.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: Sridhar Samudrala

    Vlad Yasevich
     

26 Oct, 2005

1 commit

  • In 'net' change the explicit use of for-loops and NR_CPUS into the
    general for_each_cpu() or for_each_online_cpu() constructs, as
    appropriate. This widens the scope of potential future optimizations
    of the general constructs, as well as takes advantage of the existing
    optimizations of first_cpu() and next_cpu(), which is advantageous
    when the true CPU count is much smaller than NR_CPUS.

    Signed-off-by: John Hawkes
    Signed-off-by: David S. Miller
    Signed-off-by: Arnaldo Carvalho de Melo

    John Hawkes
     

24 Aug, 2005

1 commit


14 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds