1. 11 Dec, 2021 8 commits
  2. 10 Dec, 2021 27 commits
  3. 09 Dec, 2021 5 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 3150a733
      Jakub Kicinski authored
      No conflicts.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3150a733
    • Kees Cook's avatar
      skbuff: Extract list pointers to silence compiler warnings · 1a2fb220
      Kees Cook authored
      Under both -Warray-bounds and the object_size sanitizer, the compiler is
      upset about accessing prev/next of sk_buff when the object it thinks it
      is coming from is sk_buff_head. The warning is a false positive due to
      the compiler taking a conservative approach, opting to warn at casting
      time rather than access time.
      
      However, in support of enabling -Warray-bounds globally (which has
      found many real bugs), arrange things for sk_buff so that the compiler
      can unambiguously see that there is no intention to access anything
      except prev/next.  Introduce and cast to a separate struct sk_buff_list,
      which contains _only_ the first two fields, silencing the warnings:
      
      In file included from ./include/net/net_namespace.h:39,
                       from ./include/linux/netdevice.h:37,
                       from net/core/netpoll.c:17:
      net/core/netpoll.c: In function 'refill_skbs':
      ./include/linux/skbuff.h:2086:9: warning: array subscript 'struct sk_buff[0]' is partly outside array bounds of 'struct sk_buff_head[1]' [-Warray-bounds]
       2086 |         __skb_insert(newsk, next->prev, next, list);
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      net/core/netpoll.c:49:28: note: while referencing 'skb_pool'
         49 | static struct sk_buff_head skb_pool;
            |                            ^~~~~~~~
      
      This change results in no executable instruction differences.
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Link: https://lore.kernel.org/r/20211207062758.2324338-1-keescook@chromium.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1a2fb220
    • Russell King (Oracle)'s avatar
      net: phy: prefer 1000baseT over 1000baseKX · f20f94f7
      Russell King (Oracle) authored
      The PHY settings table is supposed to be sorted by descending match
      priority - in other words, earlier entries are preferred over later
      entries.
      
      The order of 1000baseKX/Full and 1000baseT/Full is such that we
      prefer 1000baseKX/Full over 1000baseT/Full, but 1000baseKX/Full is
      a lot rarer than 1000baseT/Full, and thus is much less likely to
      be preferred.
      
      This causes phylink problems - it means a fixed link specifying a
      speed of 1G and full duplex gets an ethtool linkmode of 1000baseKX/Full
      rather than 1000baseT/Full as would be expected - and since we offer
      userspace a software emulation of a conventional copper PHY, we want
      to offer copper modes in preference to anything else. However, we do
      still want to allow the rarer modes as well.
      
      Hence, let's reorder these two modes to prefer copper.
      Tested-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Reported-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/E1muvFO-00F6jY-1K@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f20f94f7
    • Eric Dumazet's avatar
      xfrm: use net device refcount tracker helpers · 4177e496
      Eric Dumazet authored
      xfrm4_fill_dst() and xfrm6_fill_dst() build dst,
      getting a device reference that will likely be released
      by standard dst_release() code.
      
      We have to track these references or risk a warning if
      CONFIG_NET_DEV_REFCNT_TRACKER=y
      
      Note to XFRM maintainers :
      
      Error path in xfrm6_fill_dst() releases the reference,
      but does not clear xdst->u.dst.dev, so I wonder
      if this could lead to double dev_put() in some cases,
      where a dst_release() _is_ called by the callers in their
      error path.
      
      This extra dev_put() was added in commit 84c4a9df ("xfrm6:
      release dev before returning error")
      
      Fixes: 9038c320 ("net: dst: add net device refcount tracking to dst_entry")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Cong Wang <amwang@redhat.com>
      Acked-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Link: https://lore.kernel.org/r/20211207193203.2706158-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4177e496
    • Linus Torvalds's avatar
      Merge tag 'net-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · ded746bf
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bpf, can and netfilter.
      
        Current release - regressions:
      
         - bpf, sockmap: re-evaluate proto ops when psock is removed from
           sockmap
      
        Current release - new code bugs:
      
         - bpf: fix bpf_check_mod_kfunc_call for built-in modules
      
         - ice: fixes for TC classifier offloads
      
         - vrf: don't run conntrack on vrf with !dflt qdisc
      
        Previous releases - regressions:
      
         - bpf: fix the off-by-two error in range markings
      
         - seg6: fix the iif in the IPv6 socket control block
      
         - devlink: fix netns refcount leak in devlink_nl_cmd_reload()
      
         - dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal PHY's"
      
         - dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
      
        Previous releases - always broken:
      
         - ethtool: do not perform operations on net devices being
           unregistered
      
         - udp: use datalen to cap max gso segments
      
         - ice: fix races in stats collection
      
         - fec: only clear interrupt of handling queue in fec_enet_rx_queue()
      
         - m_can: pci: fix incorrect reference clock rate
      
         - m_can: disable and ignore ELO interrupt
      
         - mvpp2: fix XDP rx queues registering
      
        Misc:
      
         - treewide: add missing includes masked by cgroup -> bpf.h
           dependency"
      
      * tag 'net-5.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (82 commits)
        net: dsa: mv88e6xxx: allow use of PHYs on CPU and DSA ports
        net: wwan: iosm: fixes unable to send AT command during mbim tx
        net: wwan: iosm: fixes net interface nonfunctional after fw flash
        net: wwan: iosm: fixes unnecessary doorbell send
        net: dsa: felix: Fix memory leak in felix_setup_mmio_filtering
        MAINTAINERS: s390/net: remove myself as maintainer
        net/sched: fq_pie: prevent dismantle issue
        net: mana: Fix memory leak in mana_hwc_create_wq
        seg6: fix the iif in the IPv6 socket control block
        nfp: Fix memory leak in nfp_cpp_area_cache_add()
        nfc: fix potential NULL pointer deref in nfc_genl_dump_ses_done
        nfc: fix segfault in nfc_genl_dump_devices_done
        udp: using datalen to cap max gso segments
        net: dsa: mv88e6xxx: error handling for serdes_power functions
        can: kvaser_usb: get CAN clock frequency from device
        can: kvaser_pciefd: kvaser_pciefd_rx_error_frame(): increase correct stats->{rx,tx}_errors counter
        net: mvpp2: fix XDP rx queues registering
        vmxnet3: fix minimum vectors alloc issue
        net, neigh: clear whole pneigh_entry at alloc time
        net: dsa: mv88e6xxx: fix "don't use PHY_DETECT on internal PHY's"
        ...
      ded746bf