1. 23 Jun, 2015 18 commits
    • Shreyas Bhatewara's avatar
      vmxnet3: Register shutdown handler for device (fwd) · e9ba47bf
      Shreyas Bhatewara authored
      Implement a handler for pci shutdown so that the driver has an
      opportunity to make sure that device is quiesced before the PCI
      switches to legacy IRQs. This way the possibility of
      "screaming interrupt" is avoided.
      Acked-by: default avatarShrikrishna Khare <skhare@vmware.com>
      Signed-off-by: default avatarShreyas N Bhatewara <sbhatewara@vmware.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9ba47bf
    • Eric W. Biederman's avatar
      netfilter: nf_qeueue: Drop queue entries on nf_unregister_hook · 8405a8ff
      Eric W. Biederman authored
      Add code to nf_unregister_hook to flush the nf_queue when a hook is
      unregistered.  This guarantees that the pointer that the nf_queue code
      retains into the nf_hook list will remain valid while a packet is
      queued.
      
      I tested what would happen if we do not flush queued packets and was
      trivially able to obtain the oops below.  All that was required was
      to stop the nf_queue listening process, to delete all of the nf_tables,
      and to awaken the nf_queue listening process.
      
      > BUG: unable to handle kernel paging request at 0000000100000001
      > IP: [<0000000100000001>] 0x100000001
      > PGD b9c35067 PUD 0
      > Oops: 0010 [#1] SMP
      > Modules linked in:
      > CPU: 0 PID: 519 Comm: lt-nfqnl_test Not tainted
      > task: ffff8800b9c8c050 ti: ffff8800ba9d8000 task.ti: ffff8800ba9d8000
      > RIP: 0010:[<0000000100000001>]  [<0000000100000001>] 0x100000001
      > RSP: 0018:ffff8800ba9dba40  EFLAGS: 00010a16
      > RAX: ffff8800bab48a00 RBX: ffff8800ba9dba90 RCX: ffff8800ba9dba90
      > RDX: ffff8800b9c10128 RSI: ffff8800ba940900 RDI: ffff8800bab48a00
      > RBP: ffff8800b9c10128 R08: ffffffff82976660 R09: ffff8800ba9dbb28
      > R10: dead000000100100 R11: dead000000200200 R12: ffff8800ba940900
      > R13: ffffffff8313fd50 R14: ffff8800b9c95200 R15: 0000000000000000
      > FS:  00007fb91fc34700(0000) GS:ffff8800bfa00000(0000) knlGS:0000000000000000
      > CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      > CR2: 0000000100000001 CR3: 00000000babfb000 CR4: 00000000000007f0
      > Stack:
      >  ffffffff8206ab0f ffffffff82982240 ffff8800bab48a00 ffff8800b9c100a8
      >  ffff8800b9c10100 0000000000000001 ffff8800ba940900 ffff8800b9c10128
      >  ffffffff8206bd65 ffff8800bfb0d5e0 ffff8800bab48a00 0000000000014dc0
      > Call Trace:
      >  [<ffffffff8206ab0f>] ? nf_iterate+0x4f/0xa0
      >  [<ffffffff8206bd65>] ? nf_reinject+0x125/0x190
      >  [<ffffffff8206dee5>] ? nfqnl_recv_verdict+0x255/0x360
      >  [<ffffffff81386290>] ? nla_parse+0x80/0xf0
      >  [<ffffffff8206c42c>] ? nfnetlink_rcv_msg+0x13c/0x240
      >  [<ffffffff811b2fec>] ? __memcg_kmem_get_cache+0x4c/0x150
      >  [<ffffffff8206c2f0>] ? nfnl_lock+0x20/0x20
      >  [<ffffffff82068159>] ? netlink_rcv_skb+0xa9/0xc0
      >  [<ffffffff820677bf>] ? netlink_unicast+0x12f/0x1c0
      >  [<ffffffff82067ade>] ? netlink_sendmsg+0x28e/0x650
      >  [<ffffffff81fdd814>] ? sock_sendmsg+0x44/0x50
      >  [<ffffffff81fde07b>] ? ___sys_sendmsg+0x2ab/0x2c0
      >  [<ffffffff810e8f73>] ? __wake_up+0x43/0x70
      >  [<ffffffff8141a134>] ? tty_write+0x1c4/0x2a0
      >  [<ffffffff81fde9f4>] ? __sys_sendmsg+0x44/0x80
      >  [<ffffffff823ff8d7>] ? system_call_fastpath+0x12/0x6a
      > Code:  Bad RIP value.
      > RIP  [<0000000100000001>] 0x100000001
      >  RSP <ffff8800ba9dba40>
      > CR2: 0000000100000001
      > ---[ end trace 08eb65d42362793f ]---
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8405a8ff
    • Eric W. Biederman's avatar
      netfilter: nftables: Do not run chains in the wrong network namespace · fdab6a4c
      Eric W. Biederman authored
      Currenlty nf_tables chains added in one network namespace are being
      run in all network namespace.  The issues are myriad with the simplest
      being an unprivileged user can cause any network packets to be dropped.
      
      Address this by simply not running nf_tables chains in the wrong
      network namespace.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Acked-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdab6a4c
    • Pankaj Gupta's avatar
      macvtap: Increase limit of macvtap queues · dfe816c5
      Pankaj Gupta authored
      Macvtap should be compatible with tuntap for
      maximum number of queues.
      
      commit 'baf71c5c (tuntap:
      Increase the number of queues in tun.)' removes
      the limitations and increases number of queues in tuntap.
      Now, Its safe to increase number of queues in Macvtap as well.
      
      This patch also modifies 'macvtap_del_queues' function
      to avoid extra memory allocation in stack.
      
      Changes from v1->v2 :
      Michael S. Tsirkin, Jason Wang  :
                        Better way to use linked list to
      avoid use of extra memory in stack.
      Sergei Shtylyov : Specify dependent commit's summary.
      Signed-off-by: default avatarPankaj Gupta <pagupta@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dfe816c5
    • Daniel Wagner's avatar
      bpf: BPF based latency tracing · 0fb1170e
      Daniel Wagner authored
      BPF offers another way to generate latency histograms. We attach
      kprobes at trace_preempt_off and trace_preempt_on and calculate the
      time it takes to from seeing the off/on transition.
      
      The first array is used to store the start time stamp. The key is the
      CPU id. The second array stores the log2(time diff). We need to use
      static allocation here (array and not hash tables). The kprobes
      hooking into trace_preempt_on|off should not calling any dynamic
      memory allocation or free path. We need to avoid recursivly
      getting called. Besides that, it reduces jitter in the measurement.
      
      CPU 0
            latency        : count     distribution
             1 -> 1        : 0        |                                        |
             2 -> 3        : 0        |                                        |
             4 -> 7        : 0        |                                        |
             8 -> 15       : 0        |                                        |
            16 -> 31       : 0        |                                        |
            32 -> 63       : 0        |                                        |
            64 -> 127      : 0        |                                        |
           128 -> 255      : 0        |                                        |
           256 -> 511      : 0        |                                        |
           512 -> 1023     : 0        |                                        |
          1024 -> 2047     : 0        |                                        |
          2048 -> 4095     : 166723   |*************************************** |
          4096 -> 8191     : 19870    |***                                     |
          8192 -> 16383    : 6324     |                                        |
         16384 -> 32767    : 1098     |                                        |
         32768 -> 65535    : 190      |                                        |
         65536 -> 131071   : 179      |                                        |
        131072 -> 262143   : 18       |                                        |
        262144 -> 524287   : 4        |                                        |
        524288 -> 1048575  : 1363     |                                        |
      CPU 1
            latency        : count     distribution
             1 -> 1        : 0        |                                        |
             2 -> 3        : 0        |                                        |
             4 -> 7        : 0        |                                        |
             8 -> 15       : 0        |                                        |
            16 -> 31       : 0        |                                        |
            32 -> 63       : 0        |                                        |
            64 -> 127      : 0        |                                        |
           128 -> 255      : 0        |                                        |
           256 -> 511      : 0        |                                        |
           512 -> 1023     : 0        |                                        |
          1024 -> 2047     : 0        |                                        |
          2048 -> 4095     : 114042   |*************************************** |
          4096 -> 8191     : 9587     |**                                      |
          8192 -> 16383    : 4140     |                                        |
         16384 -> 32767    : 673      |                                        |
         32768 -> 65535    : 179      |                                        |
         65536 -> 131071   : 29       |                                        |
        131072 -> 262143   : 4        |                                        |
        262144 -> 524287   : 1        |                                        |
        524288 -> 1048575  : 364      |                                        |
      CPU 2
            latency        : count     distribution
             1 -> 1        : 0        |                                        |
             2 -> 3        : 0        |                                        |
             4 -> 7        : 0        |                                        |
             8 -> 15       : 0        |                                        |
            16 -> 31       : 0        |                                        |
            32 -> 63       : 0        |                                        |
            64 -> 127      : 0        |                                        |
           128 -> 255      : 0        |                                        |
           256 -> 511      : 0        |                                        |
           512 -> 1023     : 0        |                                        |
          1024 -> 2047     : 0        |                                        |
          2048 -> 4095     : 40147    |*************************************** |
          4096 -> 8191     : 2300     |*                                       |
          8192 -> 16383    : 828      |                                        |
         16384 -> 32767    : 178      |                                        |
         32768 -> 65535    : 59       |                                        |
         65536 -> 131071   : 2        |                                        |
        131072 -> 262143   : 0        |                                        |
        262144 -> 524287   : 1        |                                        |
        524288 -> 1048575  : 174      |                                        |
      CPU 3
            latency        : count     distribution
             1 -> 1        : 0        |                                        |
             2 -> 3        : 0        |                                        |
             4 -> 7        : 0        |                                        |
             8 -> 15       : 0        |                                        |
            16 -> 31       : 0        |                                        |
            32 -> 63       : 0        |                                        |
            64 -> 127      : 0        |                                        |
           128 -> 255      : 0        |                                        |
           256 -> 511      : 0        |                                        |
           512 -> 1023     : 0        |                                        |
          1024 -> 2047     : 0        |                                        |
          2048 -> 4095     : 29626    |*************************************** |
          4096 -> 8191     : 2704     |**                                      |
          8192 -> 16383    : 1090     |                                        |
         16384 -> 32767    : 160      |                                        |
         32768 -> 65535    : 72       |                                        |
         65536 -> 131071   : 32       |                                        |
        131072 -> 262143   : 26       |                                        |
        262144 -> 524287   : 12       |                                        |
        524288 -> 1048575  : 298      |                                        |
      
      All this is based on the trace3 examples written by
      Alexei Starovoitov <ast@plumgrid.com>.
      Signed-off-by: default avatarDaniel Wagner <daniel.wagner@bmw-carit.de>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fb1170e
    • Nikolay Aleksandrov's avatar
      bridge: multicast: start querier timer when running user-space stp · 7ce42de1
      Nikolay Aleksandrov authored
      When STP is running in user-space and querier is configured, the
      querier timer is not started when a port goes to a non-blocking state.
      This patch unifies the user- and kernel-space stp multicast port enable
      path and enables it in all states different from blocking. Note that when a
      port goes in BR_STATE_DISABLED it's not enabled because that is handled
      in the beginning of the port list loop.
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7ce42de1
    • David S. Miller's avatar
      Merge tag 'nfc-next-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next · b1dfe0a8
      David S. Miller authored
      NFC 4.2 2nd pull request
      
      This one only contains a one liner fix for a typo that I
      introduced while cleaning some of the nfcmrvl patches that
      were part of the 1st 4.2 pull request.
      b1dfe0a8
    • David S. Miller's avatar
      Merge branch 'for-upstream' of... · bfdc8dbd
      David S. Miller authored
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth-next 2015-06-18
      
      Here's the final bluetooth-next pull request for 4.2.
      
       - Cleanups & fixes to 802.15.4 code and related drivers
       - Fix btusb driver memory leak
       - New USB IDs for Atheros controllers
       - Support for BCM4324B3 UART based Broadcom controller
       - Fix for Bluetooth encryption key size handling
       - Broadcom controller initialization fixes
       - Support for Intel controller DDC parameters
       - Support for multiple Bluetooth LE advertising instances
       - Fix for HCI user channel cleanup path
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bfdc8dbd
    • Mahesh Bandewar's avatar
      bonding: Display LACP info only to CAP_NET_ADMIN capable user · 4cd6b475
      Mahesh Bandewar authored
      Actor and Partner details can be accessed via proc-fs, sys-fs
      entries or netlink interface. These interfaces are world readable
      at this moment. The earlier patch-series made the LACP communication
      secure to avoid nuisance attack from within the same L2 domain but
      it did not prevent "someone unprivileged" looking at that information
      on host and perform the same act.
      
      This patch essentially avoids spitting those entries if the user
      in question does not have enough privileges.
      Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
      Signed-off-by: default avatarAndy Gospodarek <gospo@cumulusnetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4cd6b475
    • David S. Miller's avatar
      Merge branch 'macb-sama5d2' · 1f02c09b
      David S. Miller authored
      Nicolas Ferre says:
      
      ====================
      net/macb: add sama5d2 support
      
      This series is basically the support for another flavor of the GEM IP
      configuration. It ended up being a series because of some little fixes made to
      the binding documentation before adding the new compatibility string.
      
      Bye,
      
      v2: - fix bindings
          - add sama5d2 compatibility string to the binding documentation
      ====================
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f02c09b
    • Cyrille Pitchen's avatar
      net/macb: add config for Atmel sama5d2 SoCs · 5c8fe711
      Cyrille Pitchen authored
      Add the compatible string for Atmel sama5d2 SoC family as the configuration
      options differ from other instances of the GEM.
      Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c8fe711
    • Nicolas Ferre's avatar
      net/macb: bindings doc: add sama5d2 compatibility sting · bb7506c9
      Nicolas Ferre authored
      Add sama5d2 to the biding documentation for this use of the GEM IP.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb7506c9
    • Nicolas Ferre's avatar
      net/macb: bindings doc/trivial: fix sama5d4 comment · f58393f4
      Nicolas Ferre authored
      On sama5d4, we only have a GEM IP that is configured to do 10/100 Mbits. So the
      use of "Gigabit" can be confusing.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f58393f4
    • Nicolas Ferre's avatar
      net/macb: bindings doc: fix compatibility string · f76a28c2
      Nicolas Ferre authored
      In the driver and the DT bindings we use the "atmel" prefix. Fix it in the
      binding documentation.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f76a28c2
    • Hiroaki SHIMODA's avatar
      inet_diag: Remove _bh suffix in inet_diag_dump_reqs(). · 3b188443
      Hiroaki SHIMODA authored
      inet_diag_dump_reqs() is called from inet_diag_dump_icsk() with BH
      disabled. So no need to disable BH in inet_diag_dump_reqs().
      Signed-off-by: default avatarHiroaki Shimoda <shimoda.hiroaki@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b188443
    • Shengzhou Liu's avatar
      net/phy: Add support for Realtek RTL8211F · 3447cf2e
      Shengzhou Liu authored
      RTL8211F has different register definitions from RTL8211E.
      Specially it needs to enable TXDLY in case of RGMII.
      Signed-off-by: default avatarShengzhou Liu <Shengzhou.Liu@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3447cf2e
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2015-06-18' of... · fa433354
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2015-06-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      Major changes:
      
      mwifiex:
      
      * enhancements for AP mode: support verbose information in station
        dump command and also information about AP link.
      * enable power save by default
      
      brcmfmac:
      
      * fix module reload issue for PCIe
      * improving msgbuf protocol for PCIe devices
      * rework .get_station() cfg80211 callback operation
      * determine interface combinations upon device feature support
      
      ath9k:
      
      * ath9k_htc: add support of channel switch
      
      wil6210:
      
      * add modparam for bcast ring size
      * support hidden SSID
      * add per-MCS Rx stats
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa433354
    • Scott Feldman's avatar
      switchdev: fdb filter_dev is always NULL for self (device), so remove check · 10ea5165
      Scott Feldman authored
      Remove the filter_dev check when dumping fdb entries, otherwise dump
      returns empty list.  filter_dev is always passed as NULL when dumping fdbs
      on SELF.  We want the fdbs installed on the device to be listed in the
      dump.
      Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
      Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops")
      Acked-by: default avatarSridhar Samudrala <sridhar.samudrala@intel.com>
      Acked-by: default avatarJiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10ea5165
  2. 21 Jun, 2015 19 commits
  3. 20 Jun, 2015 1 commit
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 12011962
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains a final Netfilter pull request for net-next
      4.2. This mostly addresses some fallout from the previous pull request, small
      netns updates and a couple of new features for nfnetlink_log and the socket
      match that didn't get in time for the previous pull request. More specifically
      they are:
      
      1) Add security context information to nfnetlink_queue, from Roman Kubiak.
      
      2) Add support to restore the sk_mark into skb->mark through xt_socket,
         from Harout Hedeshian.
      
      3) Force alignment of 16 bytes of per cpu xt_counters, from Eric Dumazet.
      
      4) Rename br_netfilter.c to br_netfilter_hooks.c to prepare split of IPv6 code
         into a separated file.
      
      5) Move the IPv6 code in br_netfilter into a separated file.
      
      6) Remove unused RCV_SKB_FAIL() in nfnetlink_queue and nfetlink_log, from Eric
         Biederman.
      
      7) Two liner to simplify netns logic in em_ipset_match().
      
      8) Add missing includes to net/net_namespace.h to avoid compilation problems
         that result from not including linux/netfilter.h in netns headers.
      
      9) Use a forward declaration instead of including linux/proc_fs.h from
         netns/netfilter.h
      
      10) Add a new linux/netfilter_defs.h to replace the linux/netfilter.h inclusion
          in netns headers.
      
      11) Remove spurious netfilter.h file included in the net tree, also from Eric
          Biederman.
      
      12) Fix x_tables compilation warnings on 32 bits platforms that resulted from
          recent changes in x_tables counters, from Florian Westphal.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12011962
  4. 18 Jun, 2015 2 commits