1. 23 2月, 2018 1 次提交
  2. 19 2月, 2018 2 次提交
  3. 31 1月, 2018 2 次提交
    • T
      cfg80211: Add support to notify station's opmode change to userspace · 466b9936
      tamizhr@codeaurora.org 提交于
      ht/vht action frames will be sent to AP from station to notify
      change of its ht/vht opmode(max bandwidth, smps mode or nss) modified
      values. Currently these valuse used by driver/firmware for rate control
      algorithm. This patch introduces NL80211_CMD_STA_OPMODE_CHANGED
      command to notify those modified/current supported values(max bandwidth,
      smps mode, max nss) to userspace application. This will be useful for the
      application like steering, which closely monitoring station's capability
      changes. Since the application has taken these values during station
      association.
      Signed-off-by: NTamizh chelvam <tamizhr@codeaurora.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      466b9936
    • S
      cfg80211/nl80211: Optional authentication offload to userspace · 40cbfa90
      Srinivas Dasari 提交于
      This interface allows the host driver to offload the authentication to
      user space. This is exclusively defined for host drivers that do not
      define separate commands for authentication and association, but rely on
      userspace SME (e.g., in wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME
      case) for the authentication to happen. This can be used to implement
      SAE without full implementation in the kernel/firmware while still being
      able to use NL80211_CMD_CONNECT with driver-based BSS selection.
      
      Host driver sends NL80211_CMD_EXTERNAL_AUTH event to start/abort
      authentication to the port on which connect is triggered and status
      of authentication is further indicated by user space to host
      driver through the same command response interface.
      
      User space entities advertise this capability through the
      NL80211_ATTR_EXTERNAL_AUTH_SUPP flag in the NL80211_CMD_CONNECT request.
      Host drivers shall look at this capability to offload the authentication.
      Signed-off-by: NSrinivas Dasari <dasaris@qti.qualcomm.com>
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      [add socket connection ownership check]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      40cbfa90
  4. 30 1月, 2018 1 次提交
    • C
      net_sched: plug in qdisc ops change_tx_queue_len · 48bfd55e
      Cong Wang 提交于
      Introduce a new qdisc ops ->change_tx_queue_len() so that
      each qdisc could decide how to implement this if it wants.
      Previously we simply read dev->tx_queue_len, after pfifo_fast
      switches to skb array, we need this API to resize the skb array
      when we change dev->tx_queue_len.
      
      To avoid handling race conditions with TX BH, we need to
      deactivate all TX queues before change the value and bring them
      back after we are done, this also makes implementation easier.
      
      Cc: John Fastabend <john.fastabend@gmail.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48bfd55e
  5. 26 1月, 2018 6 次提交
  6. 25 1月, 2018 9 次提交
    • D
      net: tcp: close sock if net namespace is exiting · 4ee806d5
      Dan Streetman 提交于
      When a tcp socket is closed, if it detects that its net namespace is
      exiting, close immediately and do not wait for FIN sequence.
      
      For normal sockets, a reference is taken to their net namespace, so it will
      never exit while the socket is open.  However, kernel sockets do not take a
      reference to their net namespace, so it may begin exiting while the kernel
      socket is still open.  In this case if the kernel socket is a tcp socket,
      it will stay open trying to complete its close sequence.  The sock's dst(s)
      hold a reference to their interface, which are all transferred to the
      namespace's loopback interface when the real interfaces are taken down.
      When the namespace tries to take down its loopback interface, it hangs
      waiting for all references to the loopback interface to release, which
      results in messages like:
      
      unregister_netdevice: waiting for lo to become free. Usage count = 1
      
      These messages continue until the socket finally times out and closes.
      Since the net namespace cleanup holds the net_mutex while calling its
      registered pernet callbacks, any new net namespace initialization is
      blocked until the current net namespace finishes exiting.
      
      After this change, the tcp socket notices the exiting net namespace, and
      closes immediately, releasing its dst(s) and their reference to the
      loopback interface, which lets the net namespace continue exiting.
      
      Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1711407
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=97811Signed-off-by: NDan Streetman <ddstreet@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ee806d5
    • A
      lift handling of SIOCIW... out of dev_ioctl() · b1b0c245
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b1b0c245
    • A
      ip_rt_ioctl(): take copyin to caller · ca25c300
      Al Viro 提交于
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ca25c300
    • W
      net: erspan: fix use-after-free · b423d13c
      William Tu 提交于
      When building the erspan header for either v1 or v2, the eth_hdr()
      does not point to the right inner packet's eth_hdr,
      causing kasan report use-after-free and slab-out-of-bouds read.
      
      The patch fixes the following syzkaller issues:
      [1] BUG: KASAN: slab-out-of-bounds in erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735
      [2] BUG: KASAN: slab-out-of-bounds in erspan_build_header+0x3bf/0x3d0 net/ipv4/ip_gre.c:698
      [3] BUG: KASAN: use-after-free in erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735
      [4] BUG: KASAN: use-after-free in erspan_build_header+0x3bf/0x3d0 net/ipv4/ip_gre.c:698
      
      [2] CPU: 0 PID: 3654 Comm: syzkaller377964 Not tainted 4.15.0-rc9+ #185
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:17 [inline]
       dump_stack+0x194/0x257 lib/dump_stack.c:53
       print_address_description+0x73/0x250 mm/kasan/report.c:252
       kasan_report_error mm/kasan/report.c:351 [inline]
       kasan_report+0x25b/0x340 mm/kasan/report.c:409
       __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:440
       erspan_build_header+0x3bf/0x3d0 net/ipv4/ip_gre.c:698
       erspan_xmit+0x3b8/0x13b0 net/ipv4/ip_gre.c:740
       __netdev_start_xmit include/linux/netdevice.h:4042 [inline]
       netdev_start_xmit include/linux/netdevice.h:4051 [inline]
       packet_direct_xmit+0x315/0x6b0 net/packet/af_packet.c:266
       packet_snd net/packet/af_packet.c:2943 [inline]
       packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2968
       sock_sendmsg_nosec net/socket.c:638 [inline]
       sock_sendmsg+0xca/0x110 net/socket.c:648
       SYSC_sendto+0x361/0x5c0 net/socket.c:1729
       SyS_sendto+0x40/0x50 net/socket.c:1697
       do_syscall_32_irqs_on arch/x86/entry/common.c:327 [inline]
       do_fast_syscall_32+0x3ee/0xf9d arch/x86/entry/common.c:389
       entry_SYSENTER_compat+0x54/0x63 arch/x86/entry/entry_64_compat.S:129
      RIP: 0023:0xf7fcfc79
      RSP: 002b:00000000ffc6976c EFLAGS: 00000286 ORIG_RAX: 0000000000000171
      RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000020011000
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020008000
      RBP: 000000000000001c R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
      
      Fixes: f551c91d ("net: erspan: introduce erspan v2 for ip_gre")
      Fixes: 84e54fe0 ("gre: introduce native tunnel support for ERSPAN")
      Reported-by: syzbot+9723f2d288e49b492cf0@syzkaller.appspotmail.com
      Reported-by: syzbot+f0ddeb2b032a8e1d9098@syzkaller.appspotmail.com
      Reported-by: syzbot+f14b3703cd8d7670203f@syzkaller.appspotmail.com
      Reported-by: syzbot+eefa384efad8d7997f20@syzkaller.appspotmail.com
      Signed-off-by: NWilliam Tu <u9012063@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b423d13c
    • J
      net: sched: remove tc_cls_common_offload_init_deprecated() · c846adb6
      Jakub Kicinski 提交于
      All users are now converted to tc_cls_common_offload_init().
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c846adb6
    • J
      cls_bpf: remove gen_flags from bpf_offload · f558fdea
      Jakub Kicinski 提交于
      cls_bpf now guarantees that only device-bound programs are
      allowed with skip_sw.  The drivers no longer pay attention to
      flags on filter load, therefore the bpf_offload member can be
      removed.  If flags are needed again they should probably be
      added to struct tc_cls_common_offload instead.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f558fdea
    • J
      net: sched: prepare for reimplementation of tc_cls_common_offload_init() · 34832e1c
      Jakub Kicinski 提交于
      Rename the tc_cls_common_offload_init() helper function to
      tc_cls_common_offload_init_deprecated() and add a new implementation
      which also takes flags argument.  We will only set extack if flags
      indicate that offload is forced (skip_sw) otherwise driver errors
      should be ignored, as they don't influence the overall filter
      installation.
      
      Note that we need the tc_skip_hw() helper for new version, therefore
      it is added later in the file.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      34832e1c
    • J
      net: sched: propagate extack to cls->destroy callbacks · 715df5ec
      Jakub Kicinski 提交于
      Propagate extack to cls->destroy callbacks when called from
      non-error paths.  On error paths pass NULL to avoid overwriting
      the failure message.
      Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      715df5ec
    • W
      net: sched: fix TCF_LAYER_LINK case in tcf_get_base_ptr · d3303a65
      Wolfgang Bumiller 提交于
      TCF_LAYER_LINK and TCF_LAYER_NETWORK returned the same pointer as
      skb->data points to the network header.
      Use skb_mac_header instead.
      Signed-off-by: NWolfgang Bumiller <w.bumiller@proxmox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d3303a65
  7. 24 1月, 2018 2 次提交
  8. 23 1月, 2018 2 次提交
  9. 20 1月, 2018 7 次提交
  10. 19 1月, 2018 1 次提交
  11. 18 1月, 2018 7 次提交