1. 30 Nov, 2023 3 commits
    • Dave Ertman's avatar
      ice: Fix VF Reset paths when interface in a failed over aggregate · 9f74a3df
      Dave Ertman authored
      There is an error when an interface has the following conditions:
      - PF is in an aggregate (bond)
      - PF has VFs created on it
      - bond is in a state where it is failed-over to the secondary interface
      - A VF reset is issued on one or more of those VFs
      
      The issue is generated by the originating PF trying to rebuild or
      reconfigure the VF resources.  Since the bond is failed over to the
      secondary interface the queue contexts are in a modified state.
      
      To fix this issue, have the originating interface reclaim its resources
      prior to the tear-down and rebuild or reconfigure.  Then after the process
      is complete, move the resources back to the currently active interface.
      
      There are multiple paths that can be used depending on what triggered the
      event, so create a helper function to move the queues and use paired calls
      to the helper (back to origin, process, then move back to active interface)
      under the same lag_mutex lock.
      
      Fixes: 1e0f9881 ("ice: Flesh out implementation of support for SRIOV on bonded interface")
      Signed-off-by: default avatarDave Ertman <david.m.ertman@intel.com>
      Tested-by: default avatarSujai Buvaneswaran <sujai.buvaneswaran@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Link: https://lore.kernel.org/r/20231127212340.1137657-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9f74a3df
    • Jakub Kicinski's avatar
      Merge tag 'wireless-2023-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless · 300fbb24
      Jakub Kicinski authored
      Johannes Berg says:
      
      ====================
      wireless fixes:
       - debugfs had a deadlock (removal vs. use of files),
         fixes going through wireless ACKed by Greg
       - support for HT STAs on 320 MHz channels, even if it's
         not clear that should ever happen (that's 6 GHz), best
         not to WARN()
       - fix for the previous CQM fix that broke most cases
       - various wiphy locking fixes
       - various small driver fixes
      
      * tag 'wireless-2023-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless:
        wifi: mac80211: use wiphy locked debugfs for sdata/link
        wifi: mac80211: use wiphy locked debugfs helpers for agg_status
        wifi: cfg80211: add locked debugfs wrappers
        debugfs: add API to allow debugfs operations cancellation
        debugfs: annotate debugfs handlers vs. removal with lockdep
        debugfs: fix automount d_fsdata usage
        wifi: mac80211: handle 320 MHz in ieee80211_ht_cap_ie_to_sta_ht_cap
        wifi: avoid offset calculation on NULL pointer
        wifi: cfg80211: hold wiphy mutex for send_interface
        wifi: cfg80211: lock wiphy mutex for rfkill poll
        wifi: cfg80211: fix CQM for non-range use
        wifi: mac80211: do not pass AP_VLAN vif pointer to drivers during flush
        wifi: iwlwifi: mvm: fix an error code in iwl_mvm_mld_add_sta()
        wifi: mt76: mt7925: fix typo in mt7925_init_he_caps
        wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config
      ====================
      
      Link: https://lore.kernel.org/r/20231129150809.31083-3-johannes@sipsolutions.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      300fbb24
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 0d47fa5c
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2023-11-30
      
      We've added 5 non-merge commits during the last 7 day(s) which contain
      a total of 10 files changed, 66 insertions(+), 15 deletions(-).
      
      The main changes are:
      
      1) Fix AF_UNIX splat from use after free in BPF sockmap,
         from John Fastabend.
      
      2) Fix a syzkaller splat in netdevsim by properly handling offloaded
         programs (and not device-bound ones), from Stanislav Fomichev.
      
      3) Fix bpf_mem_cache_alloc_flags() to initialize the allocation hint,
         from Hou Tao.
      
      4) Fix netkit by rejecting IFLA_NETKIT_PEER_INFO in changelink,
         from Daniel Borkmann.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        bpf, sockmap: Add af_unix test with both sockets in map
        bpf, sockmap: af_unix stream sockets need to hold ref for pair sock
        netkit: Reject IFLA_NETKIT_PEER_INFO in netkit_change_link
        bpf: Add missed allocation hint for bpf_mem_cache_alloc_flags()
        netdevsim: Don't accept device bound programs
      ====================
      
      Link: https://lore.kernel.org/r/20231129234916.16128-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0d47fa5c
  2. 29 Nov, 2023 5 commits
  3. 28 Nov, 2023 13 commits
  4. 27 Nov, 2023 7 commits
  5. 26 Nov, 2023 5 commits
    • David S. Miller's avatar
      Merge branch 'dpaa2-eth-fixes' · ccf49ceb
      David S. Miller authored
      Ioana Ciornei says:
      
      ====================
      dpaa2-eth: various fixes
      
      The first patch fixes a memory corruption issue happening between the Tx
      and Tx confirmation of a packet by making the Tx alignment at 64bytes
      mandatory instead of optional as it was previously.
      
      The second patch fixes the Rx copybreak code path which recycled the
      initial data buffer before all processing was done on the packet.
      
      Changes in v2:
      - squashed patches #1 and #2
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ccf49ceb
    • Ioana Ciornei's avatar
      dpaa2-eth: recycle the RX buffer only after all processing done · beb1930f
      Ioana Ciornei authored
      The blamed commit added support for Rx copybreak. This meant that for
      certain frame sizes, a new skb was allocated and the initial data buffer
      was recycled. Instead of waiting to recycle the Rx buffer only after all
      processing was done on it (like accessing the parse results or timestamp
      information), the code path just went ahead and re-used the buffer right
      away.
      
      This sometimes lead to corrupted HW and SW annotation areas.
      Fix this by delaying the moment when the buffer is recycled.
      
      Fixes: 50f82699 ("dpaa2-eth: add rx copybreak support")
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      beb1930f
    • Ioana Ciornei's avatar
      dpaa2-eth: increase the needed headroom to account for alignment · f422abe3
      Ioana Ciornei authored
      Increase the needed headroom to account for a 64 byte alignment
      restriction which, with this patch, we make mandatory on the Tx path.
      The case in which the amount of headroom needed is not available is
      already handled by the driver which instead sends a S/G frame with the
      first buffer only holding the SW and HW annotation areas.
      
      Without this patch, we can empirically see data corruption happening
      between Tx and Tx confirmation which sometimes leads to the SW
      annotation area being overwritten.
      
      Since this is an old IP where the hardware team cannot help to
      understand the underlying behavior, we make the Tx alignment mandatory
      for all frames to avoid the crash on Tx conf. Also, remove the comment
      that suggested that this is just an optimization.
      
      This patch also sets the needed_headroom net device field to the usual
      value that the driver would need on the Tx path:
      	- 64 bytes for the software annotation area
      	- 64 bytes to account for a 64 byte aligned buffer address
      
      Fixes: 6e2387e8 ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver")
      Closes: https://lore.kernel.org/netdev/aa784d0c-85eb-4e5d-968b-c8f74fa86be6@gin.de/Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f422abe3
    • Greg Ungerer's avatar
      net: dsa: mv88e6xxx: fix marvell 6350 probe crash · a524eabc
      Greg Ungerer authored
      As of commit b92143d4 ("net: dsa: mv88e6xxx: add infrastructure for
      phylink_pcs") probing of a Marvell 88e6350 switch causes a NULL pointer
      de-reference like this example:
      
          ...
          mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
          8<--- cut here ---
          Unable to handle kernel NULL pointer dereference at virtual address 00000000 when read
          [00000000] *pgd=00000000
          Internal error: Oops: 5 [#1] ARM
          Modules linked in:
          CPU: 0 PID: 8 Comm: kworker/u2:0 Not tainted 6.7.0-rc2-dirty #26
          Hardware name: Marvell Armada 370/XP (Device Tree)
          Workqueue: events_unbound deferred_probe_work_func
          PC is at mv88e6xxx_port_setup+0x1c/0x44
          LR is at dsa_port_devlink_setup+0x74/0x154
          pc : [<c057ea24>]    lr : [<c0819598>]    psr: a0000013
          sp : c184fce0  ip : c542b8f4  fp : 00000000
          r10: 00000001  r9 : c542a540  r8 : c542bc00
          r7 : c542b838  r6 : c5244580  r5 : 00000005  r4 : c5244580
          r3 : 00000000  r2 : c542b840  r1 : 00000005  r0 : c1a02040
          ...
      
      The Marvell 6350 switch has no SERDES interface and so has no
      corresponding pcs_ops defined for it. But during probing a call is made
      to mv88e6xxx_port_setup() which unconditionally expects pcs_ops to exist -
      though the presence of the pcs_ops->pcs_init function is optional.
      
      Modify code to check for pcs_ops first, before checking for and calling
      pcs_ops->pcs_init. Modify checking and use of pcs_ops->pcs_teardown
      which may potentially suffer the same problem.
      
      Fixes: b92143d4 ("net: dsa: mv88e6xxx: add infrastructure for phylink_pcs")
      Signed-off-by: default avatarGreg Ungerer <gerg@kernel.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a524eabc
    • Greg Ungerer's avatar
      net: dsa: mv88e6xxx: fix marvell 6350 switch probing · b3f1a164
      Greg Ungerer authored
      As of commit de5c9bf4 ("net: phylink: require supported_interfaces to
      be filled") Marvell 88e6350 switches fail to be probed:
      
          ...
          mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
          mv88e6085 d0072004.mdio-mii:11: phylink: error: empty supported_interfaces
          error creating PHYLINK: -22
          mv88e6085: probe of d0072004.mdio-mii:11 failed with error -22
          ...
      
      The problem stems from the use of mv88e6185_phylink_get_caps() to get
      the device capabilities. Create a new dedicated phylink_get_caps for the
      6351 family (which the 6350 is one of) to properly support their set of
      capabilities.
      
      According to chip.h the 6351 switch family includes the 6171, 6175, 6350
      and 6351 switches, so update each of these to use the correct
      phylink_get_caps.
      
      Fixes: de5c9bf4 ("net: phylink: require supported_interfaces to be filled")
      Signed-off-by: default avatarGreg Ungerer <gerg@kernel.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3f1a164
  6. 24 Nov, 2023 7 commits