1. 06 12月, 2017 5 次提交
  2. 05 12月, 2017 17 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7cda4cee
      David S. Miller 提交于
      Small overlapping change conflict ('net' changed a line,
      'net-next' added a line right afterwards) in flexcan.c
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7cda4cee
    • L
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 2391f0b4
      Linus Torvalds 提交于
      Pull virtio fixes from Michael Tsirkin:
       "virtio and qemu bugfixes
      
        A couple of bugfixes that just became ready"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_balloon: fix increment of vb->num_pfns in fill_balloon()
        virtio: release virtio index when fail to device_register
        fw_cfg: fix driver remove
      2391f0b4
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 236fa078
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Various TCP control block fixes, including one that crashes with
          SELinux, from David Ahern and Eric Dumazet.
      
       2) Fix ACK generation in rxrpc, from David Howells.
      
       3) ipvlan doesn't set the mark properly in the ipv4 route lookup key,
          from Gao Feng.
      
       4) SIT configuration doesn't take on the frag_off ipv4 field
          configuration properly, fix from Hangbin Liu.
      
       5) TSO can fail after device down/up on stmmac, fix from Lars Persson.
      
       6) Various bpftool fixes (mostly in JSON handling) from Quentin Monnet.
      
       7) Various SKB leak fixes in vhost/tun/tap (mostly observed as
          performance problems). From Wei Xu.
      
       8) mvpps's TX descriptors were not zero initialized, from Yan Markman.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits)
        tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match()
        tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()
        rxrpc: Fix the MAINTAINERS record
        rxrpc: Use correct netns source in rxrpc_release_sock()
        liquidio: fix incorrect indentation of assignment statement
        stmmac: reset last TSO segment size after device open
        ipvlan: Add the skb->mark as flow4's member to lookup route
        s390/qeth: build max size GSO skbs on L2 devices
        s390/qeth: fix GSO throughput regression
        s390/qeth: fix thinko in IPv4 multicast address tracking
        tap: free skb if flags error
        tun: free skb in early errors
        vhost: fix skb leak in handle_rx()
        bnxt_en: Fix a variable scoping in bnxt_hwrm_do_send_msg()
        bnxt_en: fix dst/src fid for vxlan encap/decap actions
        bnxt_en: wildcard smac while creating tunnel decap filter
        bnxt_en: Need to unconditionally shut down RoCE in bnxt_shutdown
        phylink: ensure we take the link down when phylink_stop() is called
        sfp: warn about modules requiring address change sequence
        sfp: improve RX_LOS handling
        ...
      236fa078
    • C
      arch/tile: mark as orphaned · 8ee5ad1d
      Chris Metcalf 提交于
      The chip family of TILEPro and TILE-Gx was developed by Tilera, which
      was eventually acquired by Mellanox.  The tile architecture was added to
      the kernel in 2010 and first appeared in 2.6.36.
      
      Now at Mellanox we are developing new chips based on the ARM64
      architecture; our last TILE-Gx chip (the Gx72) was released in 2013, and
      our customers using tile architecture products are not, as far as we
      know, looking to upgrade to newer kernel releases.  In the absence of
      someone in the community stepping up to take over maintainership, this
      commit marks the architecture as orphaned.
      
      Cc: Chris Metcalf <metcalf@alum.mit.edu>
      Signed-off-by: NChris Metcalf <cmetcalf@mellanox.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8ee5ad1d
    • F
      rtnetlink: ipv6: convert remaining users to rtnl_register_module · a3fde2ad
      Florian Westphal 提交于
      convert remaining users of rtnl_register to rtnl_register_module
      and un-export rtnl_register.
      Requested-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3fde2ad
    • D
      Merge tag 'linux-can-next-for-4.16-20171201' of... · 112d59c7
      David S. Miller 提交于
      Merge tag 'linux-can-next-for-4.16-20171201' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can-next 2017-12-01
      
      this is a pull request of 10 patches for net-next/master.
      
      The first two patches are by Arnd Bergmann, they convert the peak_usb
      from using "struct timeval" to "ktime_t". The error handling in the
      vxcan driver is clean up by Markus Elfring's patch. Bhumika Goyal
      contributes a patch for the c_can_pci driver to make the pci data const.
      The six patches by Pankaj Bansal for the flexcan driver add LS1021A
      support by making the endianness of the driver configurable by the
      device tree.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      112d59c7
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · d671965b
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2017-12-03
      
      The following pull-request contains BPF updates for your *net-next* tree.
      
      The main changes are:
      
      1) Addition of a software model for BPF offloads in order to ease
         testing code changes in that area and make semantics more clear.
         This is implemented in a new driver called netdevsim, which can
         later also be extended for other offloads. SR-IOV support is added
         as well to netdevsim. BPF kernel selftests for offloading are
         added so we can track basic functionality as well as exercising
         all corner cases around BPF offloading, from Jakub.
      
      2) Today drivers have to drop the reference on BPF progs they hold
         due to XDP on device teardown themselves. Change this in order
         to make XDP handling inside the drivers less error prone, and
         move disabling XDP to the core instead, also from Jakub.
      
      3) Misc set of BPF verifier improvements and cleanups as preparatory
         work for upcoming BPF-to-BPF calls. Among others, this set also
         improves liveness marking such that pruning can be slightly more
         effective. Register and stack liveness information is now included
         in the verifier log as well, from Alexei.
      
      4) nfp JIT improvements in order to identify load/store sequences in
         the BPF prog e.g. coming from memcpy lowering and optimizing them
         through the NPU's command push pull (CPP) instruction, from Jiong.
      
      5) Cleanups to test_cgrp2_attach2.c BPF sample code in oder to remove
         bpf_prog_attach() magic values and replacing them with actual proper
         attach flag instead, from David.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d671965b
    • D
      Merge branch 'rtnetlink-rework-handler-registration' · f4d4c49b
      David S. Miller 提交于
      Florian Westphal says:
      
      ====================
      rtnetlink: rework handler (un)registering
      
      Peter Zijlstra reported (referring to commit 019a3169,
      "rtnetlink: add reference counting to prevent module unload while dump is in progress"):
      
       1) it not in fact a refcount, so using refcount_t is silly
       2) there is a distinct lack of memory barriers, so we can easily
          observe the decrement while the msg_handler is still in progress.
       3) waiting with a schedule()/yield() loop is complete crap and subject
          life-locks, imagine doing that rtnl_unregister_all() from a RT task.
      
      In ancient times rtnetlink exposed a statically-sized table with
      preset doit/dumpit handlers to be called for a protocol/type pair.
      
      Later the rtnl_register interface was added and the table was allocated
      on demand.  Eventually these were also used by modules.
      
      Problem is that nothing prevents module unload while a netlink dump
      is in progress.  netlink dumps can be span multiple recv calls and
      netlink core saves the to-be-repeated dumper address for later invocation.
      
      To prevent rmmod the netlink core expects callers to pass in the owning
      module so a reference can be taken.
      
      So far rtnetlink wasn't doing this, add new interface to pass THIS_MODULE.
      Moreover, when converting parts of the rtnetlink handling to rcu this code
      gained way too many READ_ONCE spots, remove them and the extra refcounting.
      
      Take a module reference when running dumpit and doit callbacks
      and never alter content of rtnl_link structures after they have been
      published via rcu_assign_pointer.
      
      Based partially on earlier patch from Peter.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4d4c49b
    • F
      rtnetlink: remove __rtnl_register · 16feebcf
      Florian Westphal 提交于
      This removes __rtnl_register and switches callers to either
      rtnl_register or rtnl_register_module.
      
      Also, rtnl_register() will now print an error if memory allocation
      failed rather than panic the kernel.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      16feebcf
    • F
      net: use rtnl_register_module where needed · c1c502b5
      Florian Westphal 提交于
      all of these can be compiled as a module, so use new
      _module version to make sure module can no longer be removed
      while callback/dump is in use.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c1c502b5
    • F
      rtnetlink: get reference on module before invoking handlers · e4202511
      Florian Westphal 提交于
      Add yet another rtnl_register function.  It will be used by modules
      that can be removed.
      
      The passed module struct is used to prevent module unload while
      a netlink dump is in progress or when a DOIT_UNLOCKED doit callback
      is called.
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4202511
    • F
      net: rtnetlink: use rcu to free rtnl message handlers · addf9b90
      Florian Westphal 提交于
      rtnetlink is littered with READ_ONCE() because we can have read accesses
      while another cpu can write to the structure we're reading by
      (un)registering doit or dumpit handlers.
      
      This patch changes this so that (un)registering cpu allocates a new
      structure and then publishes it via rcu_assign_pointer, i.e. once
      another cpu can see such pointer no modifications will occur anymore.
      
      based on initial patch from Peter Zijlstra.
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      addf9b90
    • H
      net: phy: broadcom: re-add mistakenly removed config settings · 9753c21f
      Heiner Kallweit 提交于
      Previous patch mistakenly removed three chip-specific config settings.
      Add them again.
      
      Fixes: 80274aba "net: phy: remove generic settings for callbacks config_aneg and read_status from drivers"
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9753c21f
    • D
      Merge branch 'ipv6-gre-collect_md' · 90ffa72f
      David S. Miller 提交于
      William Tu says:
      
      ====================
      add ip6 gre and gretap collect_md mode
      
      Similar to gre, vxlan, geneve, ipip tunnels, allow ip6gretap tunnels to
      operate in collect metadata mode.  The first patch adds the support to
      ip6_gre.c. The second patch enables unsetting the csum for ipv6 tunnel,
      when using bpf_skb_[gs]et_tunnel_key() helpers.  Finally, the last patch
      adds the ip6 gre and gretap tunnel test cases to BPF sample code.
      
      The corresponding iproute2 patch:
      https://marc.info/?l=linux-netdev&m=151216943128087&w=2
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90ffa72f
    • W
      samples/bpf: extend test_tunnel_bpf.sh with ip6gre · 56ddd302
      William Tu 提交于
      Extend existing tests for vxlan, gre, geneve, ipip, erspan,
      to include ip6 gre and gretap tunnel.
      Signed-off-by: NWilliam Tu <u9012063@gmail.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56ddd302
    • W
      bpf: allow disabling tunnel csum for ipv6 · b8da518c
      William Tu 提交于
      Before the patch, BPF_F_ZERO_CSUM_TX can be used only for ipv4 tunnel.
      With introduction of ip6gretap collect_md mode, the flag should be also
      supported for ipv6.
      Signed-off-by: NWilliam Tu <u9012063@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8da518c
    • W
      ip6_gre: add ip6 gre and gretap collect_md mode · 6712abc1
      William Tu 提交于
      Similar to gre, vxlan, geneve, ipip tunnels, allow ip6 gre and gretap
      tunnels to operate in collect metadata mode.  bpf_skb_[gs]et_tunnel_key()
      helpers can make use of it right away.  OVS can use it as well in the
      future.
      Signed-off-by: NWilliam Tu <u9012063@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6712abc1
  3. 04 12月, 2017 7 次提交
    • H
      net: phy: core: don't disable device interrupts in phy_change · c34bc2b5
      Heiner Kallweit 提交于
      If state is not PHY_HALTED I see no need to temporarily disable
      interrupts on the device. As long as the current interrupt isn't acked
      on the device no new interrupt can happen anyway.
      
      In addition remove a unneeded enabling of interrupts in the state
      machine when handling state PHY_CHANGELINK.
      
      Tested on a Odroid-C2 with RTL8211F phy in interrupt mode.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c34bc2b5
    • H
      net: phy: core: remove now uneeded disabling of interrupts · a6d1642d
      Heiner Kallweit 提交于
      After commits c974bdbc "net: phy: Use threaded IRQ, to allow IRQ from
      sleeping devices" and 664fcf12 "net: phy: Threaded interrupts allow
      some simplification" all relevant code pieces run in process context
      anyway and I don't think we need the disabling of interrupts any longer.
      
      Interestingly enough, latter commit already removed the comment
      explaining why interrupts need to be temporarily disabled.
      
      On my system phy interrupt mode works fine with this patch.
      However I may miss something, especially in the context of shared phy
      interrupts, therefore I'd appreciate if more people could test this.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6d1642d
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · c2eb6d07
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2017-12-02
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix a compilation warning in xdp redirect tracepoint due to
         missing bpf.h include that pulls in struct bpf_map, from Xie.
      
      2) Limit the maximum number of attachable BPF progs for a given
         perf event as long as uabi is not frozen yet. The hard upper
         limit is now 64 and therefore the same as with BPF multi-prog
         for cgroups. Also add related error checking for the sample
         BPF loader when enabling and attaching to the perf event, from
         Yonghong.
      
      3) Specifically set the RLIMIT_MEMLOCK for the test_verifier_log
         case, so that the test case can always pass and not fail in
         some environments due to too low default limit, also from
         Yonghong.
      
      4) Fix up a missing license header comment for kernel/bpf/offload.c,
         from Jakub.
      
      5) Several fixes for bpftool, among others a crash on incorrect
         arguments when json output is used, error message handling
         fixes on unknown options and proper destruction of json writer
         for some exit cases, all from Quentin.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c2eb6d07
    • D
      Merge branch 'tcp-cb-selinux-corruption' · e4485c74
      David S. Miller 提交于
      Eric Dumazet says:
      
      ====================
      tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()
      
      James Morris reported kernel stack corruption bug that
      we tracked back to commit 971f10ec ("tcp: better TCP_SKB_CB
      layout to reduce cache line misses")
      
      First patch needs to be backported to kernels >= 3.18,
      while second patch needs to be backported to kernels >= 4.9, since
      this was the time when inet_exact_dif_match appeared.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e4485c74
    • D
      tcp: use IPCB instead of TCP_SKB_CB in inet_exact_dif_match() · b4d1605a
      David Ahern 提交于
      After this fix : ("tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()"),
      socket lookups happen while skb->cb[] has not been mangled yet by TCP.
      
      Fixes: a04a480d ("net: Require exact match for TCP socket lookups if dif is l3mdev")
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b4d1605a
    • E
      tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb() · eeea10b8
      Eric Dumazet 提交于
      James Morris reported kernel stack corruption bug [1] while
      running the SELinux testsuite, and bisected to a recent
      commit bffa72cf ("net: sk_buff rbnode reorg")
      
      We believe this commit is fine, but exposes an older bug.
      
      SELinux code runs from tcp_filter() and might send an ICMP,
      expecting IP options to be found in skb->cb[] using regular IPCB placement.
      
      We need to defer TCP mangling of skb->cb[] after tcp_filter() calls.
      
      This patch adds tcp_v4_fill_cb()/tcp_v4_restore_cb() in a very
      similar way we added them for IPv6.
      
      [1]
      [  339.806024] SELinux: failure in selinux_parse_skb(), unable to parse packet
      [  339.822505] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff81745af5
      [  339.822505]
      [  339.852250] CPU: 4 PID: 3642 Comm: client Not tainted 4.15.0-rc1-test #15
      [  339.868498] Hardware name: LENOVO 10FGS0VA1L/30BC, BIOS FWKT68A   01/19/2017
      [  339.885060] Call Trace:
      [  339.896875]  <IRQ>
      [  339.908103]  dump_stack+0x63/0x87
      [  339.920645]  panic+0xe8/0x248
      [  339.932668]  ? ip_push_pending_frames+0x33/0x40
      [  339.946328]  ? icmp_send+0x525/0x530
      [  339.958861]  ? kfree_skbmem+0x60/0x70
      [  339.971431]  __stack_chk_fail+0x1b/0x20
      [  339.984049]  icmp_send+0x525/0x530
      [  339.996205]  ? netlbl_skbuff_err+0x36/0x40
      [  340.008997]  ? selinux_netlbl_err+0x11/0x20
      [  340.021816]  ? selinux_socket_sock_rcv_skb+0x211/0x230
      [  340.035529]  ? security_sock_rcv_skb+0x3b/0x50
      [  340.048471]  ? sk_filter_trim_cap+0x44/0x1c0
      [  340.061246]  ? tcp_v4_inbound_md5_hash+0x69/0x1b0
      [  340.074562]  ? tcp_filter+0x2c/0x40
      [  340.086400]  ? tcp_v4_rcv+0x820/0xa20
      [  340.098329]  ? ip_local_deliver_finish+0x71/0x1a0
      [  340.111279]  ? ip_local_deliver+0x6f/0xe0
      [  340.123535]  ? ip_rcv_finish+0x3a0/0x3a0
      [  340.135523]  ? ip_rcv_finish+0xdb/0x3a0
      [  340.147442]  ? ip_rcv+0x27c/0x3c0
      [  340.158668]  ? inet_del_offload+0x40/0x40
      [  340.170580]  ? __netif_receive_skb_core+0x4ac/0x900
      [  340.183285]  ? rcu_accelerate_cbs+0x5b/0x80
      [  340.195282]  ? __netif_receive_skb+0x18/0x60
      [  340.207288]  ? process_backlog+0x95/0x140
      [  340.218948]  ? net_rx_action+0x26c/0x3b0
      [  340.230416]  ? __do_softirq+0xc9/0x26a
      [  340.241625]  ? do_softirq_own_stack+0x2a/0x40
      [  340.253368]  </IRQ>
      [  340.262673]  ? do_softirq+0x50/0x60
      [  340.273450]  ? __local_bh_enable_ip+0x57/0x60
      [  340.285045]  ? ip_finish_output2+0x175/0x350
      [  340.296403]  ? ip_finish_output+0x127/0x1d0
      [  340.307665]  ? nf_hook_slow+0x3c/0xb0
      [  340.318230]  ? ip_output+0x72/0xe0
      [  340.328524]  ? ip_fragment.constprop.54+0x80/0x80
      [  340.340070]  ? ip_local_out+0x35/0x40
      [  340.350497]  ? ip_queue_xmit+0x15c/0x3f0
      [  340.361060]  ? __kmalloc_reserve.isra.40+0x31/0x90
      [  340.372484]  ? __skb_clone+0x2e/0x130
      [  340.382633]  ? tcp_transmit_skb+0x558/0xa10
      [  340.393262]  ? tcp_connect+0x938/0xad0
      [  340.403370]  ? ktime_get_with_offset+0x4c/0xb0
      [  340.414206]  ? tcp_v4_connect+0x457/0x4e0
      [  340.424471]  ? __inet_stream_connect+0xb3/0x300
      [  340.435195]  ? inet_stream_connect+0x3b/0x60
      [  340.445607]  ? SYSC_connect+0xd9/0x110
      [  340.455455]  ? __audit_syscall_entry+0xaf/0x100
      [  340.466112]  ? syscall_trace_enter+0x1d0/0x2b0
      [  340.476636]  ? __audit_syscall_exit+0x209/0x290
      [  340.487151]  ? SyS_connect+0xe/0x10
      [  340.496453]  ? do_syscall_64+0x67/0x1b0
      [  340.506078]  ? entry_SYSCALL64_slow_path+0x25/0x25
      
      Fixes: 971f10ec ("tcp: better TCP_SKB_CB layout to reduce cache line misses")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NJames Morris <james.l.morris@oracle.com>
      Tested-by: NJames Morris <james.l.morris@oracle.com>
      Tested-by: NCasey Schaufler <casey@schaufler-ca.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eeea10b8
    • L
      Linux 4.15-rc2 · ae64f9bd
      Linus Torvalds 提交于
      ae64f9bd
  4. 03 12月, 2017 11 次提交