1. 13 Sep, 2024 27 commits
  2. 12 Sep, 2024 13 commits
    • Linus Torvalds's avatar
      Merge tag 'net-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 5abfdfd4
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from netfilter.
      
        There is a recently notified BT regression with no fix yet. I do not
        think a fix will land in the next week.
      
        Current release - regressions:
      
         - core: tighten bad gso csum offset check in virtio_net_hdr
      
         - netfilter: move nf flowtable bpf initialization in
           nf_flow_table_module_init()
      
         - eth: ice: stop calling pci_disable_device() as we use pcim
      
         - eth: fou: fix null-ptr-deref in GRO.
      
        Current release - new code bugs:
      
         - hsr: prevent NULL pointer dereference in hsr_proxy_announce()
      
        Previous releases - regressions:
      
         - hsr: remove seqnr_lock
      
         - netfilter: nft_socket: fix sk refcount leaks
      
         - mptcp: pm: fix uaf in __timer_delete_sync
      
         - phy: dp83822: fix NULL pointer dereference on DP83825 devices
      
         - eth: revert "virtio_net: rx enable premapped mode by default"
      
         - eth: octeontx2-af: Modify SMQ flush sequence to drop packets
      
        Previous releases - always broken:
      
         - eth: mlx5: fix bridge mode operations when there are no VFs
      
         - eth: igb: Always call igb_xdp_ring_update_tail() under Tx lock"
      
      * tag 'net-6.11-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits)
        net: netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init()
        net: tighten bad gso csum offset check in virtio_net_hdr
        netlink: specs: mptcp: fix port endianness
        net: dpaa: Pad packets to ETH_ZLEN
        mptcp: pm: Fix uaf in __timer_delete_sync
        net: libwx: fix number of Rx and Tx descriptors
        net: dsa: felix: ignore pending status of TAS module when it's disabled
        net: hsr: prevent NULL pointer dereference in hsr_proxy_announce()
        selftests: mptcp: include net_helper.sh file
        selftests: mptcp: include lib.sh file
        selftests: mptcp: join: restrict fullmesh endp on 1st sf
        netfilter: nft_socket: make cgroupsv2 matching work with namespaces
        netfilter: nft_socket: fix sk refcount leaks
        MAINTAINERS: Add ethtool pse-pd to PSE NETWORK DRIVER
        dt-bindings: net: tja11xx: fix the broken binding
        selftests: net: csum: Fix checksums for packets with non-zero padding
        net: phy: dp83822: Fix NULL pointer dereference on DP83825 devices
        virtio_net: disable premapped mode by default
        Revert "virtio_net: big mode skip the unmap check"
        Revert "virtio_net: rx remove premapped failover code"
        ...
      5abfdfd4
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.11-7' of... · 42c5b519
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Ilpo Järvinen:
      
       - asus-wmi: Disable OOBE that interferes with backlight control
      
       - panasonic-laptop: Two fixes to SINF array handling
      
      * tag 'platform-drivers-x86-v6.11-7' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86: asus-wmi: Disable OOBE experience on Zenbook S 16
        platform/x86: panasonic-laptop: Allocate 1 entry extra in the sinf array
        platform/x86: panasonic-laptop: Fix SINF array out of bounds accesses
      42c5b519
    • Linus Torvalds's avatar
      mm: avoid leaving partial pfn mappings around in error case · 79a61cc3
      Linus Torvalds authored
      As Jann points out, PFN mappings are special, because unlike normal
      memory mappings, there is no lifetime information associated with the
      mapping - it is just a raw mapping of PFNs with no reference counting of
      a 'struct page'.
      
      That's all very much intentional, but it does mean that it's easy to
      mess up the cleanup in case of errors.  Yes, a failed mmap() will always
      eventually clean up any partial mappings, but without any explicit
      lifetime in the page table mapping itself, it's very easy to do the
      error handling in the wrong order.
      
      In particular, it's easy to mistakenly free the physical backing store
      before the page tables are actually cleaned up and (temporarily) have
      stale dangling PTE entries.
      
      To make this situation less error-prone, just make sure that any partial
      pfn mapping is torn down early, before any other error handling.
      Reported-and-tested-by: default avatarJann Horn <jannh@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Simona Vetter <simona.vetter@ffwll.ch>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79a61cc3
    • Lorenzo Bianconi's avatar
      net: netfilter: move nf flowtable bpf initialization in nf_flow_table_module_init() · 3e705251
      Lorenzo Bianconi authored
      Move nf flowtable bpf initialization in nf_flow_table module load
      routine since nf_flow_table_bpf is part of nf_flow_table module and not
      nf_flow_table_inet one. This patch allows to avoid the following kernel
      warning running the reproducer below:
      
      $modprobe nf_flow_table_inet
      $rmmod nf_flow_table_inet
      $modprobe nf_flow_table_inet
      modprobe: ERROR: could not insert 'nf_flow_table_inet': Invalid argument
      
      [  184.081501] ------------[ cut here ]------------
      [  184.081527] WARNING: CPU: 0 PID: 1362 at kernel/bpf/btf.c:8206 btf_populate_kfunc_set+0x23c/0x330
      [  184.081550] CPU: 0 UID: 0 PID: 1362 Comm: modprobe Kdump: loaded Not tainted 6.11.0-0.rc5.22.el10.x86_64 #1
      [  184.081553] Hardware name: Red Hat OpenStack Compute, BIOS 1.14.0-1.module+el8.4.0+8855+a9e237a9 04/01/2014
      [  184.081554] RIP: 0010:btf_populate_kfunc_set+0x23c/0x330
      [  184.081558] RSP: 0018:ff22cfb38071fc90 EFLAGS: 00010202
      [  184.081559] RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000000
      [  184.081560] RDX: 000000000000006e RSI: ffffffff95c00000 RDI: ff13805543436350
      [  184.081561] RBP: ffffffffc0e22180 R08: ff13805543410808 R09: 000000000001ec00
      [  184.081562] R10: ff13805541c8113c R11: 0000000000000010 R12: ff13805541b83c00
      [  184.081563] R13: ff13805543410800 R14: 0000000000000001 R15: ffffffffc0e2259a
      [  184.081564] FS:  00007fa436c46740(0000) GS:ff1380557ba00000(0000) knlGS:0000000000000000
      [  184.081569] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  184.081570] CR2: 000055e7b3187000 CR3: 0000000100c48003 CR4: 0000000000771ef0
      [  184.081571] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  184.081572] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  184.081572] PKRU: 55555554
      [  184.081574] Call Trace:
      [  184.081575]  <TASK>
      [  184.081578]  ? show_trace_log_lvl+0x1b0/0x2f0
      [  184.081580]  ? show_trace_log_lvl+0x1b0/0x2f0
      [  184.081582]  ? __register_btf_kfunc_id_set+0x199/0x200
      [  184.081585]  ? btf_populate_kfunc_set+0x23c/0x330
      [  184.081586]  ? __warn.cold+0x93/0xed
      [  184.081590]  ? btf_populate_kfunc_set+0x23c/0x330
      [  184.081592]  ? report_bug+0xff/0x140
      [  184.081594]  ? handle_bug+0x3a/0x70
      [  184.081596]  ? exc_invalid_op+0x17/0x70
      [  184.081597]  ? asm_exc_invalid_op+0x1a/0x20
      [  184.081601]  ? btf_populate_kfunc_set+0x23c/0x330
      [  184.081602]  __register_btf_kfunc_id_set+0x199/0x200
      [  184.081605]  ? __pfx_nf_flow_inet_module_init+0x10/0x10 [nf_flow_table_inet]
      [  184.081607]  do_one_initcall+0x58/0x300
      [  184.081611]  do_init_module+0x60/0x230
      [  184.081614]  __do_sys_init_module+0x17a/0x1b0
      [  184.081617]  do_syscall_64+0x7d/0x160
      [  184.081620]  ? __count_memcg_events+0x58/0xf0
      [  184.081623]  ? handle_mm_fault+0x234/0x350
      [  184.081626]  ? do_user_addr_fault+0x347/0x640
      [  184.081630]  ? clear_bhb_loop+0x25/0x80
      [  184.081633]  ? clear_bhb_loop+0x25/0x80
      [  184.081634]  ? clear_bhb_loop+0x25/0x80
      [  184.081637]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
      [  184.081639] RIP: 0033:0x7fa43652e4ce
      [  184.081647] RSP: 002b:00007ffe8213be18 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
      [  184.081649] RAX: ffffffffffffffda RBX: 000055e7b3176c20 RCX: 00007fa43652e4ce
      [  184.081650] RDX: 000055e7737fde79 RSI: 0000000000003990 RDI: 000055e7b3185380
      [  184.081651] RBP: 000055e7737fde79 R08: 0000000000000007 R09: 000055e7b3179bd0
      [  184.081651] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000040000
      [  184.081652] R13: 000055e7b3176fa0 R14: 0000000000000000 R15: 000055e7b3179b80
      
      Fixes: 391bb659 ("netfilter: Add bpf_xdp_flow_lookup kfunc")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Acked-by: default avatarFlorian Westphal <fw@strlen.de>
      Acked-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Link: https://patch.msgid.link/20240911-nf-flowtable-bpf-modprob-fix-v1-1-f9fc075aafc3@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      3e705251
    • Paolo Abeni's avatar
      Merge tag 'nf-24-09-12' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 87009709
      Paolo Abeni authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following batch contains two fixes from Florian Westphal:
      
      Patch #1 fixes a sk refcount leak in nft_socket on mismatch.
      
      Patch #2 fixes cgroupsv2 matching from containers due to incorrect
      	 level in subtree.
      
      netfilter pull request 24-09-12
      
      * tag 'nf-24-09-12' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nft_socket: make cgroupsv2 matching work with namespaces
        netfilter: nft_socket: fix sk refcount leaks
      ====================
      
      Link: https://patch.msgid.link/20240911222520.3606-1-pablo@netfilter.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      87009709
    • Jakub Kicinski's avatar
      Merge branch 'add-support-for-open-alliance-10base-t1x-macphy-serial-interface' · 3cfb5aa1
      Jakub Kicinski authored
      Parthiban Veerasooran says:
      
      ====================
      Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface
      
      This patch series contain the below updates,
      
      - Adds support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface
        in the net/ethernet/oa_tc6.c.
      
        Link to the spec:
        -----------------
        https://opensig.org/download/document/OPEN_Alliance_10BASET1x_MAC-PHY_Serial_Interface_V1.1.pdf
      
      - Adds driver support for Microchip LAN8650/1 Rev.B1 10BASE-T1S MACPHY
        Ethernet driver in the net/ethernet/microchip/lan865x/lan865x.c.
      
        Link to the product:
        --------------------
        https://www.microchip.com/en-us/product/lan8650
      
      Testing Details:
      ----------------
      The driver performance was tested using iperf3 in the below two setups
      separately.
      
      Setup 1:
      --------
      Node 0 - Raspberry Pi 4 with LAN8650 MAC-PHY
      Node 1 - Raspberry Pi 4 with EVB-LAN8670-USB USB Stick
      
      Setup 2:
      --------
      Node 0 - SAMA7G54-EK with LAN8650 MAC-PHY
      Node 1 - Raspberry Pi 4 with EVB-LAN8670-USB USB Stick
      
      Achieved maximum of 9.4 Mbps.
      
      Some systems like Raspberry Pi 4 need performance mode enabled to get the
      proper clock speed for SPI. Refer below link for more details.
      
      https://github.com/raspberrypi/linux/issues/3381#issuecomment-1144723750
      ====================
      
      Link: https://patch.msgid.link/20240909082514.262942-1-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      3cfb5aa1
    • Parthiban Veerasooran's avatar
      dt-bindings: net: add Microchip's LAN865X 10BASE-T1S MACPHY · ac49b950
      Parthiban Veerasooran authored
      The LAN8650/1 combines a Media Access Controller (MAC) and an Ethernet
      PHY to enable 10BASE-T1S networks. The Ethernet Media Access Controller
      (MAC) module implements a 10 Mbps half duplex Ethernet MAC, compatible
      with the IEEE 802.3 standard and a 10BASE-T1S physical layer transceiver
      integrated into the LAN8650/1. The communication between the Host and the
      MAC-PHY is specified in the OPEN Alliance 10BASE-T1x MACPHY Serial
      Interface (TC6).
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-15-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      ac49b950
    • Parthiban Veerasooran's avatar
      microchip: lan865x: add driver support for Microchip's LAN865X MAC-PHY · 5cd2340c
      Parthiban Veerasooran authored
      The LAN8650/1 is designed to conform to the OPEN Alliance 10BASE-T1x
      MAC-PHY Serial Interface specification, Version 1.1. The IEEE Clause 4
      MAC integration provides the low pin count standard SPI interface to any
      microcontroller therefore providing Ethernet functionality without
      requiring MAC integration within the microcontroller. The LAN8650/1
      operates as an SPI client supporting SCLK clock rates up to a maximum of
      25 MHz. This SPI interface supports the transfer of both data (Ethernet
      frames) and control (register access).
      
      By default, the chunk data payload is 64 bytes in size. The Ethernet
      Media Access Controller (MAC) module implements a 10 Mbps half duplex
      Ethernet MAC, compatible with the IEEE 802.3 standard. 10BASE-T1S
      physical layer transceiver integrated is into the LAN8650/1. The PHY and
      MAC are connected via an internal Media Independent Interface (MII).
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-14-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5cd2340c
    • Parthiban Veerasooran's avatar
      net: ethernet: oa_tc6: add helper function to enable zero align rx frame · afd42170
      Parthiban Veerasooran authored
      Zero align receive frame feature can be enabled to align all receive
      ethernet frames data to start at the beginning of any receive data chunk
      payload with a start word offset (SWO) of zero. Receive frames may begin
      anywhere within the receive data chunk payload when this feature is not
      enabled.
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-13-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      afd42170
    • Parthiban Veerasooran's avatar
      net: ethernet: oa_tc6: implement mac-phy interrupt · 2c6ce535
      Parthiban Veerasooran authored
      The MAC-PHY interrupt is asserted when the following conditions are met.
      
      Receive chunks available - This interrupt is asserted when the previous
      data footer had no receive data chunks available and once the receive
      data chunks become available for reading. On reception of the first data
      header this interrupt will be deasserted.
      
      Transmit chunk credits available - This interrupt is asserted when the
      previous data footer indicated no transmit credits available and once the
      transmit credits become available for transmitting transmit data chunks.
      On reception of the first data header this interrupt will be deasserted.
      
      Extended status event - This interrupt is asserted when the previous data
      footer indicated no extended status and once the extended event become
      available. In this case the host should read status #0 register to know
      the corresponding error/event. On reception of the first data header this
      interrupt will be deasserted.
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-12-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2c6ce535
    • Parthiban Veerasooran's avatar
      net: ethernet: oa_tc6: implement receive path to receive rx ethernet frames · d70a0d8f
      Parthiban Veerasooran authored
      SPI rx data buffer can contain one or more receive data chunks. A receive
      data chunk consists a 64 bytes receive data chunk payload followed a
      4 bytes data footer at the end. The data footer contains the information
      needed to determine the validity and location of the receive frame data
      within the receive data chunk payload and the host can use these
      information to generate ethernet frame. Initially the receive chunks
      available will be updated from the buffer status register and then it
      will be updated from the footer received on each spi data transfer. Tx
      data valid or empty chunks equal to the number receive chunks available
      will be transmitted in the MOSI to receive all the rx chunks.
      Additionally the receive data footer contains the below information as
      well. The received footer will be examined for the receive errors if any.
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-11-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      d70a0d8f
    • Parthiban Veerasooran's avatar
      net: ethernet: oa_tc6: implement transmit path to transfer tx ethernet frames · 53fbde8a
      Parthiban Veerasooran authored
      The transmit ethernet frame will be converted into multiple transmit data
      chunks. Each transmit data chunk consists of a 4 bytes header followed by
      a 64 bytes transmit data chunk payload. The 4 bytes data header occurs at
      the beginning of each transmit data chunk on MOSI. The data header
      contains the information needed to determine the validity and location of
      the transmit frame data within the data chunk payload. The number of
      transmit data chunks transmitted to mac-phy is limited to the number
      transmit credits available in the mac-phy. Initially the transmit credits
      will be updated from the buffer status register and then it will be
      updated from the footer received on each spi data transfer. The received
      footer will be examined for the transmit errors if any.
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-10-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      53fbde8a
    • Parthiban Veerasooran's avatar
      net: ethernet: oa_tc6: enable open alliance tc6 data communication · f845a027
      Parthiban Veerasooran authored
      Enabling Configuration Synchronization bit (SYNC) in the Configuration
      Register #0 enables data communication in the MAC-PHY. The state of this
      bit is reflected in the data footer SYNC bit.
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarParthiban Veerasooran <Parthiban.Veerasooran@microchip.com>
      Link: https://patch.msgid.link/20240909082514.262942-9-Parthiban.Veerasooran@microchip.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f845a027