1. 18 12月, 2016 3 次提交
    • D
      Merge branch 'inet_csk_get_port-and-soreusport-fixes' · 28055c97
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      inet: Fixes for inet_csk_get_port and soreusport
      
      This patch set fixes a couple of issues I noticed while debugging our
      softlockup issue in inet_csk_get_port.
      
      - Don't allow jump into port scan in inet_csk_get_port if function
        was called with non-zero port number (looking up explicit port
        number).
      - When inet_csk_get_port is called with zero port number (ie. perform
        scan) an reuseport is set on the socket, don't match sockets that
        also have reuseport set. The intent from the user should be
        to get a new port number and then explictly bind other
        sockets to that number using soreuseport.
      
      Tested:
      
      Ran first patch on production workload with no ill effect.
      
      For second patch, ran a little listener application and first
      demonstrated that unbound sockets with soreuseport can indeed
      be bound to unrelated soreuseport sockets.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28055c97
    • T
      inet: Fix get port to handle zero port number with soreuseport set · 0643ee4f
      Tom Herbert 提交于
      A user may call listen with binding an explicit port with the intent
      that the kernel will assign an available port to the socket. In this
      case inet_csk_get_port does a port scan. For such sockets, the user may
      also set soreuseport with the intent a creating more sockets for the
      port that is selected. The problem is that the initial socket being
      opened could inadvertently choose an existing and unreleated port
      number that was already created with soreuseport.
      
      This patch adds a boolean parameter to inet_bind_conflict that indicates
      rather soreuseport is allowed for the check (in addition to
      sk->sk_reuseport). In calls to inet_bind_conflict from inet_csk_get_port
      the argument is set to true if an explicit port is being looked up (snum
      argument is nonzero), and is false if port scan is done.
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0643ee4f
    • T
      inet: Don't go into port scan when looking for specific bind port · 9af7e923
      Tom Herbert 提交于
      inet_csk_get_port is called with port number (snum argument) that may be
      zero or nonzero. If it is zero, then the intent is to find an available
      ephemeral port number to bind to. If snum is non-zero then the caller
      is asking to allocate a specific port number. In the latter case we
      never want to perform the scan in ephemeral port range. It is
      conceivable that this can happen if the "goto again" in "tb_found:"
      is done. This patch adds a check that snum is zero before doing
      the "goto again".
      Signed-off-by: NTom Herbert <tom@herbertland.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9af7e923
  2. 17 12月, 2016 17 次提交
  3. 14 12月, 2016 1 次提交
  4. 13 12月, 2016 7 次提交
  5. 12 12月, 2016 12 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · ce38aa9c
      Linus Torvalds 提交于
      Pull networking updates from David Miller:
      
       1) Platform regulatory domain support for ath10k, from Bartosz
          Markowski.
      
       2) Centralize min/max MTU checking, thus removing tons of duplicated
          code all of the the various drivers. From Jarod Wilson.
      
       3) Support ingress actions in act_mirred, from Shmulik Ladkani.
      
       4) Improve device adjacency tracking, from David Ahern.
      
       5) Add support for LED triggers on PHY link state changes, from Zach
          Brown.
      
       6) Improve UDP socket memory accounting, from Paolo Abeni.
      
       7) Set SK_MEM_QUANTUM to a fixed size of 4096, instead of PAGE_SIZE.
          From Eric Dumazet.
      
       8) Collapse TCP SKBs at retransmit time even if the right side SKB has
          frags. Also from Eric Dumazet.
      
       9) Add IP_RECVFRAGSIZE and IPV6_RECVFRAGSIZE cmsgs, from Willem de
          Bruijn.
      
      10) Support routing by UID, from Lorenzo Colitti.
      
      11) Handle L3 domain binding (ie. VRF) for RAW sockets, from David
          Ahern.
      
      12) tcp_get_info() can run lockless, from Eric Dumazet.
      
      13) 4-tuple UDP hashing in SFC driver, from Edward Cree.
      
      14) Avoid reorders in GRO code, from Eric Dumazet.
      
      15) IPV6 Segment Routing support, from David Lebrun.
      
      16) Support MPLS push and pop for L3 packets in openvswitch, from Jiri
          Benc.
      
      17) Add LRU datastructure support for BPF, Martin KaFai Lau.
      
      18) VF support in liquidio driver, from Raghu Vatsavayi.
      
      19) Multiqueue support in alx driver, from Tobias Regnery.
      
      20) Networking cgroup BPF support, from Daniel Mack.
      
      21) TCP chronograph measurements, from Francis Yan.
      
      22) XDP support for qed driver, from Yuval Mintz.
      
      23) BPF based lwtunnels, from Thomas Graf.
      
      24) Consistent FIB dumping to offloading drivers, from Ido Schimmel.
      
      25) Many optimizations for UDP under high load, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits)
        netfilter: nft_counter: rework atomic dump and reset
        e1000: use disable_hardirq() for e1000_netpoll()
        i40e: don't truncate match_method assignment
        net: ethernet: ti: netcp: add support of cpts
        net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause
        net: l2tp: ppp: change PPPOL2TP_MSG_* => L2TP_MSG_*
        net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_*
        net: l2tp: export debug flags to UAPI
        net: ethernet: stmmac: remove private tx queue lock
        net: ethernet: sxgbe: remove private tx queue lock
        net: bridge: shorten ageing time on topology change
        net: bridge: add helper to set topology change
        net: bridge: add helper to offload ageing time
        net: nicvf: use new api ethtool_{get|set}_link_ksettings
        net: ethernet: ti: cpsw: sync rates for channels in dual emac mode
        net: ethernet: ti: cpsw: re-split res only when speed is changed
        net: ethernet: ti: cpsw: combine budget and weight split and check
        net: ethernet: ti: cpsw: don't start queue twice
        net: ethernet: ti: cpsw: use same macros to get active slave
        net: mvneta: select GENERIC_ALLOCATOR
        ...
      ce38aa9c
    • R
      openrisc: prevent VGA console, fix builds · 7c7808ce
      Randy Dunlap 提交于
      OpenRISC does not support VGA console, so prevent that kconfig symbol
      from being enabled for OpenRISC, thus fixing these build errors:
      
         drivers/built-in.o: In function `vgacon_save_screen':
         vgacon.c:(.text+0x20e0): undefined reference to `screen_info'
         vgacon.c:(.text+0x20e8): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_init':
         vgacon.c:(.text+0x284c): undefined reference to `screen_info'
         vgacon.c:(.text+0x2850): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_startup':
         vgacon.c:(.text+0x28d8): undefined reference to `screen_info'
         drivers/built-in.o:vgacon.c:(.text+0x28f0): more undefined references to `screen_info' follow
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      7c7808ce
    • S
      openrisc: include l.swa in check for write data pagefault · cdb75442
      Stefan Kristiansson 提交于
      During page fault handling we check the last instruction to understand
      if the fault was for a read or for a write.  By default we fall back to
      read.  New instructions were added to the openrisc 1.1 spec for an
      atomic load/store pair (l.lwa/l.swa).
      
      This patch adds the opcode for l.swa (0x33) allowing it to be treated as
      a write operation.
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      [shorne@gmail.com: expanded a bit on the comment]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      cdb75442
    • S
      openrisc: Updates after openrisc.net has been lost · d01e1f35
      Stafford Horne 提交于
      The openrisc.net domain expired and was taken over by squatters.
      These updates point documentation to the new domain, mailing lists
      and git repos.
      
      Also, Jonas is not the main maintainer anylonger, he reviews changes
      but does not maintain a repo or sent pull requests.  Updating this to
      add Stafford and Stefan who are the active maintainers.
      Acked-by: NOlof Kindgren <olof.kindgren@gmail.com>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      d01e1f35
    • S
      openrisc: Consolidate setup to use memblock instead of bootmem · 266c7fad
      Stafford Horne 提交于
      Clearing out one todo item. Use the memblock boot time memory
      which is the current standard.
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Acked-by: NJonas <jonas@southpole.se>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      266c7fad
    • R
      openrisc: remove the redundant of_platform_populate · 994894c3
      Rob Herring 提交于
      The of_platform_populate call in the openrisc arch code is now redundant
      as the DT core provides a default call. Openrisc has a NULL match table
      which means only top level nodes with compatible strings will have
      devices creates. The default version will also descend nodes in the
      match table such as "simple-bus" which should be fine as openrisc
      doesn't have any of these (though it is preferred that memory-mapped
      peripherals be grouped under a bus node(s)).
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      994894c3
    • S
      openrisc: add NR_CPUS Kconfig default value · 34bbdcdc
      Stafford Horne 提交于
      The build system now expects that NR_CPUS is defined.
      
      Follow 4cbbbb43 ("microblaze: Fix missing NR_CPUS in menuconfig")
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      34bbdcdc
    • G
      openrisc: Support both old (or32) and new (or1k) toolchain · 1f43e235
      Guenter Roeck 提交于
      The output file format for or1k has changed from "elf32-or32"
      to "elf32-or1k". Select the correct output format automatically
      to be able to compile the kernel with both toolchain variants.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      1f43e235
    • C
      openrisc: Add thread-local storage (TLS) support · e60aa2fb
      Christian Svensson 提交于
      Historically OpenRISC GCC has reserved r10 which we now use to hold
      the thread pointer for thread-local storage (TLS).
      Signed-off-by: NChristian Svensson <blue@cmd.nu>
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      e60aa2fb
    • J
      openrisc: restore all regs on rt_sigreturn · c7990219
      Jonas Bonn 提交于
      Fix signal handling for when signals are handled as the result of timers
      or exceptions, previous code assumed syscalls. This was noticeable with X
      crashing where it uses SIGALRM.
      
      This patch restores all regs before returning to userspace via
      _resume_userspace instead of via syscall return path.
      
      The rt_sigreturn syscall is more like a context switch than a function
      call; it entails a return from one context (the signal handler) to another
      (the process in question).  For a context switch like this there are
      effectively no call-saved regs that remain constant across the transition.
      Reported-by: NSebastian Macke <sebastian@macke.de>
      Signed-off-by: NJonas Bonn <jonas@southpole.se>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      [shorne@gmail.com: Updated comment better reflect change and issue]
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      c7990219
    • S
      openrisc: fix PTRS_PER_PGD define · f4770609
      Stefan Kristiansson 提交于
      On OpenRISC, with its 8k pages, PAGE_SHIFT is defined to be 13.
      That makes the expression (1UL << (PAGE_SHIFT-2)) evaluate
      to 2048.
      The correct value for PTRS_PER_PGD should be 256.
      
      Correcting the PTRS_PER_PGD define unveiled a bug in map_ram(),
      where PTRS_PER_PGD was used when the intent was to iterate
      over a set of page table entries.
      This patch corrects that issue as well.
      Signed-off-by: NStefan Kristiansson <stefan.kristiansson@saunalahti.fi>
      Acked-by: NJonas Bonn <jonas@southpole.se>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      f4770609
    • H
      avr32: wire up pkey syscalls · 8712a5b8
      Hans-Christian Noren Egtvedt 提交于
      This patch wires up the new pkey_mprotect, pkey_alloc and pkey_free syscalls on
      AVR32.
      8712a5b8