Skip to content
  1. Jun 30, 2023
  2. Jun 29, 2023
    • Paolo Abeni's avatar
      Merge branch 'fix-ptp-received-on-wrong-port-with-bridged-sja1105-dsa' · 5998bb76
      Paolo Abeni authored
      Vladimir Oltean says:
      
      ====================
      Fix PTP received on wrong port with bridged SJA1105 DSA
      
      Since the changes were made to tag_8021q to support imprecise RX for
      bridged ports, the tag_sja1105 driver still prefers the source port
      information deduced from the VLAN headers for link-local traffic, even
      though the switch can theoretically do better and report the precise
      source port.
      
      The problem is that the tagger doesn't know when to trust one source of
      information over another, because the INCL_SRCPT option (to "tag" link
      local frames) is sometimes enabled and sometimes it isn't.
      
      The first patch makes the switch provide the hardware tag for link local
      traffic under all circumstances, and the second patch makes the tagger
      always use that hardware tag as primary source of information for link
      local packets.
      ====================
      
      Link: https://lore.kernel.org/r/20230627094207.3385231-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      5998bb76
    • Vladimir Oltean's avatar
      net: dsa: tag_sja1105: always prefer source port information from INCL_SRCPT · c1ae02d8
      Vladimir Oltean authored
      
      
      Currently the sja1105 tagging protocol prefers using the source port
      information from the VLAN header if that is available, falling back to
      the INCL_SRCPT option if it isn't. The VLAN header is available for all
      frames except for META frames initiated by the switch (containing RX
      timestamps), and thus, the "if (is_link_local)" branch is practically
      dead.
      
      The tag_8021q source port identification has become more loose
      ("imprecise") and will report a plausible rather than exact bridge port,
      when under a bridge (be it VLAN-aware or VLAN-unaware). But link-local
      traffic always needs to know the precise source port. With incorrect
      source port reporting, for example PTP traffic over 2 bridged ports will
      all be seen on sockets opened on the first such port, which is incorrect.
      
      Now that the tagging protocol has been changed to make link-local frames
      always contain source port information, we can reverse the order of the
      checks so that we always give precedence to that information (which is
      always precise) in lieu of the tag_8021q VID which is only precise for a
      standalone port.
      
      Fixes: d7f9787a ("net: dsa: tag_8021q: add support for imprecise RX based on the VBID")
      Fixes: 91495f21 ("net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c1ae02d8
    • Vladimir Oltean's avatar
      net: dsa: sja1105: always enable the INCL_SRCPT option · b4638af8
      Vladimir Oltean authored
      
      
      Link-local traffic on bridged SJA1105 ports is sometimes tagged by the
      hardware with source port information (when the port is under a VLAN
      aware bridge).
      
      The tag_8021q source port identification has become more loose
      ("imprecise") and will report a plausible rather than exact bridge port,
      when under a bridge (be it VLAN-aware or VLAN-unaware). But link-local
      traffic always needs to know the precise source port.
      
      Modify the driver logic (and therefore: the tagging protocol itself) to
      always include the source port information with link-local packets,
      regardless of whether the port is standalone, under a VLAN-aware or
      VLAN-unaware bridge. This makes it possible for the tagging driver to
      give priority to that information over the tag_8021q VLAN header.
      
      The big drawback with INCL_SRCPT is that it makes it impossible to
      distinguish between an original MAC DA of 01:80:C2:XX:YY:ZZ and
      01:80:C2:AA:BB:ZZ, because the tagger just patches MAC DA bytes 3 and 4
      with zeroes. Only if PTP RX timestamping is enabled, the switch will
      generate a META follow-up frame containing the RX timestamp and the
      original bytes 3 and 4 of the MAC DA. Those will be used to patch up the
      original packet. Nonetheless, in the absence of PTP RX timestamping, we
      have to live with this limitation, since it is more important to have
      the more precise source port information for link-local traffic.
      
      Fixes: d7f9787a ("net: dsa: tag_8021q: add support for imprecise RX based on the VBID")
      Fixes: 91495f21 ("net: dsa: tag_8021q: replace the SVL bridging with VLAN-unaware IVL bridging")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b4638af8
    • Paolo Abeni's avatar
      Merge branch 'fix-ptp-packet-drops-with-ocelot-8021q-dsa-tag-protocol' · e999c897
      Paolo Abeni authored
      Vladimir Oltean says:
      
      ====================
      Fix PTP packet drops with ocelot-8021q DSA tag protocol
      
      Changes in v2:
      - Distinguish between L2 and L4 PTP packets
      v1 at:
      https://lore.kernel.org/netdev/20230626154003.3153076-1-vladimir.oltean@nxp.com/
      
      Patch 3/3 fixes an issue with the ocelot/felix driver, where it would
      drop PTP traffic on RX unless hardware timestamping for that packet type
      was enabled.
      
      Fixing that requires the driver to know whether it had previously
      configured the hardware to timestamp PTP packets on that port. But it
      cannot correctly determine that today using the existing code structure,
      so patches 1/3 and 2/3 fix the control path of the code such that
      ocelot->ports[port]->trap_proto faithfully reflects whether that
      configuration took place.
      ====================
      
      Link: https://lore.kernel.org/r/20230627163114.3561597-1-vladimir.oltean@nxp.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      e999c897
    • Vladimir Oltean's avatar
      net: dsa: felix: don't drop PTP frames with tag_8021q when RX timestamping is disabled · 2edcfcbb
      Vladimir Oltean authored
      
      
      The driver implements a workaround for the fact that it doesn't have an
      IRQ source to tell it whether PTP frames are available through the
      extraction registers, for those frames to be processed and passed
      towards the network stack. That workaround is to configure the switch,
      through felix_hwtstamp_set() -> felix_update_trapping_destinations(),
      to create two copies of PTP packets: one sent over Ethernet to the DSA
      master, and one to be consumed through the aforementioned CPU extraction
      queue registers.
      
      The reason why we want PTP packets to be consumed through the CPU
      extraction registers in the first place is because we want to see their
      hardware RX timestamp. With tag_8021q, that is only visible that way,
      and it isn't visible with the copy of the packet that's transmitted over
      Ethernet.
      
      The problem with the workaround implementation is that it drops the
      packet received over Ethernet, in expectation of its copy being present
      in the CPU extraction registers. However, if felix_hwtstamp_set() hasn't
      run (aka PTP RX timestamping is disabled), the driver will drop the
      original PTP frame and there will be no copy of it in the CPU extraction
      registers. So, the network stack will simply not see any PTP frame.
      
      Look at the port's trapping configuration to see whether the driver has
      previously enabled the CPU extraction registers. If it hasn't, just
      don't RX timestamp the frame and let it be passed up the stack by DSA,
      which is perfectly fine.
      
      Fixes: 0a6f17c6 ("net: dsa: tag_ocelot_8021q: add support for PTP timestamping")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      2edcfcbb
    • Vladimir Oltean's avatar
      net: mscc: ocelot: don't keep PTP configuration of all ports in single structure · 45d0fcb5
      Vladimir Oltean authored
      
      
      In a future change, the driver will need to determine whether PTP RX
      timestamping is enabled on a port (including whether traps were set up
      on that port in particular) and that is currently not possible.
      
      The driver supports different RX filters (L2, L4) and kinds of TX
      timestamping (one-step, two-step) on its ports, but it saves all
      configuration in a single struct hwtstamp_config that is global to the
      switch. So, the latest timestamping configuration on one port
      (including a request to disable timestamping) affects what gets reported
      for all ports, even though the configuration itself is still individual
      to each port.
      
      The port timestamping configurations are only coupled because of the
      common structure, so replace the hwtstamp_config with a mask of trapped
      protocols saved per port. We also have the ptp_cmd to distinguish
      between one-step and two-step PTP timestamping, so with those 2 bits of
      information we can fully reconstruct a descriptive struct
      hwtstamp_config for each port, during the SIOCGHWTSTAMP ioctl.
      
      Fixes: 4e3b0468 ("net: mscc: PTP Hardware Clock (PHC) support")
      Fixes: 96ca08c0 ("net: mscc: ocelot: set up traps for PTP packets")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      45d0fcb5
    • Vladimir Oltean's avatar
      net: mscc: ocelot: don't report that RX timestamping is enabled by default · 4fd44b82
      Vladimir Oltean authored
      
      
      PTP RX timestamping should be enabled when the user requests it, not by
      default. If it is enabled by default, it can be problematic when the
      ocelot driver is a DSA master, and it sidesteps what DSA tries to avoid
      through __dsa_master_hwtstamp_validate().
      
      Additionally, after the change which made ocelot trap PTP packets only
      to the CPU at ocelot_hwtstamp_set() time, it is no longer even true that
      RX timestamping is enabled by default, because until ocelot_hwtstamp_set()
      is called, the PTP traps are actually not set up. So the rx_filter field
      of ocelot->hwtstamp_config reflects an incorrect reality.
      
      Fixes: 96ca08c0 ("net: mscc: ocelot: set up traps for PTP packets")
      Fixes: 4e3b0468 ("net: mscc: PTP Hardware Clock (PHC) support")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      4fd44b82
    • Paolo Abeni's avatar
      Merge branch 'net-sched-act_ipt-bug-fixes' · 3c4bb45a
      Paolo Abeni authored
      Florian Westphal says:
      
      ====================
      net/sched: act_ipt bug fixes
      
      v3: prefer skb_header() helper in patch 2.  No other changes.
      I've retained Acks and RvB-Tags of v2.
      
      While checking if netfilter could be updated to replace selected
      instances of NF_DROP with kfree_skb_reason+NF_STOLEN to improve
      debugging info via drop monitor I found that act_ipt is incompatible
      with such an approach.  Moreover, it lacks multiple sanity checks
      to avoid certain code paths that make assumptions that the tc layer
      doesn't meet, such as header sanity checks, availability of skb_dst,
      skb_nfct() and so on.
      
      act_ipt test in the tc selftest still pass with this applied.
      
      I think that we should consider removal of this module, while
      this should take care of all problems, its ipv4 only and I don't
      think there are any netfilter targets that lack a native tc
      equivalent, even when ignoring bpf.
      ====================
      
      Link: https://lore.kernel.org/r/20230627123813.3036-1-fw@strlen.de
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      3c4bb45a
    • Florian Westphal's avatar
      net/sched: act_ipt: zero skb->cb before calling target · 93d75d47
      Florian Westphal authored
      
      
      xtables relies on skb being owned by ip stack, i.e. with ipv4
      check in place skb->cb is supposed to be IPCB.
      
      I don't see an immediate problem (REJECT target cannot be used anymore
      now that PRE/POSTROUTING hook validation has been fixed), but better be
      safe than sorry.
      
      A much better patch would be to either mark act_ipt as
      "depends on BROKEN" or remove it altogether. I plan to do this
      for -next in the near future.
      
      This tc extension is broken in the sense that tc lacks an
      equivalent of NF_STOLEN verdict.
      
      With NF_STOLEN, target function takes complete ownership of skb, caller
      cannot dereference it anymore.
      
      ACT_STOLEN cannot be used for this: it has a different meaning, caller
      is allowed to dereference the skb.
      
      At this time NF_STOLEN won't be returned by any targets as far as I can
      see, but this may change in the future.
      
      It might be possible to work around this via list of allowed
      target extensions known to only return DROP or ACCEPT verdicts, but this
      is error prone/fragile.
      
      Existing selftest only validates xt_LOG and act_ipt is restricted
      to ipv4 so I don't think this action is used widely.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      93d75d47
    • Florian Westphal's avatar
      net/sched: act_ipt: add sanity checks on skb before calling target · b2dc32dc
      Florian Westphal authored
      
      
      Netfilter targets make assumptions on the skb state, for example
      iphdr is supposed to be in the linear area.
      
      This is normally done by IP stack, but in act_ipt case no
      such checks are made.
      
      Some targets can even assume that skb_dst will be valid.
      Make a minimum effort to check for this:
      
      - Don't call the targets eval function for non-ipv4 skbs.
      - Don't call the targets eval function for POSTROUTING
        emulation when the skb has no dst set.
      
      v3: use skb_protocol helper (Davide Caratti)
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b2dc32dc
    • Florian Westphal's avatar
      net/sched: act_ipt: add sanity checks on table name and hook locations · b4ee9338
      Florian Westphal authored
      
      
      Looks like "tc" hard-codes "mangle" as the only supported table
      name, but on kernel side there are no checks.
      
      This is wrong.  Not all xtables targets are safe to call from tc.
      E.g. "nat" targets assume skb has a conntrack object assigned to it.
      Normally those get called from netfilter nat core which consults the
      nat table to obtain the address mapping.
      
      "tc" userspace either sets PRE or POSTROUTING as hook number, but there
      is no validation of this on kernel side, so update netlink policy to
      reject bogus numbers.  Some targets may assume skb_dst is set for
      input/forward hooks, so prevent those from being used.
      
      act_ipt uses the hook number in two places:
      1. the state hook number, this is fine as-is
      2. to set par.hook_mask
      
      The latter is a bit mask, so update the assignment to make
      xt_check_target() to the right thing.
      
      Followup patch adds required checks for the skb/packet headers before
      calling the targets evaluation function.
      
      Fixes: 1da177e4 ("Linux-2.6.12-rc2")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      b4ee9338
    • Chengfeng Ye's avatar
      sctp: fix potential deadlock on &net->sctp.addr_wq_lock · 6feb37b3
      Chengfeng Ye authored
      
      
      As &net->sctp.addr_wq_lock is also acquired by the timer
      sctp_addr_wq_timeout_handler() in protocal.c, the same lock acquisition
      at sctp_auto_asconf_init() seems should disable irq since it is called
      from sctp_accept() under process context.
      
      Possible deadlock scenario:
      sctp_accept()
          -> sctp_sock_migrate()
          -> sctp_auto_asconf_init()
          -> spin_lock(&net->sctp.addr_wq_lock)
              <timer interrupt>
              -> sctp_addr_wq_timeout_handler()
              -> spin_lock_bh(&net->sctp.addr_wq_lock); (deadlock here)
      
      This flaw was found using an experimental static analysis tool we are
      developing for irq-related deadlock.
      
      The tentative patch fix the potential deadlock by spin_lock_bh().
      
      Signed-off-by: default avatarChengfeng Ye <dg573847474@gmail.com>
      Fixes: 34e5b011 ("sctp: delay auto_asconf init until binding the first addr")
      Acked-by: default avatarXin Long <lucien.xin@gmail.com>
      Link: https://lore.kernel.org/r/20230627120340.19432-1-dg573847474@gmail.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      6feb37b3
    • Moritz Fischer's avatar
      net: lan743x: Don't sleep in atomic context · 7a8227b2
      Moritz Fischer authored
      
      
      dev_set_rx_mode() grabs a spin_lock, and the lan743x implementation
      proceeds subsequently to go to sleep using readx_poll_timeout().
      
      Introduce a helper wrapping the readx_poll_timeout_atomic() function
      and use it to replace the calls to readx_polL_timeout().
      
      Fixes: 23f0703c ("lan743x: Add main source files for new lan743x driver")
      Cc: stable@vger.kernel.org
      Cc: Bryan Whitehead <bryan.whitehead@microchip.com>
      Cc: UNGLinuxDriver@microchip.com
      Signed-off-by: default avatarMoritz Fischer <moritzf@google.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Link: https://lore.kernel.org/r/20230627035000.1295254-1-moritzf@google.com
      
      
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7a8227b2
    • Linus Torvalds's avatar
      Merge tag 'net-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 3a8a670e
      Linus Torvalds authored
      Pull networking changes from Jakub Kicinski:
       "WiFi 7 and sendpage changes are the biggest pieces of work for this
        release. The latter will definitely require fixes but I think that we
        got it to a reasonable point.
      
        Core:
      
         - Rework the sendpage & splice implementations
      
           Instead of feeding data into sockets page by page extend sendmsg
           handlers to support taking a reference on the data, controlled by a
           new flag called MSG_SPLICE_PAGES
      
           Rework the handling of unexpected-end-of-file to invoke an
           additional callback instead of trying to predict what the right
           combination of MORE/NOTLAST flags is
      
           Remove the MSG_SENDPAGE_NOTLAST flag completely
      
         - Implement SCM_PIDFD, a new type of CMSG type analogous to
           SCM_CREDENTIALS, but it contains pidfd instead of plain pid
      
         - Enable socket busy polling with CONFIG_RT
      
         - Improve reliability and efficiency of reporting for ref_tracker
      
         - Auto-generate a user space C library for various Netlink families
      
        Protocols:
      
         - Allow TCP to shrink the advertised window when necessary, prevent
           sk_rcvbuf auto-tuning from growing the window all the way up to
           tcp_rmem[2]
      
         - Use per-VMA locking for "page-flipping" TCP receive zerocopy
      
         - Prepare TCP for device-to-device data transfers, by making sure
           that payloads are always attached to skbs as page frags
      
         - Make the backoff time for the first N TCP SYN retransmissions
           linear. Exponential backoff is unnecessarily conservative
      
         - Create a new MPTCP getsockopt to retrieve all info
           (MPTCP_FULL_INFO)
      
         - Avoid waking up applications using TLS sockets until we have a full
           record
      
         - Allow using kernel memory for protocol ioctl callbacks, paving the
           way to issuing ioctls over io_uring
      
         - Add nolocalbypass option to VxLAN, forcing packets to be fully
           encapsulated even if they are destined for a local IP address
      
         - Make TCPv4 use consistent hash in TIME_WAIT and SYN_RECV. Ensure
           in-kernel ECMP implementation (e.g. Open vSwitch) select the same
           link for all packets. Support L4 symmetric hashing in Open vSwitch
      
         - PPPoE: make number of hash bits configurable
      
         - Allow DNS to be overwritten by DHCPACK in the in-kernel DHCP client
           (ipconfig)
      
         - Add layer 2 miss indication and filtering, allowing higher layers
           (e.g. ACL filters) to make forwarding decisions based on whether
           packet matched forwarding state in lower devices (bridge)
      
         - Support matching on Connectivity Fault Management (CFM) packets
      
         - Hide the "link becomes ready" IPv6 messages by demoting their
           printk level to debug
      
         - HSR: don't enable promiscuous mode if device offloads the proto
      
         - Support active scanning in IEEE 802.15.4
      
         - Continue work on Multi-Link Operation for WiFi 7
      
        BPF:
      
         - Add precision propagation for subprogs and callbacks. This allows
           maintaining verification efficiency when subprograms are used, or
           in fact passing the verifier at all for complex programs,
           especially those using open-coded iterators
      
         - Improve BPF's {g,s}setsockopt() length handling. Previously BPF
           assumed the length is always equal to the amount of written data.
           But some protos allow passing a NULL buffer to discover what the
           output buffer *should* be, without writing anything
      
         - Accept dynptr memory as memory arguments passed to helpers
      
         - Add routing table ID to bpf_fib_lookup BPF helper
      
         - Support O_PATH FDs in BPF_OBJ_PIN and BPF_OBJ_GET commands
      
         - Drop bpf_capable() check in BPF_MAP_FREEZE command (used to mark
           maps as read-only)
      
         - Show target_{obj,btf}_id in tracing link fdinfo
      
         - Addition of several new kfuncs (most of the names are
           self-explanatory):
            - Add a set of new dynptr kfuncs: bpf_dynptr_adjust(),
              bpf_dynptr_is_null(), bpf_dynptr_is_rdonly(), bpf_dynptr_size()
              and bpf_dynptr_clone().
            - bpf_task_under_cgroup()
            - bpf_sock_destroy() - force closing sockets
            - bpf_cpumask_first_and(), rework bpf_cpumask_any*() kfuncs
      
        Netfilter:
      
         - Relax set/map validation checks in nf_tables. Allow checking
           presence of an entry in a map without using the value
      
         - Increase ip_vs_conn_tab_bits range for 64BIT builds
      
         - Allow updating size of a set
      
         - Improve NAT tuple selection when connection is closing
      
        Driver API:
      
         - Integrate netdev with LED subsystem, to allow configuring HW
           "offloaded" blinking of LEDs based on link state and activity
           (i.e. packets coming in and out)
      
         - Support configuring rate selection pins of SFP modules
      
         - Factor Clause 73 auto-negotiation code out of the drivers, provide
           common helper routines
      
         - Add more fool-proof helpers for managing lifetime of MDIO devices
           associated with the PCS layer
      
         - Allow drivers to report advanced statistics related to Time Aware
           scheduler offload (taprio)
      
         - Allow opting out of VF statistics in link dump, to allow more VFs
           to fit into the message
      
         - Split devlink instance and devlink port operations
      
        New hardware / drivers:
      
         - Ethernet:
            - Synopsys EMAC4 IP support (stmmac)
            - Marvell 88E6361 8 port (5x1GE + 3x2.5GE) switches
            - Marvell 88E6250 7 port switches
            - Microchip LAN8650/1 Rev.B0 PHYs
            - MediaTek MT7981/MT7988 built-in 1GE PHY driver
      
         - WiFi:
            - Realtek RTL8192FU, 2.4 GHz, b/g/n mode, 2T2R, 300 Mbps
            - Realtek RTL8723DS (SDIO variant)
            - Realtek RTL8851BE
      
         - CAN:
            - Fintek F81604
      
        Drivers:
      
         - Ethernet NICs:
            - Intel (100G, ice):
               - support dynamic interrupt allocation
               - use meta data match instead of VF MAC addr on slow-path
            - nVidia/Mellanox:
               - extend link aggregation to handle 4, rather than just 2 ports
               - spawn sub-functions without any features by default
            - OcteonTX2:
               - support HTB (Tx scheduling/QoS) offload
               - make RSS hash generation configurable
               - support selecting Rx queue using TC filters
            - Wangxun (ngbe/txgbe):
               - add basic Tx/Rx packet offloads
               - add phylink support (SFP/PCS control)
            - Freescale/NXP (enetc):
               - report TAPRIO packet statistics
            - Solarflare/AMD:
               - support matching on IP ToS and UDP source port of outer
                 header
               - VxLAN and GENEVE tunnel encapsulation over IPv4 or IPv6
               - add devlink dev info support for EF10
      
         - Virtual NICs:
            - Microsoft vNIC:
               - size the Rx indirection table based on requested
                 configuration
               - support VLAN tagging
            - Amazon vNIC:
               - try to reuse Rx buffers if not fully consumed, useful for ARM
                 servers running with 16kB pages
            - Google vNIC:
               - support TCP segmentation of >64kB frames
      
         - Ethernet embedded switches:
            - Marvell (mv88e6xxx):
               - enable USXGMII (88E6191X)
            - Microchip:
               - lan966x: add support for Egress Stage 0 ACL engine
               - lan966x: support mapping packet priority to internal switch
                 priority (based on PCP or DSCP)
      
         - Ethernet PHYs:
            - Broadcom PHYs:
               - support for Wake-on-LAN for BCM54210E/B50212E
               - report LPI counter
            - Microsemi PHYs: support RGMII delay configuration (VSC85xx)
            - Micrel PHYs: receive timestamp in the frame (LAN8841)
            - Realtek PHYs: support optional external PHY clock
            - Altera TSE PCS: merge the driver into Lynx PCS which it is a
              variant of
      
         - CAN: Kvaser PCIEcan:
            - support packet timestamping
      
         - WiFi:
            - Intel (iwlwifi):
               - major update for new firmware and Multi-Link Operation (MLO)
               - configuration rework to drop test devices and split the
                 different families
               - support for segmented PNVM images and power tables
               - new vendor entries for PPAG (platform antenna gain) feature
            - Qualcomm 802.11ax (ath11k):
               - Multiple Basic Service Set Identifier (MBSSID) and Enhanced
                 MBSSID Advertisement (EMA) support in AP mode
               - support factory test mode
            - RealTek (rtw89):
               - add RSSI based antenna diversity
               - support U-NII-4 channels on 5 GHz band
            - RealTek (rtl8xxxu):
               - AP mode support for 8188f
               - support USB RX aggregation for the newer chips"
      
      * tag 'net-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1602 commits)
        net: scm: introduce and use scm_recv_unix helper
        af_unix: Skip SCM_PIDFD if scm->pid is NULL.
        net: lan743x: Simplify comparison
        netlink: Add __sock_i_ino() for __netlink_diag_dump().
        net: dsa: avoid suspicious RCU usage for synced VLAN-aware MAC addresses
        Revert "af_unix: Call scm_recv() only after scm_set_cred()."
        phylink: ReST-ify the phylink_pcs_neg_mode() kdoc
        libceph: Partially revert changes to support MSG_SPLICE_PAGES
        net: phy: mscc: fix packet loss due to RGMII delays
        net: mana: use vmalloc_array and vcalloc
        net: enetc: use vmalloc_array and vcalloc
        ionic: use vmalloc_array and vcalloc
        pds_core: use vmalloc_array and vcalloc
        gve: use vmalloc_array and vcalloc
        octeon_ep: use vmalloc_array and vcalloc
        net: usb: qmi_wwan: add u-blox 0x1312 composition
        perf trace: fix MSG_SPLICE_PAGES build error
        ipvlan: Fix return value of ipvlan_queue_xmit()
        netfilter: nf_tables: fix underflow in chain reference counter
        netfilter: nf_tables: unbind non-anonymous set if rule construction fails
        ...
      3a8a670e
    • Linus Torvalds's avatar
      Merge tag 'v6.5-rc1-sysctl-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 6a8cbd92
      Linus Torvalds authored
      Pull sysctl updates from Luis Chamberlain:
       "The changes for sysctl are in line with prior efforts to stop usage of
        deprecated routines which incur recursion and also make it hard to
        remove the empty array element in each sysctl array declaration.
      
        The most difficult user to modify was parport which required a bit of
        re-thinking of how to declare shared sysctls there, Joel Granados has
        stepped up to the plate to do most of this work and eventual removal
        of register_sysctl_table(). That work ended up saving us about 1465
        bytes according to bloat-o-meter. Since we gained a few bloat-o-meter
        karma points I moved two rather small sysctl arrays from
        kernel/sysctl.c leaving us only two more sysctl arrays to move left.
      
        Most changes have been tested on linux-next for about a month. The
        last straggler patches are a minor parport fix, changes to the sysctl
        kernel selftest so to verify correctness and prevent regressions for
        the future change he made to provide an alternative solution for the
        special sysctl mount point target which was using the now deprecated
        sysctl child element.
      
        This is all prep work to now finally be able to remove the empty array
        element in all sysctl declarations / registrations which is expected
        to save us a bit of bytes all over the kernel. That work will be
        tested early after v6.5-rc1 is out"
      
      * tag 'v6.5-rc1-sysctl-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        sysctl: replace child with an enumeration
        sysctl: Remove debugging dump_stack
        test_sysclt: Test for registering a mount point
        test_sysctl: Add an option to prevent test skip
        test_sysctl: Add an unregister sysctl test
        test_sysctl: Group node sysctl test under one func
        test_sysctl: Fix test metadata getters
        parport: plug a sysctl register leak
        sysctl: move security keys sysctl registration to its own file
        sysctl: move umh sysctl registration to its own file
        signal: move show_unhandled_signals sysctl to its own file
        sysctl: remove empty dev table
        sysctl: Remove register_sysctl_table
        sysctl: Refactor base paths registrations
        sysctl: stop exporting register_sysctl_table
        parport: Removed sysctl related defines
        parport: Remove register_sysctl_table from parport_default_proc_register
        parport: Remove register_sysctl_table from parport_device_proc_register
        parport: Remove register_sysctl_table from parport_proc_register
        parport: Move magic number "15" to a define
      6a8cbd92
    • Linus Torvalds's avatar
      Merge tag 'v6.5-rc1-modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · 4e3c09e9
      Linus Torvalds authored
      Pull module updates from Luis Chamberlain:
       "The changes queued up for modules are pretty tame, mostly code removal
        of moving of code.
      
        Only two minor functional changes are made, the only one which stands
        out is Sebastian Andrzej Siewior's simplification of module reference
        counting by removing preempt_disable() and that has been tested on
        linux-next for well over a month without no regressions.
      
        I'm now, I guess, also a kitchen sink for some kallsyms changes"
      
      [ There was a mis-communication about the concurrent module load changes
        that I had expected to come through Luis despite me authoring the
        patch. So some of the module updates were left hanging in the email
        ether, and I just committed them separately.
      
        It's my bad - I should have made it more clear that I expected my
        own patches to come through the module tree too. Now they missed
        linux-next, but hopefully that won't cause any issues    - Linus ]
      
      * tag 'v6.5-rc1-modules-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        kallsyms: make kallsyms_show_value() as generic function
        kallsyms: move kallsyms_show_value() out of kallsyms.c
        kallsyms: remove unsed API lookup_symbol_attrs
        kallsyms: remove unused arch_get_kallsym() helper
        module: Remove preempt_disable() from module reference counting.
      4e3c09e9
    • Linus Torvalds's avatar
      modules: catch concurrent module loads, treat them as idempotent · 9b9879fc
      Linus Torvalds authored
      This is the new-and-improved attempt at avoiding huge memory load spikes
      when the user space boot sequence tries to load hundreds (or even
      thousands) of redundant duplicate modules in parallel.
      
      See commit 9828ed3f ("module: error out early on concurrent load of
      the same module file") for background and an earlier failed attempt that
      was reverted.
      
      That earlier attempt just said "concurrently loading the same module is
      silly, just open the module file exclusively and return -ETXTBSY if
      somebody else is already loading it".
      
      While it is true that concurrent module loads of the same module is
      silly, the reason that earlier attempt then failed was that the
      concurrently loaded module would often be a prerequisite for another
      module.
      
      Thus failing to load the prerequisite would then cause cascading
      failures of the other modules, rather than just short-circuiting that
      one unnecessary module load.
      
      At the same time, we still really don't want to load the contents of the
      same module file hundreds of times, only to then wait for an eventually
      successful load, and have everybody else return -EEXIST.
      
      As a result, this takes another approach, and treats concurrent module
      loads from the same file as "idempotent" in the inode.  So if one module
      load is ongoing, we don't start a new one, but instead just wait for the
      first one to complete and return the same return value as it did.
      
      So unlike the first attempt, this does not return early: the intent is
      not to speed up the boot, but to avoid a thundering herd problem in
      allocating memory (both physical and virtual) for a module more than
      once.
      
      Also note that this does change behavior: it used to be that when you
      had concurrent loads, you'd have one "winner" that would return success,
      and everybody else would return -EEXIST.
      
      In contrast, this idempotent logic goes all Oprah on the problem, and
      says "You are a winner! And you are a winner! We are ALL winners".  But
      since there's no possible actual real semantic difference between "you
      loaded the module" and "somebody else already loaded the module", this
      is more of a feel-good change than an actual honest-to-goodness semantic
      change.
      
      Of course, any true Johnny-come-latelies that don't get caught in the
      concurrency filter will still return -EEXIST.  It's no different from
      not even getting a seat at an Oprah taping.  That's life.
      
      See the long thread on the kernel mailing list about this all, which
      includes some numbers for memory use before and after the patch.
      
      Link: https://lore.kernel.org/lkml/20230524213620.3509138-1-mcgrof@kernel.org/
      
      
      Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
      Tested-by: default avatarJohan Hovold <johan@kernel.org>
      Tested-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      Tested-by: default avatarDan Williams <dan.j.williams@intel.com>
      Tested-by: default avatarRudi Heitbaum <rudi@heitbaum..com>
      Tested-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9b9879fc
    • Linus Torvalds's avatar
      module: split up 'finit_module()' into init_module_from_file() helper · 054a7300
      Linus Torvalds authored
      
      
      This will simplify the next step, where we can then key off the inode to
      do one idempotent module load.
      
      Let's do the obvious re-organization in one step, and then the new code
      in another.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      054a7300
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 89181f54
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Allow synchronous detection of (e)MMC/SD/SDIO cards
         - Fixup error check for ioctls for SPI hosts
         - Disable broken SD-Cache support for Kingston Canvas Go Plus from 2019
         - Disable broken eMMC-Trim support for Kingston EMMC04G-M627
         - Disable broken eMMC-Trim support for Micron MTFC4GACAJCN-1M
      
        MMC host:
         - bcm2835: Convert DT bindings to YAML
         - mmci:
            - Enable asynchronous probe
            - Transform the ux500 HW-busy detection into a proper state machine
            - Add support for SW busy-end timeouts for the ux500 variants
         - mmci_stm32:
            - Add support for sdm32 variant revision v3.0 used on STM32MP25
            - Improve the tuning sequence
         - mtk-sd: Tune polling-period to improve performance
         - sdhci: Fixup DMA configuration for 64-bit DMA mode
         - sdhci-bcm-kona: Convert DT bindings to YAML
         - sdhci-msm:
            - Switch to use the new ICE API
            - Add support for the SC8280XP/IPQ6018/QDU1000/QRU1000 variants
         - sdhci-pci-gli:
            - Add support SD Express cards for GL9767
            - Add support for the Genesys Logic GL9767 variant"
      
      * tag 'mmc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (42 commits)
        dt-bindings: mmc: fsl-imx-esdhc: Add imx6ul support
        mmc: mmci: Add support for SW busy-end timeouts
        mmc: Add MMC_QUIRK_BROKEN_SD_CACHE for Kingston Canvas Go Plus from 11/2019
        mmc: core: disable TRIM on Kingston EMMC04G-M627
        mmc: mmci: stm32: add delay block support for STM32MP25
        mmc: mmci: stm32: prepare other delay block support
        mmc: mmci: stm32: manage block gap hardware flow control
        mmc: mmci: Add support for sdmmc variant revision v3.0
        mmc: mmci: add stm32_idmabsize_align parameter
        dt-bindings: mmc: mmci: Add st,stm32mp25-sdmmc2 compatible
        mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
        mmc: mmci: Break out a helper function
        mmc: mmci: Use a switch statement machine
        mmc: mmci: Use state machine state as exit condition
        mmc: mmci: Retry the busy start condition
        mmc: mmci: Make busy complete state machine explicit
        mmc: mmci: Break out error check in busy detect
        mmc: mmci: Stash status while waiting for busy
        mmc: mmci: Unwind big if() clause
        mmc: mmci: Clear busy_status when starting command
        ...
      89181f54
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 1364b406
      Linus Torvalds authored
      Pull mtd updates from
       "Core MTD changes:
         - otp:
            - Put factory OTP/NVRAM into the entropy pool
            - Clean up on error in mtd_otp_nvmem_add()
      
        MTD devices changes:
         - sm_ftl: Fix typos in comments
         - Use SPDX license headers
         - pismo: Switch back to use i2c_driver's .probe()
         - mtdpart: Drop useless LIST_HEAD
         - st_spi_fsm: Use the devm_clk_get_enabled() helper function
      
        DT binding changes:
         - partitions:
            - Include TP-Link SafeLoader in allowed list
            - Add missing type for "linux,rootfs"
         - Extend the nand node names filter
         - Create a file for raw NAND chip properties
         - Mark nand-ecc-placement deprecated
         - Describe nand-ecc-mode
         - Prevent NAND chip unevaluated properties in all NAND bindings with
           a NAND chip reference.
         - Qcom: Fix a property position
         - Marvell: Convert to YAML DT schema
      
        Raw NAND chip drivers changes:
         - Macronix: OTP access for MX30LFxG18AC
         - Add basic Sandisk manufacturer ops
         - Add support for Sandisk SDTNQGAMA
      
        Raw NAND controller driver changes:
         - Meson:
            - Replace integer consts with proper defines
            - Allow waiting w/o wired ready/busy pin
            - Check buffer length validity
            - Fix unaligned DMA buffers handling
            - dt-bindings: Fix 'nand-rb' property
         - Arasan: Revert "mtd: rawnand: arasan: Prevent an unsupported
           configuration" as this limitation is no longer true thanks to the
           recent efforts in improving the clocks support in this driver
      
        SPI-NAND changes:
         - Gigadevice: add support for GD5F2GQ5xExxH
         - Macronix: Add support for serial NAND flashes"
      
      * tag 'mtd/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (38 commits)
        dt-bindings: mtd: marvell-nand: Convert to YAML DT scheme
        dt-bindings: mtd: ti,am654: Prevent unevaluated properties
        dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml
        dt-bindings: mtd: stm32: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
        dt-bindings: mtd: qcom: Fix a property position
        dt-bindings: mtd: Describe nand-ecc-mode
        dt-bindings: mtd: Mark nand-ecc-placement deprecated
        dt-bindings: mtd: Create a file for raw NAND chip properties
        dt-bindings: mtd: Accept nand related node names
        mtd: sm_ftl: Fix typos in comments
        mtd: otp: clean up on error in mtd_otp_nvmem_add()
        ...
      1364b406
    • Linus Torvalds's avatar
      Merge tag 'spi-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 84fccbba
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "One small core feature this time around but mostly driver improvements
        and additions for SPI:
      
         - Add support for controlling the idle state of MOSI, some systems
           can support this and depending on the system integration may need
           it to avoid glitching in some situations
      
         - Support for polling mode in the S3C64xx driver and DMA on the
           Qualcomm QSPI driver
      
         - Support for several Allwinner SoCs, AMD Pensando Elba, Intel Mount
           Evans, Renesas RZ/V2M, and ST STM32H7"
      
      * tag 'spi-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (66 commits)
        spi: dt-bindings: atmel,at91rm9200-spi: fix broken sam9x7 compatible
        spi: dt-bindings: atmel,at91rm9200-spi: add sam9x7 compatible
        spi: Add support for Renesas CSI
        spi: dt-bindings: Add bindings for RZ/V2M CSI
        spi: sun6i: Use the new helper to derive the xfer timeout value
        spi: atmel: Prevent false timeouts on long transfers
        spi: dt-bindings: stm32: do not disable spi-slave property for stm32f4-f7
        spi: Create a helper to derive adaptive timeouts
        spi: spi-geni-qcom: correctly handle -EPROBE_DEFER from dma_request_chan()
        spi: stm32: disable spi-slave property for stm32f4-f7
        spi: stm32: introduction of stm32h7 SPI device mode support
        spi: stm32: use dmaengine_terminate_{a}sync instead of _all
        spi: stm32: renaming of spi_master into spi_controller
        spi: dw: Remove misleading comment for Mount Evans SoC
        spi: dt-bindings: snps,dw-apb-ssi: Add compatible for Intel Mount Evans SoC
        spi: dw: Add compatible for Intel Mount Evans SoC
        spi: s3c64xx: Use dev_err_probe()
        spi: s3c64xx: Use the managed spi master allocation function
        spi: spl022: Probe defer is no error
        spi: spi-imx: fix mixing of native and gpio chipselects for imx51/imx53/imx6 variants
        ...
      84fccbba