1. 02 Feb, 2024 23 commits
    • Michal Koutný's avatar
      net/sched: Load modules via their alias · 2c15a5ae
      Michal Koutný authored
      The cls_,sch_,act_ modules may be loaded lazily during network
      configuration but without user's awareness and control.
      
      Switch the lazy loading from canonical module names to a module alias.
      This allows finer control over lazy loading, the precedent from
      commit 7f78e035 ("fs: Limit sys_mount to only request filesystem
      modules.") explains it already:
      
      	Using aliases means user space can control the policy of which
      	filesystem^W net/sched modules are auto-loaded by editing
      	/etc/modprobe.d/*.conf with blacklist and alias directives.
      	Allowing simple, safe, well understood work-arounds to known
      	problematic software.
      
      By default, nothing changes. However, if a specific module is
      blacklisted (its canonical name), it won't be modprobe'd when requested
      under its alias (i.e. kernel auto-loading). It would appear as if the
      given module was unknown.
      
      The module can still be loaded under its canonical name, which is an
      explicit (privileged) user action.
      Signed-off-by: default avatarMichal Koutný <mkoutny@suse.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20240201130943.19536-4-mkoutny@suse.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2c15a5ae
    • Michal Koutný's avatar
      net/sched: Add module aliases for cls_,sch_,act_ modules · 241a94ab
      Michal Koutný authored
      No functional change intended, aliases will be used in followup commits.
      Note for backporters: you may need to add aliases also for modules that
      are already removed in mainline kernel but still in your version.
      
      Patches were generated with the help of Coccinelle scripts like:
      
      cat >scripts/coccinelle/misc/tcf_alias.cocci <<EOD
      virtual patch
      virtual report
      
      @ haskernel @
      @@
      
      @ tcf_has_kind depends on report && haskernel @
      identifier ops;
      constant K;
      @@
      
        static struct tcf_proto_ops ops = {
          .kind = K,
          ...
        };
      +char module_alias = K;
      EOD
      
      /usr/bin/spatch -D report --cocci-file scripts/coccinelle/misc/tcf_alias.cocci \
              --dir . \
              -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include \
              -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi \
              -I ./include/uapi -I ./include/generated/uapi \
              --include ./include/linux/compiler-version.h --include ./include/linux/kconfig.h \
              --jobs 8 --chunksize 1 2>/dev/null | \
              sed 's/char module_alias = "\([^"]*\)";/MODULE_ALIAS_NET_CLS("\1");/'
      
      And analogously for:
      
        static struct tc_action_ops ops = {
          .kind = K,
      
        static struct Qdisc_ops ops = {
          .id = K,
      
      (Someone familiar would be able to fit those into one .cocci file
      without sed post processing.)
      Signed-off-by: default avatarMichal Koutný <mkoutny@suse.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20240201130943.19536-3-mkoutny@suse.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      241a94ab
    • Michal Koutný's avatar
      net/sched: Add helper macros with module names · b2657700
      Michal Koutný authored
      The macros are preparation for adding module aliases en mass in a
      separate commit.
      Although it would be tempting to create aliases like cls-foo for name
      cls_foo, this could not be used because modprobe utilities treat '-' and
      '_' interchangeably.
      In the end, the naming follows pattern of proto modules in linux/net.h.
      Signed-off-by: default avatarMichal Koutný <mkoutny@suse.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20240201130943.19536-2-mkoutny@suse.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b2657700
    • David S. Miller's avatar
      Merge tag 'batadv-next-pullrequest-20240201' of git://git.open-mesh.org/linux-merge · d81c0792
      David S. Miller authored
      Simon Wunderlich says:
      
      ====================
      This cleanup patchset includes the following patches:
      
       - bump version strings, by Simon Wunderlich
      
       - Improve error handling in DAT and uevent generator,
         by Markus Elfring (2 patches)
      
       - Drop usage of export.h, by Sven Eckelmann
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d81c0792
    • Kunwu Chan's avatar
      net: dccp: Simplify the allocation of slab caches in dccp_ackvec_init · 20ea9327
      Kunwu Chan authored
      Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
      to simplify the creation of SLAB caches.
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      20ea9327
    • Ravi Gunasekaran's avatar
      dt-bindings: net: ti: Update maintainers list · 84f90efd
      Ravi Gunasekaran authored
      Update the list with the current maintainers of TI's CPSW ethernet
      peripheral.
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      Acked-by: default avatarRoger Quadros <rogerq@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84f90efd
    • Kunwu Chan's avatar
      sctp: Simplify the allocation of slab caches · fa33b35f
      Kunwu Chan authored
      commit 0a31bd5f ("KMEM_CACHE(): simplify slab cache creation")
      introduces a new macro.
      Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
      to simplify the creation of SLAB caches.
      Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Acked-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa33b35f
    • David S. Miller's avatar
      Merge branch 'octeontx2-af-dynamically-allocate-BPIDs' · 49d703c8
      David S. Miller authored
      Geetha sowjanya says:
      
      ====================
      Dynamically allocate BPIDs for LBK
      
      In current driver 64 BPIDs are reserved for LBK interfaces.
      These bpids are 1-to-1 mapped to LBK interface channel numbers.
      In some usecases one LBK interface required more than one bpids
      and in some case they may not require at all. These usescas
      can't be address with the current implementation as it always
      reserves only one bpid per LBK channel.
      
      This patch addresses this issue by creating free bpid pool from
      these 64 bpids instead of 1-to-1 mapping to the lbk channel.
      Now based on usecase LBK interface can request a bpid using (bp_enable()).
      
      v1 -> v2:
         - Modified commit message.
         - Dropped patch2, as for now rvu netdev have no usecase. Will
           be upstream along with the CPT driver.
         - Addressed review comments by Simon Horman.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49d703c8
    • Geetha sowjanya's avatar
      octeontx2-af: Cleanup loopback device checks · ae703539
      Geetha sowjanya authored
      PCI device IDs of RVU device IDs are configurable and
      RVU PF0's (ie AF's) are currently assumed as VFs that
      identify loopback functionality ie LBKVFs. But in some
      cases these VFs can be setup for different functionality.
      Hence remove assumptions that AF's VFs are always LBK VFs
      by renaming 'is_afvf' as 'is_lbkvf' explicitly and also
      identify LBK VF using PCI dev ID. Similar change is done
      for other VF types.
      Signed-off-by: default avatarGeetha sowjanya <gakula@marvell.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ae703539
    • Geetha sowjanya's avatar
      octeontx2-af: Create BPIDs free pool · d6212d2e
      Geetha sowjanya authored
      In current driver 64 BPIDs are reserved for LBK interfaces.
      These bpids are 1-to-1 mapped to LBK interface channel numbers.
      In some usecases one LBK interface required more than one
      bpids and in some case they may not require at all.
      These usescase can't be address with the current implementation
      as it always reserves only one bpid per LBK channel.
      This patch addresses this issue by creating free bpid pool from these
      64 bpids instead of 1-to-1 mapping to the lbk channel.
      Now based on usecase LBK interface can request a bpid using (bp_enable()).
      
      This patch also reduces the number of bpids for cgx interfaces to 8
      and adds proper error code
      Signed-off-by: default avatarGeetha sowjanya <gakula@marvell.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6212d2e
    • Brad Cowie's avatar
      selftests: openvswitch: Test ICMP related matches work with SNAT · 094bdd48
      Brad Cowie authored
      Add a test case for regression in openvswitch nat that was fixed by
      commit e6345d28 ("netfilter: nf_nat: fix action not being set for
      all ct states").
      
      Link: https://lore.kernel.org/netdev/20231221224311.130319-1-brad@faucet.nz/
      Link: https://mail.openvswitch.org/pipermail/ovs-dev/2024-January/410476.htmlSuggested-by: default avatarAaron Conole <aconole@redhat.com>
      Signed-off-by: default avatarBrad Cowie <brad@faucet.nz>
      Tested-by: default avatarAaron Conole <aconole@redhat.com>
      Acked-by: default avatarAaron Conole <aconole@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      094bdd48
    • Alexander Stein's avatar
      net: phy: dp83867: Add support for active-low LEDs · 447b80a9
      Alexander Stein authored
      Add the led_polarity_set callback for setting LED polarity.
      Signed-off-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      447b80a9
    • David S. Miller's avatar
      Merge branch 'net-ipq4019-rate' · 969337a4
      David S. Miller authored
      Christian Marangi says:
      
      ====================
      net: mdio-ipq4019: fix wrong default MDC rate
      
      This was a long journey to arrive and discover this problem.
      
      To not waste too much char, there is a race problem with PHY and driver
      probe. This was observed with Aquantia PHY firmware loading.
      
      With some hacks the race problem was workarounded but an interesting
      thing was notice. It took more than a minute for the firmware to load
      via MDIO.
      
      This was strange as the same operation was done by UBoot in at max 5
      second and the same data was loaded.
      
      A similar problem was observed on a mtk board that also had an
      Aquantia PHY where the load was very slow. It was notice that the cause
      was the MDIO bus running at a very low speed and the firmware
      was missing a property (present in mtk sdk) that set the right frequency
      to the MDIO bus.
      
      It was fun to find that THE VERY SAME PROBLEM is present on IPQ in a
      different form. The MDIO apply internally a division to the feed clock
      resulting in the bus running at 390KHz instead of 6.25Mhz.
      
      Searching around the web for some documentation and some include and
      analyzing the uboot codeflow resulted in the divider being set wrongly
      at /256 instead of /16 as the value was actually never set.
      Applying the value restore the original load time for the Aquantia PHY.
      
      This series mainly handle this by adding support for the "clock-frequency"
      property.
      
      Changes v3:
      - Add Reviewed-by tag
      - Fix english grammar error in comment
      - Drop DTS patch
      Changes v2:
      - Use DIV_ROUND_UP
      - Introduce logic to chose a default value for 802.3 spec 2.5MHz
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      969337a4
    • Christian Marangi's avatar
      net: mdio: ipq4019: add support for clock-frequency property · bdce82e9
      Christian Marangi authored
      The IPQ4019 MDIO internally divide the clock feed by AHB based on the
      MDIO_MODE reg. On reset or power up, the default value for the
      divider is 0xff that reflect the divider set to /256.
      
      This makes the MDC run at a very low rate, that is, considering AHB is
      always fixed to 100Mhz, a value of 390KHz.
      
      This hasn't have been a problem as MDIO wasn't used for time sensitive
      operation, it is now that on IPQ807x is usually mounted with PHY that
      requires MDIO to load their firmware (example Aquantia PHY).
      
      To handle this problem and permit to set the correct designed MDC
      frequency for the SoC add support for the standard "clock-frequency"
      property for the MDIO node.
      
      The divider supports value from /1 to /256 and the common value are to
      set it to /16 to reflect 6.25Mhz or to /8 on newer platform to reflect
      12.5Mhz.
      
      To scan if the requested rate is supported by the divider, loop with
      each supported divider and stop when the requested rate match the final
      rate with the current divider. An error is returned if the rate doesn't
      match any value.
      
      On MDIO reset, the divider is restored to the requested value to prevent
      any kind of downclocking caused by the divider reverting to a default
      value.
      
      To follow 802.3 spec of 2.5MHz of default value, if divider is set at
      /256 and "clock-frequency" is not set in DT, assume nobody set the
      divider and try to find the closest MDC rate to 2.5MHz. (in the case of
      AHB set to 100MHz, it's 1.5625MHz)
      
      While at is also document other bits of the MDIO_MODE reg to have a
      clear idea of what is actually applied there.
      
      Documentation of some BITs is skipped as they are marked as reserved and
      their usage is not clear (RES 11:9 GENPHY 16:13 RES1 19:17)
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bdce82e9
    • Christian Marangi's avatar
      dt-bindings: net: ipq4019-mdio: document now supported clock-frequency · 9484b955
      Christian Marangi authored
      Document support for clock-frequency and add details on why this
      property is needed and what values are supported.
      
      From internal documentation, while other values are supported, the
      correct function of the MDIO bus is not assured hence add only the
      suggested supported values to the property enum.
      Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9484b955
    • Jakub Kicinski's avatar
      Merge branch 'net-ipa-simplify-tx-power-handling' · 747056a9
      Jakub Kicinski authored
      Alex Elder says:
      
      ====================
      net: ipa: simplify TX power handling
      
      In order to deliver a packet to the IPA hardware, we must ensure
      it is powered.  We request power by calling pm_runtime_get(), and
      its return value tells us the power state.  We can't block in
      ipa_start_xmit(), so if power isn't enabled we prevent further
      transmit attempts by calling netif_stop_queue().  Power will
      eventually become enabled, at which point we call netif_wake_queue()
      to allow the transmit to be retried.  When it does, the power should
      be enabled, so the packet delivery can proceed.
      
      The logic that handles this is convoluted, and was put in place
      to address a race condition pointed out by Jakub Kicinski during
      review.  The fix addressed that race, as well as another one that
      was found while investigating it:
        b8e36e13 ("net: ipa: fix TX queue race")
      I have wanted to simplify this code ever since, and I'm pleased to
      report that this series implements a much better solution that
      avoids both race conditions.
      
      The first race occurs between the ->ndo_start_xmit thread and the
      runtime resume thread.  If we find power is not enabled when
      requested in ipa_start_xmit(), we stop queueing.  But there's a
      chance the runtime resume will enable queuing just before that,
      leaving queueing stopped forever.  A flag is used to ensure that
      does not occur.
      
      A second flag is used to prevent NETDEV_TX_BUSY from being returned
      repeatedly during the small window between enabling queueing and
      finishing power resume.  This can happen if resume was underway when
      pm_runtime_get() was called and completes immediately afterward.
      This condition only exists because of the use of the first flag.
      
      The fix is to disable transmit for *every* call to ipa_start_xmit(),
      disabling it *before* calling pm_runtime_get().  This leaves three
      cases:
        - If the return value indicates power is not active (or is in
          transition), queueing remains disabled--thereby avoiding
          the race between disabling it and a concurrent power thread
          enabling it.
        - If pm_runtime_get() returns an error, we drop the packet and
          re-enable queueing.
        - Finally, if the hardware is powered, we re-enable queueing
          before delivering the packet to the hardware.
      
      So the first race is avoided.  And as a result, the second condition
      will not occur.
      
      The first patch adds pointers to the TX and RX IPA endpoints in the
      netdev private data.  The second patch has netif_stop_queue() be
      called for all packets; if pm_runtime_get() indicates power is
      enabled (or an error), netif_wake_queue() is called to enable it
      again.  The third and fourth patches get rid of the STARTED and
      STOPPED IPA power flags, as well as the power spinlock, because they
      are no longer needed.  The last three patches just eliminate some
      trivial functions, open-coding them instead.
      ====================
      
      Link: https://lore.kernel.org/r/20240130192305.250915-1-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      747056a9
    • Alex Elder's avatar
      net: ipa: kill ipa_power_modem_queue_wake() · e01bbdc9
      Alex Elder authored
      All ipa_power_modem_queue_wake() does is call netif_wake_queue()
      on the modem netdev.  There is no need to wrap that call in a
      trivial function (and certainly not one defined in "ipa_power.c").
      
      So get rid of ipa_power_modem_queue_wake(), and replace its one
      caller with a direct call to netif_wake_queue().  Determine the
      netdev pointer to use from the private TX endpoint's netdev pointer.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-8-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e01bbdc9
    • Alex Elder's avatar
      net: ipa: kill ipa_power_modem_queue_active() · 2acf5fc8
      Alex Elder authored
      All ipa_power_modem_queue_active() does now is call netif_wake_queue().
      Just call netif_wake_queue() in the two places it's needed, and get
      rid of ipa_power_modem_queue_active().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-7-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2acf5fc8
    • Alex Elder's avatar
      net: ipa: kill ipa_power_modem_queue_stop() · 30cdaea2
      Alex Elder authored
      All ipa_power_modem_queue_stop() does now is call netif_stop_queue().
      Just call netif_stop_queue() in the one place it's needed, and get
      rid of ipa_power_modem_queue_stop().
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-6-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      30cdaea2
    • Alex Elder's avatar
      net: ipa: kill the IPA power STOPPED flag · 86c9a492
      Alex Elder authored
      Currently the STOPPED IPA power flag is used to indicate that the
      transmit queue has been stopped.  Previously this was used to avoid
      setting the STARTED flag unless the queue had already been stopped.
      It meant transmit queuing would be enabled on resume if it was
      stopped by the transmit path--and if so, it ensured it only got
      enabled once.
      
      We only stop the transmit queue in the transmit path.  The STARTED
      flag has been removed, and it causes no real harm to enable
      transmits when they're already enabled.  So we can get rid of
      the STOPPED flag and call netif_wake_queue() unconditionally.
      
      This makes the IPA power spinlock unnecessary, so it can be removed
      as well.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-5-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      86c9a492
    • Alex Elder's avatar
      net: ipa: kill the STARTED IPA power flag · 688de12f
      Alex Elder authored
      A transmit on the modem netdev can only complete if the IPA hardware
      is powered.  Currently, if a transmit request arrives when the
      hardware was not powered, further transmits are be stopped to allow
      power-up to complete.  Once power-up completes, transmits are once
      again enabled.
      
      Runtime resume can complete at the same time a transmit request is
      being handled, and previously there was a race between stopping and
      restarting transmits.  The STARTED flag was used to ensure the
      stop request in the transmit path was skipped if the start request
      in the runtime resume path had already occurred.
      
      Now, the queue is *always* stopped in the transmit path, *before*
      determining whether power is ACTIVE.  If power is found to already
      be active (or if the socket buffer is gets dropped), transmit is
      re-enabled.  Otherwise it will (always) be enabled after runtime
      resume completes.
      
      The race between transmit and runtime resume no longer exists, so
      there is no longer any need to maintain the STARTED flag.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-4-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      688de12f
    • Alex Elder's avatar
      net: ipa: begin simplifying TX queue stop · 844ecc4a
      Alex Elder authored
      There are a number of flags used in the IPA driver to attempt to
      manage race conditions that can occur between runtime resume and
      netdev transmit.  If we disable TX before requesting power, we can
      avoid these races entirely, simplifying things considerably.
      
      This patch implements the main change, disabling transmit always in
      the net_device->ndo_start_xmit() callback, then re-enabling it again
      whenever we find power is active (or when we drop the skb).
      
      The patches that follow will refactor the "old" code to the point
      that most of it can be eliminated.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-3-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      844ecc4a
    • Alex Elder's avatar
      net: ipa: stash modem TX and RX endpoints · 102c28b8
      Alex Elder authored
      Rather than repeatedly looking up the endpoints in the name map,
      save the modem TX and RX endpoint pointers in the netdev private
      area.
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Link: https://lore.kernel.org/r/20240130192305.250915-2-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      102c28b8
  2. 01 Feb, 2024 17 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · cf244463
      Jakub Kicinski authored
      Cross-merge networking fixes after downstream PR.
      
      No conflicts or adjacent changes.
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      cf244463
    • Linus Torvalds's avatar
      Merge tag 'net-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 41b9fb38
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter.
      
        As Paolo promised we continue to hammer out issues in our selftests.
        This is not the end but probably the peak.
      
        Current release - regressions:
      
         - smc: fix incorrect SMC-D link group matching logic
      
        Current release - new code bugs:
      
         - eth: bnxt: silence WARN() when device skips a timestamp, it happens
      
        Previous releases - regressions:
      
         - ipmr: fix null-deref when forwarding mcast packets
      
         - conntrack: evaluate window negotiation only for packets in the
           REPLY direction, otherwise SYN retransmissions trigger incorrect
           window scale negotiation
      
         - ipset: fix performance regression in swap operation
      
        Previous releases - always broken:
      
         - tcp: add sanity checks to types of pages getting into the rx
           zerocopy path, we only support basic NIC -> user, no page cache
           pages etc.
      
         - ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()
      
         - nt_tables: more input sanitization changes
      
         - dsa: mt7530: fix 10M/100M speed on MediaTek MT7988 switch
      
         - bridge: mcast: fix loss of snooping after long uptime, jiffies do
           wrap on 32bit
      
         - xen-netback: properly sync TX responses, protect with locking
      
         - phy: mediatek-ge-soc: sync calibration values with MediaTek SDK,
           increase connection stability
      
         - eth: pds: fixes for various teardown, and reset races
      
        Misc:
      
         - hsr: silence WARN() if we can't alloc supervision frame, it
           happens"
      
      * tag 'net-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (82 commits)
        doc/netlink/specs: Add missing attr in rt_link spec
        idpf: avoid compiler padding in virtchnl2_ptype struct
        selftests: mptcp: join: stop transfer when check is done (part 2)
        selftests: mptcp: join: stop transfer when check is done (part 1)
        selftests: mptcp: allow changing subtests prefix
        selftests: mptcp: decrease BW in simult flows
        selftests: mptcp: increase timeout to 30 min
        selftests: mptcp: add missing kconfig for NF Mangle
        selftests: mptcp: add missing kconfig for NF Filter in v6
        selftests: mptcp: add missing kconfig for NF Filter
        mptcp: fix data re-injection from stale subflow
        selftests: net: enable some more knobs
        selftests: net: add missing config for NF_TARGET_TTL
        selftests: forwarding: List helper scripts in TEST_FILES Makefile variable
        selftests: net: List helper scripts in TEST_FILES Makefile variable
        selftests: net: Remove executable bits from library scripts
        selftests: bonding: Check initial state
        selftests: team: Add missing config options
        hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove
        xen-netback: properly sync TX responses
        ...
      41b9fb38
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 91481c90
      Linus Torvalds authored
      Pull parisc architecture fixes from Helge Deller:
       "The current exception handler, which helps on kernel accesses to
        userspace, may exhibit data corruption. The problem is that it is not
        guaranteed that the compiler will use the processor register we
        specified in the source code, but may choose another register which
        then will lead to silent register- and data corruption. To fix this
        issue we now use another strategy to help the exception handler to
        always find and set the error code into the correct CPU register.
      
        The other fixes are small: fixing CPU hotplug bringup, fix the page
        alignment of the RO_DATA section, added a check for the calculated
        cache stride and fix possible hangups when printing longer output at
        bootup when running on serial console.
      
        Most of the patches are tagged for stable series.
      
         - Fix random data corruption triggered by exception handler
      
         - Fix crash when setting up BTLB at CPU bringup
      
         - Prevent hung tasks when printing inventory on serial console
      
         - Make RO_DATA page aligned in vmlinux.lds.S
      
         - Add check for valid cache stride size"
      
      * tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: BTLB: Fix crash when setting up BTLB at CPU bringup
        parisc: Fix random data corruption from exception handler
        parisc: Drop unneeded semicolon in parse_tree_node()
        parisc: Prevent hung tasks when printing inventory on serial console
        parisc: Check for valid stride size for cache flushes
        parisc: Make RO_DATA page aligned in vmlinux.lds.S
      91481c90
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.8' of... · a4126826
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix UML build with clang-18 and newer
      
       - Avoid using the alias attribute in host programs
      
       - Replace tabs with spaces when followed by conditionals for future GNU
         Make versions
      
       - Fix rpm-pkg for the systemd-provided kernel-install tool
      
       - Fix the undefined behavior in Kconfig for a 'int' symbol used in a
         conditional
      
      * tag 'kbuild-fixes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: initialize sym->curr.tri to 'no' for all symbol types again
        kbuild: rpm-pkg: simplify installkernel %post
        kbuild: Replace tabs with spaces when followed by conditionals
        modpost: avoid using the alias attribute
        kbuild: fix W= flags in the help message
        modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS
        um: Fix adding '-no-pie' for clang
        kbuild: defconf: use SRCARCH to find merged configs
      a4126826
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · cfdf0c09
      Linus Torvalds authored
      Pull nfsd fix from Chuck Lever:
      
       - Fix a recent backchannel timeout fix
      
      * tag 'nfsd-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        NFSv4.1: Assign the right value for initval and retries for rpc timeout
      cfdf0c09
    • Linus Torvalds's avatar
      Merge tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat · 49a4be2c
      Linus Torvalds authored
      Pull exfat fix from Namjae Jeon:
      
       - Fix BUG in iov_iter_revert reported from syzbot
      
      * tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat:
        exfat: fix zero the unwritten part for dio read
      49a4be2c
    • Linus Torvalds's avatar
      Merge tag 'hid-for-linus-2024020101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 5c24e4e9
      Linus Torvalds authored
      Pull HID fixes from Benjamin Tissoires:
      
       - cleanups in the error path in hid-steam (Dan Carpenter)
      
       - fixes for Wacom tablets selftests that sneaked in while the CI was
         taking a break during the year end holidays (Benjamin Tissoires)
      
       - null pointer check in nvidia-shield (Kunwu Chan)
      
       - memory leak fix in hidraw (Su Hui)
      
       - another null pointer fix in i2c-hid-of (Johan Hovold)
      
       - another memory leak fix in HID-BPF this time, as well as a double
         fdget() fix reported by Dan Carpenter (Benjamin Tissoires)
      
       - fix for Cirque touchpad when they go on suspend (Kai-Heng Feng)
      
       - new device ID in hid-logitech-hidpp: "Logitech G Pro X SuperLight 2"
         (Jiri Kosina)
      
      * tag 'hid-for-linus-2024020101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: bpf: use __bpf_kfunc instead of noinline
        HID: bpf: actually free hdev memory after attaching a HID-BPF program
        HID: bpf: remove double fdget()
        HID: i2c-hid-of: fix NULL-deref on failed power up
        HID: hidraw: fix a problem of memory leak in hidraw_release()
        HID: i2c-hid: Skip SET_POWER SLEEP for Cirque touchpad on system suspend
        HID: nvidia-shield: Add missing null pointer checks to LED initialization
        HID: logitech-hidpp: add support for Logitech G Pro X Superlight 2
        selftests/hid: wacom: fix confidence tests
        HID: hid-steam: Fix cleanup in probe()
        HID: hid-steam: remove pointless error message
      5c24e4e9
    • Linus Torvalds's avatar
      Merge tag 'firewire-fixes-6.8-rc3' of... · f6cdd897
      Linus Torvalds authored
      Merge tag 'firewire-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
      
      Pull firewire fixes from Takashi Sakamoto:
       "FireWire subsystem now supports the legacy layout of configuration
        ROM, while it appears that some of DV devices in the early 2000's have
        the legacy layout with a quirk. This includes some changes to handle
        the quirk"
      
      * tag 'firewire-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
        firewire: core: search descriptor leaf just after vendor directory entry in root directory
        firewire: core: correct documentation of fw_csr_string() kernel API
      f6cdd897
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 6a864c09
      Linus Torvalds authored
      Pull spi fix from Mark Brown:
       "One simple fix for a minor but valid issue with constants overflowing
        identified via cppcheck"
      
      * tag 'spi-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sh-msiof: avoid integer overflow in constants
      6a864c09
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.8-rc2' of... · 4b561d10
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "The main set of fixes here are for the PWM regulator, fixing
        bootstrapping issues on some platforms where the hardware setup looked
        like it was out of spec for the constraints we have for the regulator
        causing us to make spurious and unhelpful changes to try to bring
        things in line with the constraints.
      
        There's also a couple of other driver specific fixes"
      
      * tag 'regulator-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator (max5970): Fix IRQ handler
        regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register
        regulator: pwm-regulator: Manage boot-on with disabled PWM channels
        regulator: pwm-regulator: Calculate the output voltage for disabled PWMs
        regulator: pwm-regulator: Add validity checks in continuous .get_voltage
      4b561d10
    • Linus Torvalds's avatar
      Merge tag 'v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 8a2514c0
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "Fix regressions in caam and qat"
      
      * tag 'v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - fix asynchronous hash
        crypto: qat - fix arbiter mapping generation algorithm for QAT 402xx
      8a2514c0
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20240131' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · 6d805afa
      Linus Torvalds authored
      Pull lsm fixes from Paul Moore:
       "Two small patches to fix some problems relating to LSM hook return
        values and how the individual LSMs interact"
      
      * tag 'lsm-pr-20240131' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        lsm: fix default return value of the socket_getpeersec_*() hooks
        lsm: fix the logic in security_inode_getsecctx()
      6d805afa
    • Jakub Kicinski's avatar
      Merge tag 'batadv-net-pullrequest-20240201' of git://git.open-mesh.org/linux-merge · 4e192be1
      Jakub Kicinski authored
      Simon Wunderlich says:
      
      ====================
      Here are some batman-adv bugfixes:
      
       - fix a timeout issue and a memory leak in batman-adv multicast,
         by Linus Lüssing (2 patches)
      
      * tag 'batadv-net-pullrequest-20240201' of git://git.open-mesh.org/linux-merge:
        batman-adv: mcast: fix memory leak on deleting a batman-adv interface
        batman-adv: mcast: fix mcast packet type counter on timeouted nodes
      ====================
      
      Link: https://lore.kernel.org/r/20240201110110.29129-1-sw@simonwunderlich.deSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4e192be1
    • Donald Hunter's avatar
      doc/netlink/specs: Add missing attr in rt_link spec · 069a6ed2
      Donald Hunter authored
      IFLA_DPLL_PIN was added to rt_link messages but not to the spec, which
      breaks ynl. Add the missing definitions to the rt_link ynl spec.
      
      Fixes: 5f184269 ("netdev: expose DPLL pin handle for netdevice")
      Signed-off-by: default avatarDonald Hunter <donald.hunter@gmail.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/20240201113853.37432-1-donald.hunter@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      069a6ed2
    • Jakub Kicinski's avatar
      Merge tag 'nf-24-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 93561eef
      Jakub Kicinski authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      1) TCP conntrack now only evaluates window negotiation for packets in
         the REPLY direction, from Ryan Schaefer. Otherwise SYN retransmissions
         trigger incorrect window scale negotiation. From Ryan Schaefer.
      
      2) Restrict tunnel objects to NFPROTO_NETDEV which is where it makes sense
         to use this object type.
      
      3) Fix conntrack pick up from the middle of SCTP_CID_SHUTDOWN_ACK packets.
         From Xin Long.
      
      4) Another attempt from Jozsef Kadlecsik to address the slow down of the
         swap command in ipset.
      
      5) Replace a BUG_ON by WARN_ON_ONCE in nf_log, and consolidate check for
         the case that the logger is NULL from the read side lock section.
      
      6) Address lack of sanitization for custom expectations. Restrict layer 3
         and 4 families to what it is supported by userspace.
      
      * tag 'nf-24-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations
        netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger
        netfilter: ipset: fix performance regression in swap operation
        netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new
        netfilter: nf_tables: restrict tunnel object to NFPROTO_NETDEV
        netfilter: conntrack: correct window scaling with retransmitted SYN
      ====================
      
      Link: https://lore.kernel.org/r/20240131225943.7536-1-pablo@netfilter.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      93561eef
    • Pavan Kumar Linga's avatar
      idpf: avoid compiler padding in virtchnl2_ptype struct · f0588b15
      Pavan Kumar Linga authored
      In the arm random config file, kconfig option 'CONFIG_AEABI' is
      disabled which results in adding the compiler flag '-mabi=apcs-gnu'.
      This causes the compiler to add padding in virtchnl2_ptype
      structure to align it to 8 bytes, resulting in the following
      size check failure:
      
      include/linux/build_bug.h:78:41: error: static assertion failed: "(6) == sizeof(struct virtchnl2_ptype)"
            78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
               |                                         ^~~~~~~~~~~~~~
      include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
            77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
               |                                  ^~~~~~~~~~~~~~~
      drivers/net/ethernet/intel/idpf/virtchnl2.h:26:9: note: in expansion of macro 'static_assert'
            26 |         static_assert((n) == sizeof(struct X))
               |         ^~~~~~~~~~~~~
      drivers/net/ethernet/intel/idpf/virtchnl2.h:982:1: note: in expansion of macro 'VIRTCHNL2_CHECK_STRUCT_LEN'
           982 | VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype);
               | ^~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Avoid the compiler padding by using "__packed" structure
      attribute for the virtchnl2_ptype struct. Also align the
      structure by using "__aligned(2)" for better code optimization.
      
      Fixes: 0d7502a9 ("virtchnl: add virtchnl version 2 ops")
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.comReviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
      Reviewed-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarPavan Kumar Linga <pavan.kumar.linga@intel.com>
      Tested-by: default avatarKrishneil Singh  <krishneil.k.singh@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Link: https://lore.kernel.org/r/20240131222241.2087516-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f0588b15
    • Jakub Kicinski's avatar
      Merge branch 'mptcp-fixes-for-recent-issues-reported-by-ci-s' · 79144a81
      Jakub Kicinski authored
      Matthieu Baerts says:
      
      ====================
      mptcp: fixes for recent issues reported by CI's
      
      This series of 9 patches fixes issues mostly identified by CI's not
      managed by the MPTCP maintainers. Thank you Linero (LKFT) and Netdev
      maintainers (NIPA) for running our kunit and selftests tests!
      
      For the first patch, it took a bit of time to identify the root cause.
      Some MPTCP Join selftest subtests have been "flaky", mostly in slow
      environments. It appears to be due to the use of a TCP-specific helper
      on an MPTCP socket. A fix for kernels >= v5.15.
      
      Patches 2 to 4 add missing kernel config to support NetFilter tables
      needed for IPTables commands. These kconfigs are usually enabled in
      default configurations, but apparently not for all architectures.
      Patches 2 and 3 can be backported up to v5.11 and the 4th one up to
      v5.19.
      
      Patch 5 increases the time limit for MPTCP selftests. It appears that
      many CI's execute tests in a VM without acceleration supports, e.g. QEmu
      without KVM. As a result, the tests take longer. Plus, there are more
      and more tests. This patch modifies the timeout added in v5.18.
      
      Patch 6 reduces the maximum rate and delay of the different links in
      some Simult Flows selftest subtests. The goal is to let slow VMs reach
      the maximum speed. The original rate was introduced in v5.11.
      
      Patch 7 lets CI changing the prefix of the subtests titles, to be able
      to run the same selftest multiple times with different parameters. With
      different titles, tests will be considered as different and not override
      previous results as it is the case with some CI envs. Subtests have been
      introduced in v6.6.
      
      Patch 8 and 9 make some MPTCP Join selftest subtests quicker by stopping
      the transfer when the expected events have been seen. Patch 8 can be
      backported up to v6.5.
      Signed-off-by: default avatarMatthieu Baerts (NGI0) <matttbe@kernel.org>
      ====================
      
      Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      79144a81