1. 21 Apr, 2023 31 commits
  2. 20 Apr, 2023 9 commits
    • Jakub Kicinski's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 681c5b51
      Jakub Kicinski authored
      Adjacent changes:
      
      net/mptcp/protocol.h
        63740448 ("mptcp: fix accept vs worker race")
        2a6a870e ("mptcp: stops worker on unaccepted sockets at listener close")
        ddb1a072 ("mptcp: move first subflow allocation at mpc access time")
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      681c5b51
    • Toke Høiland-Jørgensen's avatar
      wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels() · 0f2a4af2
      Toke Høiland-Jørgensen authored
      This partially reverts commit e161d4b6.
      
      Turns out the channelmap variable is not actually read-only, it's modified
      through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function,
      so making it read-only causes page faults when that code is hit.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=217183
      Link: https://lore.kernel.org/r/20230413214118.153781-1-toke@toke.dk
      Fixes: e161d4b6 ("wifi: ath9k: Make arrays prof_prio and channelmap static const")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0f2a4af2
    • Linus Torvalds's avatar
      Merge tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux · 6a66fdd2
      Linus Torvalds authored
      Pull Rust fixes from Miguel Ojeda:
       "Most of these are straightforward.
      
        The last one is more complex, but it only touches Rust + GCC builds
        which are for the moment best-effort.
      
         - Code: Missing 'extern "C"' fix.
      
         - Scripts: 'is_rust_module.sh' and 'generate_rust_analyzer.py' fixes.
      
         - A couple trivial fixes
      
         - Build: Rust + GCC build fix and 'grep' warning fix"
      
      * tag 'rust-fixes-6.3' of https://github.com/Rust-for-Linux/linux:
        rust: allow to use INIT_STACK_ALL_ZERO
        rust: fix regexp in scripts/is_rust_module.sh
        rust: build: Fix grep warning
        scripts: generate_rust_analyzer: Handle sub-modules with no Makefile
        rust: kernel: Mark rust_fmt_argument as extern "C"
        rust: sort uml documentation arch support table
        rust: str: fix requierments->requirements typo
      6a66fdd2
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 23309d60
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from netfilter and bpf.
      
        There are a few fixes for new code bugs, including the Mellanox one
        noted in the last networking pull. No known regressions outstanding.
      
        Current release - regressions:
      
         - sched: clear actions pointer in miss cookie init fail
      
         - mptcp: fix accept vs worker race
      
         - bpf: fix bpf_arch_text_poke() with new_addr == NULL on s390
      
         - eth: bnxt_en: fix a possible NULL pointer dereference in unload
           path
      
         - eth: veth: take into account peer device for
           NETDEV_XDP_ACT_NDO_XMIT xdp_features flag
      
        Current release - new code bugs:
      
         - eth: revert "net/mlx5: Enable management PF initialization"
      
        Previous releases - regressions:
      
         - netfilter: fix recent physdev match breakage
      
         - bpf: fix incorrect verifier pruning due to missing register
           precision taints
      
         - eth: virtio_net: fix overflow inside xdp_linearize_page()
      
         - eth: cxgb4: fix use after free bugs caused by circular dependency
           problem
      
         - eth: mlxsw: pci: fix possible crash during initialization
      
        Previous releases - always broken:
      
         - sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
      
         - netfilter: validate catch-all set elements
      
         - bridge: don't notify FDB entries with "master dynamic"
      
         - eth: bonding: fix memory leak when changing bond type to ethernet
      
         - eth: i40e: fix accessing vsi->active_filters without holding lock
      
        Misc:
      
         - Mat is back as MPTCP co-maintainer"
      
      * tag 'net-6.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (33 commits)
        net: bridge: switchdev: don't notify FDB entries with "master dynamic"
        Revert "net/mlx5: Enable management PF initialization"
        MAINTAINERS: Resume MPTCP co-maintainer role
        mailmap: add entries for Mat Martineau
        e1000e: Disable TSO on i219-LM card to increase speed
        bnxt_en: fix free-runnig PHC mode
        net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
        bpf: Fix incorrect verifier pruning due to missing register precision taints
        hamradio: drop ISA_DMA_API dependency
        mlxsw: pci: Fix possible crash during initialization
        mptcp: fix accept vs worker race
        mptcp: stops worker on unaccepted sockets at listener close
        net: rpl: fix rpl header size calculation
        net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete()
        bonding: Fix memory leak when changing bond type to Ethernet
        veth: take into account peer device for NETDEV_XDP_ACT_NDO_XMIT xdp_features flag
        mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
        bnxt_en: Fix a possible NULL pointer dereference in unload path
        bnxt_en: Do not initialize PTP on older P3/P4 chips
        netfilter: nf_tables: tighten netlink attribute requirements for catch-all elements
        ...
      23309d60
    • Zhengchao Shao's avatar
      net: libwx: fix memory leak in wx_setup_rx_resources · e315e7b8
      Zhengchao Shao authored
      When wx_alloc_page_pool() failed in wx_setup_rx_resources(), it doesn't
      release DMA buffer. Add dma_free_coherent() in the error path to release
      the DMA buffer.
      
      Fixes: 850b9711 ("net: libwx: Allocate Rx and Tx resources")
      Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20230418065450.2268522-1-shaozhengchao@huawei.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      e315e7b8
    • Vladimir Oltean's avatar
      net: bridge: switchdev: don't notify FDB entries with "master dynamic" · 927cdea5
      Vladimir Oltean authored
      There is a structural problem in switchdev, where the flag bits in
      struct switchdev_notifier_fdb_info (added_by_user, is_local etc) only
      represent a simplified / denatured view of what's in struct
      net_bridge_fdb_entry :: flags (BR_FDB_ADDED_BY_USER, BR_FDB_LOCAL etc).
      Each time we want to pass more information about struct
      net_bridge_fdb_entry :: flags to struct switchdev_notifier_fdb_info
      (here, BR_FDB_STATIC), we find that FDB entries were already notified to
      switchdev with no regard to this flag, and thus, switchdev drivers had
      no indication whether the notified entries were static or not.
      
      For example, this command:
      
      ip link add br0 type bridge && ip link set swp0 master br0
      bridge fdb add dev swp0 00:01:02:03:04:05 master dynamic
      
      has never worked as intended with switchdev. It causes a struct
      net_bridge_fdb_entry to be passed to br_switchdev_fdb_notify() which has
      a single flag set: BR_FDB_ADDED_BY_USER.
      
      This is further passed to the switchdev notifier chain, where interested
      drivers have no choice but to assume this is a static (does not age) and
      sticky (does not migrate) FDB entry. So currently, all drivers offload
      it to hardware as such, as can be seen below ("offload" is set).
      
      bridge fdb get 00:01:02:03:04:05 dev swp0 master
      00:01:02:03:04:05 dev swp0 offload master br0
      
      The software FDB entry expires $ageing_time centiseconds after the
      kernel last sees a packet with this MAC SA, and the bridge notifies its
      deletion as well, so it eventually disappears from hardware too.
      
      This is a problem, because it is actually desirable to start offloading
      "master dynamic" FDB entries correctly - they should expire $ageing_time
      centiseconds after the *hardware* port last sees a packet with this
      MAC SA - and this is how the current incorrect behavior was discovered.
      With an offloaded data plane, it can be expected that software only sees
      exception path packets, so an otherwise active dynamic FDB entry would
      be aged out by software sooner than it should.
      
      With the change in place, these FDB entries are no longer offloaded:
      
      bridge fdb get 00:01:02:03:04:05 dev swp0 master
      00:01:02:03:04:05 dev swp0 master br0
      
      and this also constitutes a better way (assuming a backport to stable
      kernels) for user space to determine whether the kernel has the
      capability of doing something sane with these or not.
      
      As opposed to "master dynamic" FDB entries, on the current behavior of
      which no one currently depends on (which can be deduced from the lack of
      kselftests), Ido Schimmel explains that entries with the "extern_learn"
      flag (BR_FDB_ADDED_BY_EXT_LEARN) should still be notified to switchdev,
      since the spectrum driver listens to them (and this is kind of okay,
      because although they are treated identically to "static", they are
      expected to not age, and to roam).
      
      Fixes: 6b26b51b ("net: bridge: Add support for notifying devices about FDB add/del")
      Link: https://lore.kernel.org/netdev/20230327115206.jk5q5l753aoelwus@skbuf/Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Tested-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Link: https://lore.kernel.org/r/20230418155902.898627-1-vladimir.oltean@nxp.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      927cdea5
    • Jakub Kicinski's avatar
      Revert "net/mlx5: Enable management PF initialization" · f52cc627
      Jakub Kicinski authored
      This reverts commit fe998a3c.
      
      Paul reports that it causes a regression with IB on CX4
      and FW 12.18.1000. In addition I think that the concept
      of "management PF" is not fully accepted and requires
      a discussion.
      
      Fixes: fe998a3c ("net/mlx5: Enable management PF initialization")
      Reported-by: default avatarPaul Moore <paul@paul-moore.com>
      Link: https://lore.kernel.org/all/CAHC9VhQ7A4+msL38WpbOMYjAqLp0EtOjeLh4Dc6SQtD6OUvCQg@mail.gmail.com/
      Link: https://lore.kernel.org/r/20230413222547.56901-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f52cc627
    • Jakub Kicinski's avatar
      Merge branch 'another-crack-at-a-handshake-upcall-mechanism' · a5962e0a
      Jakub Kicinski authored
      Chuck Lever says:
      
      ====================
      Another crack at a handshake upcall mechanism
      
      Here is v10 of a series to add generic support for transport layer
      security handshake on behalf of kernel socket consumers (user space
      consumers use a security library directly, of course). A summary of
      the purpose of these patches is archived here:
      
      https://lore.kernel.org/netdev/1DE06BB1-6BA9-4DB4-B2AA-07DE532963D6@oracle.com/
      
      The first patch in the series applies to the top-level .gitignore
      file to address the build warnings reported a few days ago. I intend
      to submit that separately. I'd like you to consider taking the rest
      of this series for v6.4.
      
      The full patch set to support SunRPC with TLSv1.3 is available in
      the topic-rpc-with-tls-upcall branch here, based on net-next/main:
      
      https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
      
      This patch set includes support for in-transit confidentiality and
      peer authentication for both the Linux NFS client and server.
      
      A user space handshake agent for TLSv1.3 to go along with the kernel
      patches is available in the "main" branch here:
      
      https://github.com/oracle/ktls-utils
      ====================
      
      Link: https://lore.kernel.org/r/168174169259.9520.1911007910797225963.stgit@91.116.238.104.host.secureserver.netSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a5962e0a
    • Chuck Lever's avatar
      net/handshake: Add Kunit tests for the handshake consumer API · 88232ec1
      Chuck Lever authored
      These verify the API contracts and help exercise lifetime rules for
      consumer sockets and handshake_req structures.
      
      One way to run these tests:
      
      ./tools/testing/kunit/kunit.py run --kunitconfig ./net/handshake/.kunitconfig
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      88232ec1