1. 18 Oct, 2023 21 commits
  2. 17 Oct, 2023 11 commits
    • Jakub Kicinski's avatar
      Merge tag 'wireless-next-2023-10-16' of... · 56a7bb12
      Jakub Kicinski authored
      Merge tag 'wireless-next-2023-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
      
      Kalle Valo says:
      
      ====================
      wireless-next patches for v6.7
      
      The second pull request for v6.7, with only driver changes this time.
      We have now support for mt7925 PCIe and USB variants, few new features
      and of course some fixes.
      
      Major changes:
      
      mt76
       - mt7925 support
      
      ath12k
       - read board data variant name from SMBIOS
      
      wfx
       - Remain-On-Channel (ROC) support
      
      * tag 'wireless-next-2023-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (109 commits)
        wifi: rtw89: mac: do bf_monitor only if WiFi 6 chips
        wifi: rtw89: mac: set bf_assoc capabilities according to chip gen
        wifi: rtw89: mac: set bfee_ctrl() according to chip gen
        wifi: rtw89: mac: add registers of MU-EDCA parameters for WiFi 7 chips
        wifi: rtw89: mac: generalize register of MU-EDCA switch according to chip gen
        wifi: rtw89: mac: update RTS threshold according to chip gen
        wifi: rtlwifi: simplify TX command fill callbacks
        wifi: hostap: remove unused ioctl function
        wifi: atmel: remove unused ioctl function
        wifi: rtw89: coex: add annotation __counted_by() to struct rtw89_btc_btf_set_mon_reg
        wifi: rtw89: coex: add annotation __counted_by() for struct rtw89_btc_btf_set_slot_table
        wifi: rtw89: add EHT radiotap in monitor mode
        wifi: rtw89: show EHT rate in debugfs
        wifi: rtw89: parse TX EHT rate selected by firmware from RA C2H report
        wifi: rtw89: Add EHT rate mask as parameters of RA H2C command
        wifi: rtw89: parse EHT information from RX descriptor and PPDU status packet
        wifi: radiotap: add bandwidth definition of EHT U-SIG
        wifi: rtlwifi: use convenient list_count_nodes()
        wifi: p54: Annotate struct p54_cal_database with __counted_by
        wifi: brcmfmac: fweh: Add __counted_by for struct brcmf_fweh_queue_item and use struct_size()
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20231016143822.880D8C433C8@smtp.kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      56a7bb12
    • Christophe JAILLET's avatar
      net: openvswitch: Annotate struct mask_array with __counted_by · 7713ec84
      Christophe JAILLET authored
      Prepare for the coming implementation by GCC and Clang of the __counted_by
      attribute. Flexible array members annotated with __counted_by can have
      their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
      (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
      functions).
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/ca5c8049f58bb933f231afd0816e30a5aaa0eddd.1697264974.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7713ec84
    • Christophe JAILLET's avatar
      net: openvswitch: Use struct_size() · df3bf90f
      Christophe JAILLET authored
      Use struct_size() instead of hand writing it.
      This is less verbose and more robust.
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/e5122b4ff878cbf3ed72653a395ad5c4da04dc1e.1697264974.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      df3bf90f
    • Paolo Abeni's avatar
      Merge branch 'i3c-mctp-net-driver' · 53c6b86c
      Paolo Abeni authored
      Matt Johnston says:
      
      ====================
      I3C MCTP net driver
      
      This series adds an I3C transport for the kernel's MCTP network
      protocol. MCTP is a communication protocol between system components
      (BMCs, drives, NICs etc), with higher level protocols such as NVMe-MI or
      PLDM built on top of it (in userspace). It runs over various transports
      such as I2C, PCIe, or I3C.
      
      The mctp-i3c driver follows a similar approach to the kernel's existing
      mctp-i2c driver, creating a "mctpi3cX" network interface for each
      numbered I3C bus. Busses opt in to support by adding a "mctp-controller"
      property to the devicetree:
      
      &i3c0 {
              mctp-controller;
      }
      
      The driver will bind to MCTP class devices (DCR 0xCC) that are on a
      supported I3C bus. Each bus is represented by a `struct mctp_i3c_bus`
      that keeps state for the network device. An individual I3C device
      (struct mctp_i3c_device) performs operations using the "parent"
      mctp_i3c_bus object. The I3C notify/enumeration patch is needed so that
      the mctp-i3c driver can handle creating/removing mctp_i3c_bus objects as
      required.
      
      The mctp-i3c driver is using the Provisioned ID as an identifier for
      target I3C devices (the neighbour address), as that will be more stable
      than the I3C dynamic address. The driver internally translates that to a
      dynamic address for bus operations.
      
      The driver has been tested using an AST2600 platform. A remote endpoint
      has been tested against QEMU, as well as using the target mode support
      in Aspeed's vendor tree.
      
      I3C maintainers have acked merging this through net-next tree.
      ====================
      
      Link: https://lore.kernel.org/r/20231013040628.354323-1-matt@codeconstruct.com.auSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      53c6b86c
    • Matt Johnston's avatar
      mctp i3c: MCTP I3C driver · c8755b29
      Matt Johnston authored
      Provides MCTP network transport over an I3C bus, as specified in
      DMTF DSP0233.
      
      Each I3C bus (with "mctp-controller" devicetree property) gets an
      "mctpi3cX" net device created. I3C devices are reachable as remote
      endpoints through that net device. Link layer addressing uses the
      I3C PID as a fixed hardware address for neighbour table entries.
      
      The driver matches I3C devices that have the MIPI assigned DCR 0xCC for
      MCTP.
      Signed-off-by: default avatarMatt Johnston <matt@codeconstruct.com.au>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c8755b29
    • Jeremy Kerr's avatar
      i3c: Add support for bus enumeration & notification · 0ac6486e
      Jeremy Kerr authored
      This allows other drivers to be notified when new i3c busses are
      attached, referring to a whole i3c bus as opposed to individual
      devices.
      Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
      Signed-off-by: default avatarMatt Johnston <matt@codeconstruct.com.au>
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      0ac6486e
    • Matt Johnston's avatar
      dt-bindings: i3c: Add mctp-controller property · ee71d6d5
      Matt Johnston authored
      This property is used to describe a I3C bus with attached MCTP I3C
      target devices.
      Signed-off-by: default avatarMatt Johnston <matt@codeconstruct.com.au>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      ee71d6d5
    • Florian Westphal's avatar
      net: gso_test: release each segment individually · 1b2d3b45
      Florian Westphal authored
      consume_skb() doesn't walk the segment list, so segments other than
      the first are leaked.
      
      Move this skb_consume call into the loop.
      
      Cc: Willem de Bruijn <willemb@google.com>
      Fixes: b3098d32 ("net: add skb_segment kunit test")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1b2d3b45
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · a3c2dd96
      Jakub Kicinski authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2023-10-16
      
      We've added 90 non-merge commits during the last 25 day(s) which contain
      a total of 120 files changed, 3519 insertions(+), 895 deletions(-).
      
      The main changes are:
      
      1) Add missed stats for kprobes to retrieve the number of missed kprobe
         executions and subsequent executions of BPF programs, from Jiri Olsa.
      
      2) Add cgroup BPF sockaddr hooks for unix sockets. The use case is
         for systemd to reimplement the LogNamespace feature which allows
         running multiple instances of systemd-journald to process the logs
         of different services, from Daan De Meyer.
      
      3) Implement BPF CPUv4 support for s390x BPF JIT, from Ilya Leoshkevich.
      
      4) Improve BPF verifier log output for scalar registers to better
         disambiguate their internal state wrt defaults vs min/max values
         matching, from Andrii Nakryiko.
      
      5) Extend the BPF fib lookup helpers for IPv4/IPv6 to support retrieving
         the source IP address with a new BPF_FIB_LOOKUP_SRC flag,
         from Martynas Pumputis.
      
      6) Add support for open-coded task_vma iterator to help with symbolization
         for BPF-collected user stacks, from Dave Marchevsky.
      
      7) Add libbpf getters for accessing individual BPF ring buffers which
         is useful for polling them individually, for example, from Martin Kelly.
      
      8) Extend AF_XDP selftests to validate the SHARED_UMEM feature,
         from Tushar Vyavahare.
      
      9) Improve BPF selftests cross-building support for riscv arch,
         from Björn Töpel.
      
      10) Add the ability to pin a BPF timer to the same calling CPU,
         from David Vernet.
      
      11) Fix libbpf's bpf_tracing.h macros for riscv to use the generic
         implementation of PT_REGS_SYSCALL_REGS() to access syscall arguments,
         from Alexandre Ghiti.
      
      12) Extend libbpf to support symbol versioning for uprobes, from Hengqi Chen.
      
      13) Fix bpftool's skeleton code generation to guarantee that ELF data
          is 8 byte aligned, from Ian Rogers.
      
      14) Inherit system-wide cpu_mitigations_off() setting for Spectre v1/v4
          security mitigations in BPF verifier, from Yafang Shao.
      
      15) Annotate struct bpf_stack_map with __counted_by attribute to prepare
          BPF side for upcoming __counted_by compiler support, from Kees Cook.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (90 commits)
        bpf: Ensure proper register state printing for cond jumps
        bpf: Disambiguate SCALAR register state output in verifier logs
        selftests/bpf: Make align selftests more robust
        selftests/bpf: Improve missed_kprobe_recursion test robustness
        selftests/bpf: Improve percpu_alloc test robustness
        selftests/bpf: Add tests for open-coded task_vma iter
        bpf: Introduce task_vma open-coded iterator kfuncs
        selftests/bpf: Rename bpf_iter_task_vma.c to bpf_iter_task_vmas.c
        bpf: Don't explicitly emit BTF for struct btf_iter_num
        bpf: Change syscall_nr type to int in struct syscall_tp_t
        net/bpf: Avoid unused "sin_addr_len" warning when CONFIG_CGROUP_BPF is not set
        bpf: Avoid unnecessary audit log for CPU security mitigations
        selftests/bpf: Add tests for cgroup unix socket address hooks
        selftests/bpf: Make sure mount directory exists
        documentation/bpf: Document cgroup unix socket address hooks
        bpftool: Add support for cgroup unix socket address hooks
        libbpf: Add support for cgroup unix socket address hooks
        bpf: Implement cgroup sockaddr hooks for unix sockets
        bpf: Add bpf_sock_addr_set_sun_path() to allow writing unix sockaddr from bpf
        bpf: Propagate modified uaddrlen from cgroup sockaddr programs
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20231016204803.30153-1-daniel@iogearbox.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a3c2dd96
    • Yunsheng Lin's avatar
      page_pool: fragment API support for 32-bit arch with 64-bit DMA · 90de47f0
      Yunsheng Lin authored
      Currently page_pool_alloc_frag() is not supported in 32-bit
      arch with 64-bit DMA because of the overlap issue between
      pp_frag_count and dma_addr_upper in 'struct page' for those
      arches, which seems to be quite common, see [1], which means
      driver may need to handle it when using fragment API.
      
      It is assumed that the combination of the above arch with an
      address space >16TB does not exist, as all those arches have
      64b equivalent, it seems logical to use the 64b version for a
      system with a large address space. It is also assumed that dma
      address is page aligned when we are dma mapping a page aligned
      buffer, see [2].
      
      That means we're storing 12 bits of 0 at the lower end for a
      dma address, we can reuse those bits for the above arches to
      support 32b+12b, which is 16TB of memory.
      
      If we make a wrong assumption, a warning is emitted so that
      user can report to us.
      
      1. https://lore.kernel.org/all/20211117075652.58299-1-linyunsheng@huawei.com/
      2. https://lore.kernel.org/all/20230818145145.4b357c89@kernel.org/Tested-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
      Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
      CC: Lorenzo Bianconi <lorenzo@kernel.org>
      CC: Alexander Duyck <alexander.duyck@gmail.com>
      CC: Liang Chen <liangchen.linux@gmail.com>
      CC: Guillaume Tucker <guillaume.tucker@collabora.com>
      CC: Matthew Wilcox <willy@infradead.org>
      CC: Linux-MM <linux-mm@kvack.org>
      Link: https://lore.kernel.org/r/20231013064827.61135-2-linyunsheng@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      90de47f0
    • Jacob Keller's avatar
      net: stub tcp_gro_complete if CONFIG_INET=n · e411a8e3
      Jacob Keller authored
      A few networking drivers including bnx2x, bnxt, qede, and idpf call
      tcp_gro_complete as part of offloading TCP GRO. The function is only
      defined if CONFIG_INET is true, since its TCP specific and is meaningless
      if the kernel lacks IP networking support.
      
      The combination of trying to use the complex network drivers with
      CONFIG_NET but not CONFIG_INET is rather unlikely in practice: most use
      cases are going to need IP networking.
      
      The tcp_gro_complete function just sets some data in the socket buffer for
      use in processing the TCP packet in the event that the GRO was offloaded to
      the device. If the kernel lacks TCP support, such setup will simply go
      unused.
      
      The bnx2x, bnxt, and qede drivers wrap their TCP offload support in
      CONFIG_INET checks and skip handling on such kernels.
      
      The idpf driver did not check CONFIG_INET and thus fails to link if the
      kernel is configured  with CONFIG_NET=y, CONFIG_IDPF=(m|y), and
      CONFIG_INET=n.
      
      While checking CONFIG_INET does allow the driver to bypass significantly
      more instructions in the event that we know TCP networking isn't supported,
      the configuration is unlikely to be used widely.
      
      Rather than require driver authors to care about this, stub the
      tcp_gro_complete function when CONFIG_INET=n. This allows drivers to be
      left as-is. It does mean the idpf driver will perform slightly more work
      than strictly necessary when CONFIG_INET=n, since it will still execute
      some of the skb setup in idpf_rx_rsc. However, that work would be performed
      in the case where CONFIG_INET=y anyways.
      
      I did not change the existing drivers, since they appear to wrap a
      significant portion of code when CONFIG_INET=n. There is little benefit in
      trashing these drivers just to unwrap and remove the CONFIG_INET check.
      
      Using a stub for tcp_gro_complete is still beneficial, as it means future
      drivers no longer need to worry about this case of CONFIG_NET=y and
      CONFIG_INET=n, which should reduce noise from buildbots that check such a
      configuration.
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Link: https://lore.kernel.org/r/20231013185502.1473541-1-jacob.e.keller@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e411a8e3
  3. 16 Oct, 2023 8 commits