Skip to content
  1. Jan 12, 2023
    • Jakub Kicinski's avatar
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue · eb25df88
      Jakub Kicinski authored
      
      
      Tony Nguyen says:
      
      ====================
      Intel Wired LAN Driver Updates 2023-01-10 (ixgbe, igc, iavf)
      
      This series contains updates to ixgbe, igc, and iavf drivers.
      
      Yang Yingliang adds calls to pci_dev_put() for proper ref count tracking
      on ixgbe.
      
      Christopher adds setting of Toggle on Target Time bits for proper
      pulse per second (PPS) synchronization for igc.
      
      Daniil Tatianin fixes, likely, copy/paste issue that misreported
      destination instead of source for IP mask for iavf error.
      
      * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
        iavf/iavf_main: actually log ->src mask when talking about it
        igc: Fix PPS delta between two synchronized end-points
        ixgbe: fix pci device refcount leak
      ====================
      
      Link: https://lore.kernel.org/r/20230110223825.648544-1-anthony.l.nguyen@intel.com
      Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      eb25df88
    • Jakub Kicinski's avatar
      bnxt: make sure we return pages to the pool · 97f5e03a
      Jakub Kicinski authored
      Before the commit under Fixes the page would have been released
      from the pool before the napi_alloc_skb() call, so normal page
      freeing was fine (released page == no longer in the pool).
      
      After the change we just mark the page for recycling so it's still
      in the pool if the skb alloc fails, we need to recycle.
      
      Same commit added the same bug in the new bnxt_rx_multi_page_skb().
      
      Fixes: 1dc4c557
      
       ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff")
      Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
      Link: https://lore.kernel.org/r/20230111042547.987749-1-kuba@kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      97f5e03a
    • Jie Wang's avatar
      net: hns3: fix wrong use of rss size during VF rss config · ae9f29fd
      Jie Wang authored
      Currently, it used old rss size to get current tc mode. As a result, the
      rss size is updated, but the tc mode is still configured based on the old
      rss size.
      
      So this patch fixes it by using the new rss size in both process.
      
      Fixes: 93969dc1
      
       ("net: hns3: refactor VF rss init APIs with new common rss init APIs")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarHao Lan <lanhao@huawei.com>
      Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
      Link: https://lore.kernel.org/r/20230110115359.10163-1-lanhao@huawei.com
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ae9f29fd
  2. Jan 11, 2023
  3. Jan 10, 2023
  4. Jan 09, 2023
    • Mirsad Goran Todorovac's avatar
      af_unix: selftest: Fix the size of the parameter to connect() · 7d6ceeb1
      Mirsad Goran Todorovac authored
      
      
      Adjust size parameter in connect() to match the type of the parameter, to
      fix "No such file or directory" error in selftests/net/af_unix/
      test_oob_unix.c:127.
      
      The existing code happens to work provided that the autogenerated pathname
      is shorter than sizeof (struct sockaddr), which is why it hasn't been
      noticed earlier.
      
      Visible from the trace excerpt:
      
      bind(3, {sa_family=AF_UNIX, sun_path="unix_oob_453059"}, 110) = 0
      clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fa6a6577a10) = 453060
      [pid <child>] connect(6, {sa_family=AF_UNIX, sun_path="unix_oob_45305"}, 16) = -1 ENOENT (No such file or directory)
      
      BUG: The filename is trimmed to sizeof (struct sockaddr).
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Eric Dumazet <edumazet@google.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
      Cc: Florian Westphal <fw@strlen.de>
      Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
      Fixes: 314001f0
      
       ("af_unix: Add OOB support")
      Signed-off-by: default avatarMirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
      Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d6ceeb1
    • Horatiu Vultur's avatar
      net: lan966x: Allow to add rules in TCAM even if not enabled · 76761bab
      Horatiu Vultur authored
      The blamed commit implemented the vcap_operations to allow to add an
      entry in the TCAM. One of the callbacks is to validate the supported
      keysets. If the TCAM lookup was not enabled, then this will return
      failure so no entries could be added.
      This doesn't make much sense, as you can enable at a later point the
      TCAM. Therefore change it such to allow entries in TCAM even it is not
      enabled.
      
      Fixes: 4426b78c
      
       ("net: lan966x: Add port keyset config and callback interface")
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76761bab
    • Eric Dumazet's avatar
      gro: take care of DODGY packets · 7871f54e
      Eric Dumazet authored
      Jaroslav reported a recent throughput regression with virtio_net
      caused by blamed commit.
      
      It is unclear if DODGY GSO packets coming from user space
      can be accepted by GRO engine in the future with minimal
      changes, and if there is any expected gain from it.
      
      In the meantime, make sure to detect and flush DODGY packets.
      
      Fixes: 5eddb249
      
       ("gro: add support of (hw)gro packets to gro stack")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-and-bisected-by: default avatarJaroslav Pulchart <jaroslav.pulchart@gooddata.com>
      Cc: Coco Li <lixiaoyan@google.com>
      Cc: Paolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7871f54e
    • Minsuk Kang's avatar
      nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame() · 9dab880d
      Minsuk Kang authored
      Fix a use-after-free that occurs in hcd when in_urb sent from
      pn533_usb_send_frame() is completed earlier than out_urb. Its callback
      frees the skb data in pn533_send_async_complete() that is used as a
      transfer buffer of out_urb. Wait before sending in_urb until the
      callback of out_urb is called. To modify the callback of out_urb alone,
      separate the complete function of out_urb and ack_urb.
      
      Found by a modified version of syzkaller.
      
      BUG: KASAN: use-after-free in dummy_timer
      Call Trace:
       memcpy (mm/kasan/shadow.c:65)
       dummy_perform_transfer (drivers/usb/gadget/udc/dummy_hcd.c:1352)
       transfer (drivers/usb/gadget/udc/dummy_hcd.c:1453)
       dummy_timer (drivers/usb/gadget/udc/dummy_hcd.c:1972)
       arch_static_branch (arch/x86/include/asm/jump_label.h:27)
       static_key_false (include/linux/jump_label.h:207)
       timer_expire_exit (include/trace/events/timer.h:127)
       call_timer_fn (kernel/time/timer.c:1475)
       expire_timers (kernel/time/timer.c:1519)
       __run_timers (kernel/time/timer.c:1790)
       run_timer_softirq (kernel/time/timer.c:1803)
      
      Fixes: c46ee386
      
       ("NFC: pn533: add NXP pn533 nfc device driver")
      Signed-off-by: default avatarMinsuk Kang <linuxlovemin@yonsei.ac.kr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9dab880d