Skip to content
  1. Jul 19, 2008
  2. Jul 16, 2008
  3. Jul 14, 2008
    • Adrian Bunk's avatar
      Linux 2.6.16.61-rc1 · bf05449f
      Adrian Bunk authored
      v2.6.16.61-rc1
      bf05449f
    • 3ware Inc's avatar
      3w-xxxx: Prevent data corruption · 797fbc12
      3ware Inc authored
      Use default DMA data direction to prevent data corruption
      when using SWIOTLB with 4GB+ on EM64T.
      
      http://www.3ware.com/KB/article.aspx?id=15243&cNode=6I1C6S
      
      
      
      Acked-by: default avatarJean Delvare <jdelvare@suse.de>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      797fbc12
    • Al Viro's avatar
      fix SMP ordering hole in fcntl_setlk() (CVE-2008-1669) · 89ebd169
      Al Viro authored
      
      
      fcntl_setlk()/close() race prevention has a subtle hole - we need to
      make sure that if we *do* have an fcntl/close race on SMP box, the
      access to descriptor table and inode->i_flock won't get reordered.
      
      As it is, we get STORE inode->i_flock, LOAD descriptor table entry vs.
      STORE descriptor table entry, LOAD inode->i_flock with not a single
      lock in common on both sides.  We do have BKL around the first STORE,
      but check in locks_remove_posix() is outside of BKL and for a good
      reason - we don't want BKL on common path of close(2).
      
      Solution is to hold ->file_lock around fcheck() in there; that orders
      us wrt removal from descriptor table that preceded locks_remove_posix()
      on close path and we either come first (in which case eviction will be
      handled by the close side) or we'll see the effect of close and do
      eviction ourselves.  Note that even though it's read-only access,
      we do need ->file_lock here - rcu_read_lock() won't be enough to
      order the things.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      89ebd169
    • David S. Miller's avatar
      sit: Add missing kfree_skb() on pskb_may_pull() failure. (CVE-2008-2136) · 873496a3
      David S. Miller authored
      
      
      Noticed by Paul Marks <paul@pmarks.net>.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      873496a3
    • David S. Miller's avatar
      [NETFILTER]: Fix warnings in ip_nat_snmp_basic.c · 952ba4e3
      David S. Miller authored
      
      
      net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'asn1_header_decode':
      net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'len' may be used unini
      net/ipv4/netfilter/ip_nat_snmp_basic.c:248: warning: 'def' may be used unini
      net/ipv4/netfilter/ip_nat_snmp_basic.c: In function 'snmp_translate':
      net/ipv4/netfilter/ip_nat_snmp_basic.c:672: warning: 'l' may be used uniniti
      net/ipv4/netfilter/ip_nat_snmp_basic.c:668: warning: 'type' may be used unin
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      952ba4e3
    • Chris Wright's avatar
      asn1: additional sanity checking during BER decoding (CVE-2008-1673) · ce76a6f4
      Chris Wright authored
      
      
      - Don't trust a length which is greater than the working buffer.
        An invalid length could cause overflow when calculating buffer size
        for decoding oid.
      
      - An oid length of zero is invalid and allows for an off-by-one error when
        decoding oid because the first subid actually encodes first 2 subids.
      
      - A primitive encoding may not have an indefinite length.
      
      Thanks to Wei Wang from McAfee for report.
      
      Acked-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      ce76a6f4
    • Patrick McHardy's avatar
      TCP: Fix shrinking windows with window scaling · b9954f3d
      Patrick McHardy authored
      
      
      Upstream commit: 607bfbf2
      
      When selecting a new window, tcp_select_window() tries not to shrink
      the offered window by using the maximum of the remaining offered window
      size and the newly calculated window size. The newly calculated window
      size is always a multiple of the window scaling factor, the remaining
      window size however might not be since it depends on rcv_wup/rcv_nxt.
      This means we're effectively shrinking the window when scaling it down.
      
      The dump below shows the problem (scaling factor 2^7):
      
      - Window size of 557 (71296) is advertised, up to 3111907257:
      
      IP 172.2.2.3.33000 > 172.2.2.2.33000: . ack 3111835961 win 557 <...>
      
      - New window size of 514 (65792) is advertised, up to 3111907217, 40 bytes
        below the last end:
      
      IP 172.2.2.3.33000 > 172.2.2.2.33000: . 3113575668:3113577116(1448) ack 3111841425 win 514 <...>
      
      The number 40 results from downscaling the remaining window:
      
      3111907257 - 3111841425 = 65832
      65832 / 2^7 = 514
      65832 % 2^7 = 40
      
      If the sender uses up the entire window before it is shrunk, this can have
      chaotic effects on the connection. When sending ACKs, tcp_acceptable_seq()
      will notice that the window has been shrunk since tcp_wnd_end() is before
      tp->snd_nxt, which makes it choose tcp_wnd_end() as sequence number.
      This will fail the receivers checks in tcp_sequence() however since it
      is before it's tp->rcv_wup, making it respond with a dupack.
      
      If both sides are in this condition, this leads to a constant flood of
      ACKs until the connection times out.
      
      Make sure the window is never shrunk by aligning the remaining window to
      the window scaling factor.
      
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      b9954f3d
    • Juergen Beisert's avatar
      x86: Replace NSC/Cyrix specific chipset access macros by inlined functions. · 69731ebb
      Juergen Beisert authored
      
      
      Due to index register access ordering problems, when using macros a line
      like this fails (and does nothing):
      
          setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
      
      With inlined functions this line will work as expected.
      
      Note about a side effect: Seems on Geode GX1 based systems the
      "suspend on halt power saving feature" was never enabled due to this
      wrong macro expansion. With inlined functions it will be enabled, but
      this will stop the TSC when the CPU runs into a HLT instruction.
      Kernel output something like this:
          Clocksource tsc unstable (delta = -472746897 ns)
      
      This is the 3rd version of this patch.
      
       - Adding missed arch/i386/kernel/cpu/mtrr/state.c
          Thanks to Andres Salomon
       - Adding some big fat comments into the new header file
          Suggested by Andi Kleen
      
      AK: fixed x86-64 compilation
      
      Adrian Bunk:
      Added workaround for x86_64 compilation.
      
      Signed-off-by: default avatarJuergen Beisert <juergen@kreuzholzen.de>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      69731ebb
  4. Apr 10, 2008
  5. Mar 19, 2008
  6. Mar 14, 2008
    • Adrian Bunk's avatar
      gcc >= 4.3 is not supported · 4743272d
      Adrian Bunk authored
      
      
      Building kernel 2.6.16 with gcc 4.3 is completely untested, and
      you might run into both kernel and gcc problems (as always with
      new gcc versions).
      
      For making this obvious the kernel build now #error's when trying
      to build with gcc >= 4.3.
      
      The kernel might work fine when compiled with gcc 4.3 and it's
      therefore possible to remove the #error, but if someone really
      longs for regressions he can as well try a more recent kernel
      instead.
      
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      4743272d
  7. Jan 27, 2008
  8. Jan 21, 2008
  9. Jan 20, 2008
    • Eric Dumazet's avatar
      [IPV4] ROUTE: ip_rt_dump() is unecessary slow · d2c758a5
      Eric Dumazet authored
      
      
      [ Upstream commit: d8c92830 ]
      
      I noticed "ip route list cache x.y.z.t" can be *very* slow.
      
      While strace-ing -T it I also noticed that first part of route cache
      is fetched quite fast :
      
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) =
      +3772 <0.000047>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0)
      += 3736 <0.000042>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0)
      += 3740 <0.000055>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0)
      += 3712 <0.000043>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\
      202GXm\0\0\2  \0\376\0\0\1\0\2"..., 16384}], msg_controllen=0, msg_flags=0}, 0)
      += 3732 <0.000053>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) =
      +3708 <0.000052>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202
      GXm\0\0\2  \0\376\0\0\2\0\2\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) =
      +3680 <0.000041>
      
      while the part at the end of the table is more expensive:
      
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3656 <0.003857>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\204\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3772 <0.003891>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3712 <0.003765>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3700 <0.003879>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3676 <0.003797>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"p\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\2\0\2\0"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3724 <0.003856>
      recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000},
      +msg_iov(1)=[{"\234\0\0\0\30\0\2\0\254i\202GXm\0\0\2  \0\376\0\0\1\0\2"...,
      +16384}], msg_controllen=0, msg_flags=0}, 0) = 3736 <0.003848>
      
      The following patch corrects this performance/latency problem,
      removing quadratic behavior.
      
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      d2c758a5
    • Al Viro's avatar
      [NET]: Introduce types for checksums. · 9160766b
      Al Viro authored
      
      
      New types - for 16bit checksums and "unfolded" 32bit variant.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      9160766b
    • David S. Miller's avatar
      [CASSINI]: Set skb->truesize properly on receive packets. · fdd75e9b
      David S. Miller authored
      
      
      [ Upstream commit: d011a231 ]
      
      skb->truesize was not being incremented at all to
      reflect the page based data added to RX SKBs.
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      fdd75e9b
    • Al Viro's avatar
      [CASSINI]: Fix endianness bug. · cffb92d2
      Al Viro authored
      
      
      [ Upstream commit: e5e02540 ]
      
      Here's proposed fix for RX checksum handling in cassini; it affects
      little-endian working with half-duplex gigabit, but obviously needs
      testing on big-endian too.
      
      The problem is, we need to convert checksum to fixed-endian *before*
      correcting for (unstripped) FCS.  On big-endian it won't matter
      (conversion is no-op), on little-endian it will, but only if FCS is
      not stripped by hardware; i.e. in half-duplex gigabit mode when
      ->crc_size is set.
      
      cassini.c part is that fix, cassini.h one consists of trivial
      endianness annotations.  With that applied the sucker is endian-clean,
      according to sparse.
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      cffb92d2
    • Chas Williams's avatar
      [ATM]: [nicstar] delay irq setup until card is configured · 52f6ca5f
      Chas Williams authored
      
      
      [ Upstream commit: 52961955 ]
      
      Adrian Bunk:
      Backported to 2.6.16.
      
      Signed-off-by: default avatarChas Williams <chas@cmf.nrl.navy.mil>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      52f6ca5f
Loading