1. 21 Dec, 2021 9 commits
  2. 18 Dec, 2021 9 commits
  3. 17 Dec, 2021 12 commits
    • Brett Creeley's avatar
      iavf: Restrict maximum VLAN filters for VIRTCHNL_VF_OFFLOAD_VLAN_V2 · 92fc5085
      Brett Creeley authored
      For VIRTCHNL_VF_OFFLOAD_VLAN, PF's would limit the number of VLAN
      filters a VF was allowed to add. However, by the time the opcode failed,
      the VLAN netdev had already been added. VIRTCHNL_VF_OFFLOAD_VLAN_V2
      added the ability for a PF to tell the VF how many VLAN filters it's
      allowed to add. Make changes to support that functionality.
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      92fc5085
    • Brett Creeley's avatar
      iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 offload enable/disable · 8afadd1c
      Brett Creeley authored
      The new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows
      the VF to support 802.1Q and 802.1ad VLAN insertion and stripping if
      successfully negotiated via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS.
      Multiple changes were needed to support this new functionality.
      
      1. Added new aq_required flags to support any kind of VLAN stripping and
         insertion offload requests via virtchnl.
      
      2. Added the new method iavf_set_vlan_offload_features() that's
         used during VF initialization, VF reset, and iavf_set_features() to
         set the aq_required bits based on the current VLAN offload
         configuration of the VF's netdev.
      
      3. Added virtchnl handling for VIRTCHNL_OP_ENABLE_STRIPPING_V2,
         VIRTCHNL_OP_DISABLE_STRIPPING_V2, VIRTCHNL_OP_ENABLE_INSERTION_V2,
         and VIRTCHNL_OP_ENABLE_INSERTION_V2.
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      8afadd1c
    • Brett Creeley's avatar
      iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 hotpath · ccd219d2
      Brett Creeley authored
      The new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows
      the PF to set the location of the Tx and Rx VLAN tag for insertion and
      stripping offloads. In order to support this functionality a few changes
      are needed.
      
      1. Add a new method to cache the VLAN tag location based on negotiated
         capabilities for the Tx and Rx ring flags. This needs to be called in
         the initialization and reset paths.
      
      2. Refactor the transmit hotpath to account for the new Tx ring flags.
         When IAVF_TXR_FLAGS_VLAN_LOC_L2TAG2 is set, then the driver needs to
         insert the VLAN tag in the L2TAG2 field of the transmit descriptor.
         When the IAVF_TXRX_FLAGS_VLAN_LOC_L2TAG1 is set, then the driver needs
         to use the l2tag1 field of the data descriptor (same behavior as
         before).
      
      3. Refactor the iavf_tx_prepare_vlan_flags() function to simplify
         transmit hardware VLAN offload functionality by only depending on the
         skb_vlan_tag_present() function. This can be done because the OS
         won't request transmit offload for a VLAN unless the driver told the
         OS it's supported and enabled.
      
      4. Refactor the receive hotpath to account for the new Rx ring flags and
         VLAN ethertypes. This requires checking the Rx ring flags and
         descriptor status bits to determine the location of the VLAN tag.
         Also, since only a single ethertype can be supported at a time, check
         the enabled netdev features before specifying a VLAN ethertype in
         __vlan_hwaccel_put_tag().
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      ccd219d2
    • Brett Creeley's avatar
      iavf: Add support VIRTCHNL_VF_OFFLOAD_VLAN_V2 during netdev config · 48ccc43e
      Brett Creeley authored
      Based on VIRTCHNL_VF_OFFLOAD_VLAN_V2, the VF can now support more VLAN
      capabilities (i.e. 802.1AD offloads and filtering). In order to
      communicate these capabilities to the netdev layer, the VF needs to
      parse its VLAN capabilities based on whether it was able to negotiation
      VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2 or neither of
      these.
      
      In order to support this, add the following functionality:
      
      iavf_get_netdev_vlan_hw_features() - This is used to determine the VLAN
      features that the underlying hardware supports and that can be toggled
      off/on based on the negotiated capabiltiies. For example, if
      VIRTCHNL_VF_OFFLOAD_VLAN_V2 was negotiated, then any capability marked
      with VIRTCHNL_VLAN_TOGGLE can be toggled on/off by the VF. If
      VIRTCHNL_VF_OFFLOAD_VLAN was negotiated, then only VLAN insertion and/or
      stripping can be toggled on/off.
      
      iavf_get_netdev_vlan_features() - This is used to determine the VLAN
      features that the underlying hardware supports and that should be
      enabled by default. For example, if VIRTHCNL_VF_OFFLOAD_VLAN_V2 was
      negotiated, then any supported capability that has its ethertype_init
      filed set should be enabled by default. If VIRTCHNL_VF_OFFLOAD_VLAN was
      negotiated, then filtering, stripping, and insertion should be enabled
      by default.
      
      Also, refactor iavf_fix_features() to take into account the new
      capabilities. To do this, query all the supported features (enabled by
      default and toggleable) and make sure the requested change is supported.
      If VIRTCHNL_VF_OFFLOAD_VLAN_V2 is successfully negotiated, there is no
      need to check VIRTCHNL_VLAN_TOGGLE here because the driver already told
      the netdev layer which features can be toggled via netdev->hw_features
      during iavf_process_config(), so only those features will be requested
      to change.
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      48ccc43e
    • Brett Creeley's avatar
      iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 negotiation · 209f2f9c
      Brett Creeley authored
      In order to support the new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability the
      VF driver needs to rework it's initialization state machine and reset
      flow. This has to be done because successful negotiation of
      VIRTCHNL_VF_OFFLOAD_VLAN_V2 requires the VF driver to perform a second
      capability request via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS before
      configuring the adapter and its netdev.
      
      Add the VIRTCHNL_VF_OFFLOAD_VLAN_V2 bit when sending the
      VIRTHCNL_OP_GET_VF_RESOURECES message. The underlying PF will either
      support VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2 or
      neither. Both of these offloads should never be supported together.
      
      Based on this, add 2 new states to the initialization state machine:
      
      __IAVF_INIT_GET_OFFLOAD_VLAN_V2_CAPS
      __IAVF_INIT_CONFIG_ADAPTER
      
      The __IAVF_INIT_GET_OFFLOAD_VLAN_V2_CAPS state is used to request/store
      the new VLAN capabilities if and only if VIRTCHNL_VLAN_OFFLOAD_VLAN_V2
      was successfully negotiated in the __IAVF_INIT_GET_RESOURCES state.
      
      The __IAVF_INIT_CONFIG_ADAPTER state is used to configure the
      adapter/netdev after the resource requests have finished. The VF will
      move into this state regardless of whether it successfully negotiated
      VIRTCHNL_VF_OFFLOAD_VLAN or VIRTCHNL_VF_OFFLOAD_VLAN_V2.
      
      Also, add a the new flag IAVF_FLAG_AQ_GET_OFFLOAD_VLAN_V2_CAPS and set
      it during VF reset. If VIRTCHNL_VF_OFFLOAD_VLAN_V2 was successfully
      negotiated then the VF will request its VLAN capabilities via
      VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS during the reset. This is needed
      because the PF may change/modify the VF's configuration during VF reset
      (i.e. modifying the VF's port VLAN configuration).
      
      This also, required the VF to call netdev_update_features() since its
      VLAN features may change during VF reset. Make sure to call this under
      rtnl_lock().
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      209f2f9c
    • Brett Creeley's avatar
      virtchnl: Add support for new VLAN capabilities · bd0b536d
      Brett Creeley authored
      Currently VIRTCHNL only allows for VLAN filtering and offloads to happen
      on a single 802.1Q VLAN. Add support to filter and offload on inner,
      outer, and/or inner + outer VLANs.
      
      This is done by introducing the new capability
      VIRTCHNL_VF_OFFLOAD_VLAN_V2. The flow to negotiate this new capability
      is shown below.
      
      1. VF - sets the VIRTCHNL_VF_OFFLOAD_VLAN_V2 bit in the
         virtchnl_vf_resource.vf_caps_flags during the
         VIRTCHNL_OP_GET_VF_RESOURCES request message. The VF should also set
         the VIRTCHNL_VF_OFFLOAD_VLAN bit in case the PF driver doesn't support
         the new capability.
      
      2. PF - sets the VLAN capability bit it supports in the
         VIRTCHNL_OP_GET_VF_RESOURCES response message. This will either be
         VIRTCHNL_VF_OFFLOAD_VLAN_V2, VIRTCHNL_VF_OFFLOAD_VLAN, or none.
      
      3. VF - If the VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability was ACK'd by the
         PF, then the VF needs to request the VLAN capabilities of the
         PF/Device by issuing a VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS request.
         If the VIRTCHNL_VF_OFFLOAD_VLAN capability was ACK'd then the VF
         knows only single 802.1Q VLAN filtering/offloads are supported. If no
         VLAN capability is ACK'd then the PF/Device doesn't support hardware
         VLAN filtering/offloads for this VF.
      
      4. PF - Populates the virtchnl_vlan_caps structure based on what it
         allows/supports for that VF and sends that response via
         VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS.
      
      After VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is successfully negotiated
      the VF driver needs to interpret the capabilities supported by the
      underlying PF/Device. The VF will be allowed to filter/offload the
      inner 802.1Q, outer (various ethertype), inner 802.1Q + outer
      (various ethertypes), or none based on which fields are set.
      
      The VF will also need to interpret where the VLAN tag should be inserted
      and/or stripped based on the negotiated capabilities.
      Signed-off-by: default avatarBrett Creeley <brett.creeley@intel.com>
      Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      bd0b536d
    • Jakub Kicinski's avatar
      Merge tag 'wireless-drivers-next-2021-12-17' of... · f75c1d55
      Jakub Kicinski authored
      Merge tag 'wireless-drivers-next-2021-12-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for v5.17
      
      Second set of patches for v5.17, planning to do at least one more.
      Smaller new features, nothing special this time.
      
      Major changes:
      
      rtw88
       * debugfs file to fix tx rate
      
      iwlwifi
       * support SAR GEO Offset Mapping (SGOM) via BIOS
       * support firmware API version 68
       * add some new device IDs
      
      ath11k
       * support PCI devices with 1 MSI vector
       * WCN6855 hw2.1 support
       * 11d scan offload support
       * full monitor mode, only supported on QCN9074
       * scan MAC address randomization support
       * reserved host DDR addresses from DT for PCI devices support
      
      ath9k
       * switch to rate table based lookup
      
      ath
       * extend South Korea regulatory domain support
      
      wcn36xx
       * beacon filter support
      
      * tag 'wireless-drivers-next-2021-12-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (129 commits)
        wcn36xx: Implement beacon filtering
        wcn36xx: Fix physical location of beacon filter comment
        wcn36xx: Fix beacon filter structure definitions
        ath11k: Use reserved host DDR addresses from DT for PCI devices
        dt: bindings: add new DT entry for ath11k PCI device support
        wilc1000: Improve WILC TX performance when power_save is off
        wl1251: specify max. IE length
        rsi: fix array out of bound
        wilc1000: Rename workqueue from "WILC_wq" to "NETDEV-wq"
        wilc1000: Rename tx task from "K_TXQ_TASK" to NETDEV-tx
        wilc1000: Rename irq handler from "WILC_IRQ" to netdev name
        wilc1000: Rename SPI driver from "WILC_SPI" to "wilc1000_spi"
        wilc1000: Fix spurious "FW not responding" error
        wilc1000: Remove misleading USE_SPI_DMA macro
        wilc1000: Fix missing newline in error message
        wilc1000: Fix copy-and-paste typo in wilc_set_mac_address
        rtw89: coex: Update COEX to 5.5.8
        rtw89: coex: Cancel PS leaving while C2H comes
        rtw89: coex: Update BT counters while receiving report
        rtw89: coex: Define LPS state for BTC using
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20211217130952.34887C36AE9@smtp.kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f75c1d55
    • Changcheng Deng's avatar
      net: dsa: microchip: remove unneeded variable · 86df8be6
      Changcheng Deng authored
      Remove unneeded variable used to store return value.
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarChangcheng Deng <deng.changcheng@zte.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86df8be6
    • Dexuan Cui's avatar
      net: mana: Add RX fencing · 6cc74443
      Dexuan Cui authored
      RX fencing allows the driver to know that any prior change to the RQs has
      finished, e.g. when the RQs are disabled/enabled or the hashkey/indirection
      table are changed, RX fencing is required.
      
      Remove the previous workaround "ssleep(1)" and add the real support for
      RX fencing as the PF driver supports the MANA_FENCE_RQ request now (any
      old PF driver not supporting the request won't be used in production).
      Signed-off-by: default avatarDexuan Cui <decui@microsoft.com>
      Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
      Link: https://lore.kernel.org/r/20211216001748.8751-1-decui@microsoft.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6cc74443
    • Yang Li's avatar
      net: vertexcom: remove unneeded semicolon · 431b9b4d
      Yang Li authored
      Eliminate the following coccicheck warning:
      ./drivers/net/ethernet/vertexcom/mse102x.c:414:2-3: Unneeded semicolon
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Link: https://lore.kernel.org/r/20211216015433.83383-1-yang.lee@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      431b9b4d
    • Yinjun Zhang's avatar
      nfp: flower: refine the use of circular buffer · 7ffd9041
      Yinjun Zhang authored
      The current use of circular buffer to manage stats_context_id is
      very obscure, and it will cause problem if its element size is
      not power of two. So change the use more straightforward and
      scalable, and also change that for mask_id to keep consistency.
      Signed-off-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
      Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/1639618621-5857-1-git-send-email-yinjun.zhang@corigine.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7ffd9041
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7cd2802d
      Jakub Kicinski authored
      No conflicts.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      7cd2802d
  4. 16 Dec, 2021 10 commits
    • Linus Torvalds's avatar
      Merge tag 'audit-pr-20211216' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit · 6441998e
      Linus Torvalds authored
      Pull audit fix from Paul Moore:
       "A single patch to fix a problem where the audit queue could grow
        unbounded when the audit daemon is forcibly stopped"
      
      * tag 'audit-pr-20211216' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit:
        audit: improve robustness of the audit queue handling
      6441998e
    • Linus Torvalds's avatar
      Merge tag 'net-5.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 180f3bcf
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Networking fixes, including fixes from mac80211, wifi, bpf.
      
        Relatively large batches of fixes from BPF and the WiFi stack, calm in
        general networking.
      
        Current release - regressions:
      
         - dpaa2-eth: fix buffer overrun when reporting ethtool statistics
      
        Current release - new code bugs:
      
         - bpf: fix incorrect state pruning for <8B spill/fill
      
         - iavf:
             - add missing unlocks in iavf_watchdog_task()
             - do not override the adapter state in the watchdog task (again)
      
         - mlxsw: spectrum_router: consolidate MAC profiles when possible
      
        Previous releases - regressions:
      
         - mac80211 fixes:
             - rate control, avoid driver crash for retransmitted frames
             - regression in SSN handling of addba tx
             - a memory leak where sta_info is not freed
             - marking TX-during-stop for TX in in_reconfig, prevent stall
      
         - cfg80211: acquire wiphy mutex on regulatory work
      
         - wifi drivers: fix build regressions and LED config dependency
      
         - virtio_net: fix rx_drops stat for small pkts
      
         - dsa: mv88e6xxx: unforce speed & duplex in mac_link_down()
      
        Previous releases - always broken:
      
         - bpf fixes:
             - kernel address leakage in atomic fetch
             - kernel address leakage in atomic cmpxchg's r0 aux reg
             - signed bounds propagation after mov32
             - extable fixup offset
             - extable address check
      
         - mac80211:
             - fix the size used for building probe request
             - send ADDBA requests using the tid/queue of the aggregation
               session
             - agg-tx: don't schedule_and_wake_txq() under sta->lock, avoid
               deadlocks
             - validate extended element ID is present
      
         - mptcp:
             - never allow the PM to close a listener subflow (null-defer)
             - clear 'kern' flag from fallback sockets, prevent crash
             - fix deadlock in __mptcp_push_pending()
      
         - inet_diag: fix kernel-infoleak for UDP sockets
      
         - xsk: do not sleep in poll() when need_wakeup set
      
         - smc: avoid very long waits in smc_release()
      
         - sch_ets: don't remove idle classes from the round-robin list
      
         - netdevsim:
             - zero-initialize memory for bpf map's value, prevent info leak
             - don't let user space overwrite read only (max) ethtool parms
      
         - ixgbe: set X550 MDIO speed before talking to PHY
      
         - stmmac:
             - fix null-deref in flower deletion w/ VLAN prio Rx steering
             - dwmac-rk: fix oob read in rk_gmac_setup
      
         - ice: time stamping fixes
      
         - systemport: add global locking for descriptor life cycle"
      
      * tag 'net-5.16-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (89 commits)
        bpf, selftests: Fix racing issue in btf_skc_cls_ingress test
        selftest/bpf: Add a test that reads various addresses.
        bpf: Fix extable address check.
        bpf: Fix extable fixup offset.
        bpf, selftests: Add test case trying to taint map value pointer
        bpf: Make 32->64 bounds propagation slightly more robust
        bpf: Fix signed bounds propagation after mov32
        sit: do not call ipip6_dev_free() from sit_init_net()
        net: systemport: Add global locking for descriptor lifecycle
        net/smc: Prevent smc_release() from long blocking
        net: Fix double 0x prefix print in SKB dump
        virtio_net: fix rx_drops stat for small pkts
        dsa: mv88e6xxx: fix debug print for SPEED_UNFORCED
        sfc_ef100: potential dereference of null pointer
        net: stmmac: dwmac-rk: fix oob read in rk_gmac_setup
        net: usb: lan78xx: add Allied Telesis AT29M2-AF
        net/packet: rx_owner_map depends on pg_vec
        netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
        dpaa2-eth: fix ethtool statistics
        ixgbe: set X550 MDIO speed before talking to PHY
        ...
      180f3bcf
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 93db8300
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "There are a number of DT fixes, mostly for mistakes found through
        static checking of the dts files again, as well as a couple of minor
        changes to address incorrect DT settings.
      
        For i.MX, there is yet another series of devitree changes to update
        RGMII delay settings for ethernet, which is an ongoing problem after
        some driver changes.
      
        For SoC specific device drivers, a number of smaller fixes came up:
      
         - i.MX SoC identification was incorrectly registered non-i.MX
           machines when the driver is built-in
      
         - One fix on imx8m-blk-ctrl driver to get i.MX8MM MIPI reset work
           properly
      
         - a few compile fixes for warnings that get in the way of -Werror
      
         - a string overflow in the scpi firmware driver
      
         - a boot failure with FORTIFY_SOURCE on Rockchips machines
      
         - broken error handling in the AMD TEE driver
      
         - a revert for a tegra reset driver commit that broke HDA"
      
      * tag 'soc-fixes-5.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (25 commits)
        soc/tegra: fuse: Fix bitwise vs. logical OR warning
        firmware: arm_scpi: Fix string overflow in SCPI genpd driver
        soc: imx: Register SoC device only on i.MX boards
        soc: imx: imx8m-blk-ctrl: Fix imx8mm mipi reset
        ARM: dts: imx6ull-pinfunc: Fix CSI_DATA07__ESAI_TX0 pad name
        arm64: dts: imx8mq: remove interconnect property from lcdif
        ARM: socfpga: dts: fix qspi node compatible
        arm64: dts: apple: add #interrupt-cells property to pinctrl nodes
        dt-bindings: i2c: apple,i2c: allow multiple compatibles
        arm64: meson: remove COMMON_CLK
        arm64: meson: fix dts for JetHub D1
        tee: amdtee: fix an IS_ERR() vs NULL bug
        arm64: dts: apple: change ethernet0 device type to ethernet
        arm64: dts: ten64: remove redundant interrupt declaration for gpio-keys
        arm64: dts: rockchip: fix poweroff on helios64
        arm64: dts: rockchip: fix audio-supply for Rock Pi 4
        arm64: dts: rockchip: fix rk3399-leez-p710 vcc3v3-lan supply
        arm64: dts: rockchip: fix rk3308-roc-cc vcc-sd supply
        arm64: dts: rockchip: remove mmc-hs400-enhanced-strobe from rk3399-khadas-edge
        ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up
        ...
      93db8300
    • Jakub Kicinski's avatar
      Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 0c3e2474
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2021-12-16
      
      We've added 15 non-merge commits during the last 7 day(s) which contain
      a total of 12 files changed, 434 insertions(+), 30 deletions(-).
      
      The main changes are:
      
      1) Fix incorrect verifier state pruning behavior for <8B register spill/fill,
         from Paul Chaignon.
      
      2) Fix x86-64 JIT's extable handling for fentry/fexit when return pointer
         is an ERR_PTR(), from Alexei Starovoitov.
      
      3) Fix 3 different possibilities that BPF verifier missed where unprivileged
         could leak kernel addresses, from Daniel Borkmann.
      
      4) Fix xsk's poll behavior under need_wakeup flag, from Magnus Karlsson.
      
      5) Fix an oob-write in test_verifier due to a missed MAX_NR_MAPS bump,
         from Kumar Kartikeya Dwivedi.
      
      6) Fix a race in test_btf_skc_cls_ingress selftest, from Martin KaFai Lau.
      
      * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        bpf, selftests: Fix racing issue in btf_skc_cls_ingress test
        selftest/bpf: Add a test that reads various addresses.
        bpf: Fix extable address check.
        bpf: Fix extable fixup offset.
        bpf, selftests: Add test case trying to taint map value pointer
        bpf: Make 32->64 bounds propagation slightly more robust
        bpf: Fix signed bounds propagation after mov32
        bpf, selftests: Update test case for atomic cmpxchg on r0 with pointer
        bpf: Fix kernel address leakage in atomic cmpxchg's r0 aux reg
        bpf, selftests: Add test case for atomic fetch on spilled pointer
        bpf: Fix kernel address leakage in atomic fetch
        selftests/bpf: Fix OOB write in test_verifier
        xsk: Do not sleep in poll() when need_wakeup set
        selftests/bpf: Tests for state pruning with u32 spill/fill
        bpf: Fix incorrect state pruning for <8B spill/fill
      ====================
      
      Link: https://lore.kernel.org/r/20211216210005.13815-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0c3e2474
    • Martin KaFai Lau's avatar
      bpf, selftests: Fix racing issue in btf_skc_cls_ingress test · c2fcbf81
      Martin KaFai Lau authored
      The libbpf CI reported occasional failure in btf_skc_cls_ingress:
      
        test_syncookie:FAIL:Unexpected syncookie states gen_cookie:80326634 recv_cookie:0
        bpf prog error at line 97
      
      "error at line 97" means the bpf prog cannot find the listening socket
      when the final ack is received.  It then skipped processing
      the syncookie in the final ack which then led to "recv_cookie:0".
      
      The problem is the userspace program did not do accept() and went
      ahead to close(listen_fd) before the kernel (and the bpf prog) had
      a chance to process the final ack.
      
      The fix is to add accept() call so that the userspace will wait for
      the kernel to finish processing the final ack first before close()-ing
      everything.
      
      Fixes: 9a856cae ("bpf: selftest: Add test_btf_skc_cls_ingress")
      Reported-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Signed-off-by: default avatarMartin KaFai Lau <kafai@fb.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20211216191630.466151-1-kafai@fb.com
      c2fcbf81
    • Alexei Starovoitov's avatar
      selftest/bpf: Add a test that reads various addresses. · 7edc3fcb
      Alexei Starovoitov authored
      Add a function to bpf_testmod that returns invalid kernel and user addresses.
      Then attach an fexit program to that function that tries to read
      memory through these addresses.
      
      This logic checks that bpf_probe_read_kernel and BPF_PROBE_MEM logic is sane.
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      7edc3fcb
    • Alexei Starovoitov's avatar
      bpf: Fix extable address check. · 588a25e9
      Alexei Starovoitov authored
      The verifier checks that PTR_TO_BTF_ID pointer is either valid or NULL,
      but it cannot distinguish IS_ERR pointer from valid one.
      
      When offset is added to IS_ERR pointer it may become small positive
      value which is a user address that is not handled by extable logic
      and has to be checked for at the runtime.
      
      Tighten BPF_PROBE_MEM pointer check code to prevent this case.
      
      Fixes: 4c5de127 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.")
      Reported-by: default avatarLorenzo Fontana <lorenzo.fontana@elastic.co>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      588a25e9
    • Alexei Starovoitov's avatar
      bpf: Fix extable fixup offset. · 433956e9
      Alexei Starovoitov authored
      The prog - start_of_ldx is the offset before the faulting ldx to the location
      after it, so this will be used to adjust pt_regs->ip for jumping over it and
      continuing, and with old temp it would have been fixed up to the wrong offset,
      causing crash.
      
      Fixes: 4c5de127 ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.")
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Reviewed-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      433956e9
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · a52a8e9e
      Linus Torvalds authored
      Pull clk fix from Stephen Boyd:
       "A single fix for the clk framework that needed some more bake time in
        linux-next.
      
        The problem is that two clks being registered at the same time can
        lead to a busted clk tree if the parent isn't fully registered by the
        time the child finds the parent. We rejigger the place where we mark
        the parent as fully registered so that the child can't find the parent
        until things are proper"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: Don't parent clks until the parent is fully registered
      a52a8e9e
    • Daniel Borkmann's avatar
      bpf, selftests: Add test case trying to taint map value pointer · b1a7288d
      Daniel Borkmann authored
      Add a test case which tries to taint map value pointer arithmetic into a
      unknown scalar with subsequent export through the map.
      
      Before fix:
      
        # ./test_verifier 1186
        #1186/u map access: trying to leak tained dst reg FAIL
        Unexpected success to load!
        verification time 24 usec
        stack depth 8
        processed 15 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
        #1186/p map access: trying to leak tained dst reg FAIL
        Unexpected success to load!
        verification time 8 usec
        stack depth 8
        processed 15 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
        Summary: 0 PASSED, 0 SKIPPED, 2 FAILED
      
      After fix:
      
        # ./test_verifier 1186
        #1186/u map access: trying to leak tained dst reg OK
        #1186/p map access: trying to leak tained dst reg OK
        Summary: 2 PASSED, 0 SKIPPED, 0 FAILED
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Reviewed-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      b1a7288d