Linux/linux dd9b004. MAINTAINERS, kernel/trace ftrace.c trace_events.c

Merge tag 'trace-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Add Documentation/core-api/tracepoint.rst to TRACING in MAINTAINERS
   file

   Updates to the tracepoint.rst document should be reviewed by the
   tracing maintainers.

 - Fix warning triggered by perf attaching to synthetic events

   The synthetic events do not add a function to be registered when perf
   attaches to them. This causes a warning when perf registers a
   synthetic event and passes a NULL pointer to the tracepoint register
   function.

   Ideally synthetic events should be updated to work with perf, but as
   that's a feature and not a bug fix, simply now return -ENODEV when

    [22 lines not shown]
DeltaFile
+5-2kernel/trace/ftrace.c
+2-0kernel/trace/trace_events.c
+1-1kernel/trace/trace.c
+1-0MAINTAINERS
+9-34 files

Linux/linux 5164715arch/arm64/include/asm simd.h, lib/crypto/riscv .gitignore

Merge tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fixes from Eric Biggers:

 - Fix a performance issue with the scoped_ksimd() macro (new in 6.19)
   where it unnecessarily initialized the entire fpsimd state.

 - Add a missing gitignore entry for a generated file added in 6.18.

* tag 'libcrypto-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crypto: riscv: Add poly1305-core.S to .gitignore
  arm64/simd: Avoid pointless clearing of FP/SIMD buffer
DeltaFile
+8-1arch/arm64/include/asm/simd.h
+2-0lib/crypto/riscv/.gitignore
+10-12 files

Linux/linux 5caa380drivers/acpi cppc_acpi.c acpi_pcc.c

Merge tag 'acpi-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These add a missing PCC check for guaranteed_perf in the ACPI CPPC
  library and fix a static local variable access race condition in
  acpi_pcc_address_space_setup() (Pengjie Zhang)"

* tag 'acpi-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: PCC: Fix race condition by removing static qualifier
  ACPI: CPPC: Fix missing PCC check for guaranteed_perf
DeltaFile
+2-1drivers/acpi/cppc_acpi.c
+1-1drivers/acpi/acpi_pcc.c
+3-22 files

Linux/linux eb23a11drivers/base/power runtime.c, drivers/powercap intel_rapl_common.c powercap_sys.c

Merge tag 'pm-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "These fix three issues in the power capping code including one recent
  regression and a runtime PM framework regression introduced during the
  6.17 development cycle:

   - Fix CPU hotplug locking deadlock reported by lockdep after a recent
     update of the Intel RAPL power capping driver (Srinivas Pandruvada)

   - Fix sscanf() error return value handling in the power capping core
     and a race condition in register_control_type() (Sumeet Pawnikar)

   - Fix a concurrent bit field update issue in the runtime PM core code
     by only updating the bit field in question when runtime PM is
     disabled (Rafael Wysocki)"

* tag 'pm-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  powercap: intel_rapl: Fix possible recursive lock warning

    [3 lines not shown]
DeltaFile
+18-6drivers/powercap/intel_rapl_common.c
+14-8drivers/powercap/powercap_sys.c
+12-10drivers/base/power/runtime.c
+2-2drivers/powercap/intel_rapl_msr.c
+4-0include/linux/intel_rapl.h
+50-265 files

Linux/linux 14e0e8ddrivers/thermal thermal_core.c, drivers/thermal/intel/int340x_thermal processor_thermal_device_pci.c

Merge tag 'thermal-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These enable a new hardware feature in the int340x thermal driver and
  fix up comments in the thermal core code:

   - Set a feature flag in the int340x thermal driver to enable the
     power slider interface for Wildcat Lake processors (Srinivas
     Pandruvada)

   - Fix typo and indentation in comments in the thermal core (Thorsten
     Blum)"

* tag 'thermal-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: core: Fix typo and indentation in comments
  thermal: intel: int340x: Enable power slider interface for Wildcat Lake
DeltaFile
+2-2drivers/thermal/thermal_core.c
+2-1drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
+4-32 files

Linux/linux cf26839drivers/iommu/iommufd selftest.c io_pagetable.c, tools/testing/selftests/iommu iommufd.c

Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd

Pull iommufd fixes from Jason Gunthorpe:
 "A few minor fixes, other than the randconfig fix this is only relevant
  to test code, not releases:

   - Randconfig failure if CONFIG_DMA_SHARED_BUFFER is not set

   - Remove gcc warning in kselftest

   - Fix a refcount leak on an error path in the selftest support code

   - Fix missing overflow checks in the selftest support code"

* tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd:
  iommufd/selftest: Check for overflow in IOMMU_TEST_OP_ADD_RESERVED
  iommufd/selftest: Do not leak the hwpt if IOMMU_TEST_OP_MD_CHECK_MAP fails
  iommufd/selftest: Make it clearer to gcc that the access is not out of bounds
  iommufd: Fix building without dmabuf
DeltaFile
+11-3drivers/iommu/iommufd/selftest.c
+3-5tools/testing/selftests/iommu/iommufd.c
+5-1drivers/iommu/iommufd/io_pagetable.c
+19-93 files

Linux/linux 7b8e926drivers/net/ethernet/mellanox/mlx5/core fw_reset.c, drivers/net/ethernet/mellanox/mlx5/core/diag fw_tracer.c

Merge tag 'net-6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Paolo Abeni:
 "Including fixes from netfilter and CAN.

  Current release - regressions:

   - netfilter: nf_conncount: fix leaked ct in error paths

   - sched: act_mirred: fix loop detection

   - sctp: fix potential deadlock in sctp_clone_sock()

   - can: fix build dependency

   - eth: mlx5e: do not update BQL of old txqs during channel
     reconfiguration

  Previous releases - regressions:

    [59 lines not shown]
DeltaFile
+84-13drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+67-17net/netfilter/nf_tables_api.c
+78-0tools/testing/selftests/tc-testing/tc-tests/infra/qdiscs.json
+31-45tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh
+51-4net/ipv4/inet_fragment.c
+43-5drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
+354-8482 files not shown
+769-26988 files

Linux/linux a91e113fs/smb/client cifsfs.h cifspdu.h, fs/smb/common smb1pdu.h smb2pdu.h

Merge tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fixes from Steve French:

 - important fix for reconnect problem

 - minor cleanup

* tag 'v6.19-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update internal module version number
  smb: move some SMB1 definitions into common/smb1pdu.h
  smb: align durable reconnect v2 context to 8 byte boundary
DeltaFile
+56-0fs/smb/common/smb1pdu.h
+1-40fs/smb/common/smb2pdu.h
+2-2fs/smb/client/cifsfs.h
+0-2fs/smb/common/smbglob.h
+1-1fs/smb/client/cifspdu.h
+1-0fs/smb/server/smb_common.h
+61-456 files

Linux/linux 9a903e6fs file_attr.c, fs/notify fsnotify.c

Merge tag 'fsnotify_for_v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fsnotify fixes from Jan Kara:
 "Two fsnotify fixes.

  The fix from Ahelenia makes sure we generate event when modifying
  inode flags, the fix from Amir disables sending of events from device
  inodes to their parent directory as it could concievably create a
  usable side channel attack in case of some devices and so far we
  aren't aware of anybody depending on the functionality"

* tag 'fsnotify_for_v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  fs: send fsnotify_xattr()/IN_ATTRIB from vfs_fileattr_set()/chattr(1)
  fsnotify: do not generate ACCESS/MODIFY events on child for special files
DeltaFile
+8-1fs/notify/fsnotify.c
+2-0fs/file_attr.c
+10-12 files

Linux/linux 277141adrivers/powercap intel_rapl_common.c powercap_sys.c, include/linux intel_rapl.h

Merge branch 'pm-powercap'

Merge power capping fixes for 6.19-rc2:

 - Fix CPU hotplug locking deadlock reported by lockdep after a recent
   update of the Intel RAPL power capping driver (Srinivas Pandruvada)

 - Fix sscanf() error return value handling in the power capping core
   and a race condition in register_control_type() (Sumeet Pawnikar)

* pm-powercap:
  powercap: intel_rapl: Fix possible recursive lock warning
  powercap: fix sscanf() error return value handling
  powercap: fix race condition in register_control_type()
DeltaFile
+18-6drivers/powercap/intel_rapl_common.c
+14-8drivers/powercap/powercap_sys.c
+4-0include/linux/intel_rapl.h
+2-2drivers/powercap/intel_rapl_msr.c
+38-164 files

Linux/linux 21a88f5drivers/net/can Kconfig, net/can/j1939 socket.c transport.c

Merge tag 'linux-can-fixes-for-6.19-20251218' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2025-12-18

this is a pull request of 3 patches for net/main.

Tetsuo Handa contributes 2 patches to fix race windows in the j1939
protocol to properly handle disappearing network devices.

The last patch is by me, it fixes a build dependency with the CAN
drivers, that got introduced while fixing a dependency between the CAN
protocol and CAN device code.

linux-can-fixes-for-6.19-20251218

* tag 'linux-can-fixes-for-6.19-20251218' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:

    [7 lines not shown]
DeltaFile
+6-0net/can/j1939/socket.c
+2-0net/can/j1939/transport.c
+1-1drivers/net/can/Kconfig
+9-13 files

Linux/linux 373a34adrivers/net/ethernet/hisilicon/hns3/hns3pf hclge_mbx.c hclge_main.c, drivers/net/ethernet/hisilicon/hns3/hns3vf hclgevf_main.c

Merge branch 'there-are-some-bugfix-for-the-hns3-ethernet-driver'

Jijie Shao says:

====================
There are some bugfix for the HNS3 ethernet driver
====================

Link: https://patch.msgid.link/20251211023737.2327018-1-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+2-2drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
+2-2drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+3-0drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+7-43 files

Linux/linux c2a1626drivers/net/ethernet/hisilicon/hns3/hns3vf hclgevf_main.c

net: hns3: using the num_tqps in the vf driver to apply for resources

Currently, hdev->htqp is allocated using hdev->num_tqps, and kinfo->tqp
is allocated using kinfo->num_tqps. However, kinfo->num_tqps is set to
min(new_tqps, hdev->num_tqps);  Therefore, kinfo->num_tqps may be smaller
than hdev->num_tqps, which causes some hdev->htqp[i] to remain
uninitialized in hclgevf_knic_setup().

Thus, this patch allocates hdev->htqp and kinfo->tqp using hdev->num_tqps,
ensuring that the lengths of hdev->htqp and kinfo->tqp are consistent
and that all elements are properly initialized.

Fixes: e2cb1dec9779 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Jian Shen <shenjian15 at huawei.com>
Signed-off-by: Jijie Shao <shaojijie at huawei.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20251211023737.2327018-2-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>

DeltaFile
+2-2drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c
+2-21 files

Linux/linux d180c11drivers/net/ethernet/hisilicon/hns3/hns3pf hclge_mbx.c

net: hns3: using the num_tqps to check whether tqp_index is out of range when vf get ring info from mbx

Currently, rss_size = num_tqps / tc_num. If tc_num is 1, then num_tqps
equals rss_size. However, if the tc_num is greater than 1, then rss_size
will be less than num_tqps, causing the tqp_index check for subsequent TCs
using rss_size to always fail.

This patch uses the num_tqps to check whether tqp_index is out of range,
instead of rss_size.

Fixes: 326334aad024 ("net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx()")
Signed-off-by: Jian Shen <shenjian15 at huawei.com>
Signed-off-by: Jijie Shao <shaojijie at huawei.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20251211023737.2327018-3-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>

DeltaFile
+2-2drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
+2-21 files

Linux/linux 6ef935edrivers/net/ethernet/hisilicon/hns3/hns3pf hclge_main.c

net: hns3: add VLAN id validation before using

Currently, the VLAN id may be used without validation when
receive a VLAN configuration mailbox from VF. The length of
vlan_del_fail_bmap is BITS_TO_LONGS(VLAN_N_VID). It may cause
out-of-bounds memory access once the VLAN id is bigger than
or equal to VLAN_N_VID.

Therefore, VLAN id needs to be checked to ensure it is within
the range of VLAN_N_VID.

Fixes: fe4144d47eef ("net: hns3: sync VLAN filter entries when kill VLAN ID failed")
Signed-off-by: Jian Shen <shenjian15 at huawei.com>
Signed-off-by: Jijie Shao <shaojijie at huawei.com>
Reviewed-by: Simon Horman <horms at kernel.org>
Link: https://patch.msgid.link/20251211023737.2327018-4-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>

DeltaFile
+3-0drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+3-01 files

Linux/linux 2939203drivers/net/ethernet/freescale/enetc enetc.c

net: enetc: do not transmit redirected XDP frames when the link is down

In the current implementation, the enetc_xdp_xmit() always transmits
redirected XDP frames even if the link is down, but the frames cannot
be transmitted from TX BD rings when the link is down, so the frames
are still kept in the TX BD rings. If the XDP program is uninstalled,
users will see the following warning logs.

fsl_enetc 0000:00:00.0 eno0: timeout for tx ring #6 clear

More worse, the TX BD ring cannot work properly anymore, because the
HW PIR and CIR are not equal after the re-initialization of the TX
BD ring. At this point, the BDs between CIR and PIR are invalid,
which will cause a hardware malfunction.

Another reason is that there is internal context in the ring prefetch
logic that will retain the state from the first incarnation of the ring
and continue prefetching from the stale location when we re-initialize
the ring. The internal context is only reset by an FLR. That is to say,

    [18 lines not shown]
DeltaFile
+2-1drivers/net/ethernet/freescale/enetc/enetc.c
+2-11 files

Linux/linux 5cba412tools/testing/selftests/tc-testing/tc-tests/actions mirred.json

selftests/tc-testing: Test case exercising potential mirred redirect deadlock

Add a test case that reproduces deadlock scenario where the user has
a drr qdisc attached to root and has a mirred action that redirects to
self on egress

Signed-off-by: Victor Nogueira <victor at mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs at mojatatu.com>
Link: https://patch.msgid.link/20251210162255.1057663-2-jhs@mojatatu.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>

DeltaFile
+46-0tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json
+46-01 files

Linux/linux 1d85625net/sched act_mirred.c

net/sched: act_mirred: fix loop detection

Fix a loop scenario of ethx:egress->ethx:egress

Example setup to reproduce:
tc qdisc add dev ethx root handle 1: drr
tc filter add dev ethx parent 1: protocol ip prio 1 matchall \
         action mirred egress redirect dev ethx

Now ping out of ethx and you get a deadlock:

[  116.892898][  T307] ============================================
[  116.893182][  T307] WARNING: possible recursive locking detected
[  116.893418][  T307] 6.18.0-rc6-01205-ge05021a829b8-dirty #204 Not tainted
[  116.893682][  T307] --------------------------------------------
[  116.893926][  T307] ping/307 is trying to acquire lock:
[  116.894133][  T307] ffff88800c122908 (&sch->root_lock_key){+...}-{3:3}, at: __dev_queue_xmit+0x2210/0x3b50
[  116.894517][  T307]
[  116.894517][  T307] but task is already holding lock:

    [44 lines not shown]
DeltaFile
+9-0net/sched/act_mirred.c
+9-01 files

Linux/linux cdc3074net/sctp socket.c ipv6.c

Merge branch 'sctp-fix-two-issues-in-sctp_clone_sock'

Kuniyuki Iwashima says:

====================
sctp: Fix two issues in sctp_clone_sock().

syzbot reported two issues in sctp_clone_sock().

This series fixes the issues.

v1: https://lore.kernel.org/netdev/20251208133728.157648-1-kuniyu@google.com/
====================

Link: https://patch.msgid.link/20251210081206.1141086-1-kuniyu@google.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+4-3net/sctp/socket.c
+2-0net/sctp/ipv6.c
+6-32 files

Linux/linux d7ff61enet/sctp ipv6.c

sctp: Clear inet_opt in sctp_v6_copy_ip_options().

syzbot reported the splat below. [0]

Since the cited commit, the child socket inherits all fields
of its parent socket unless explicitly cleared.

syzbot set IP_OPTIONS to AF_INET6 socket and created a child
socket inheriting inet_sk(sk)->inet_opt.

sctp_v6_copy_ip_options() only clones np->opt, and leaving
inet_opt results in double-free.

Let's clear inet_opt in sctp_v6_copy_ip_options().

[0]:
BUG: KASAN: double-free in inet_sock_destruct+0x538/0x740 net/ipv4/af_inet.c:159
Free of addr ffff8880304b6d40 by task ksoftirqd/0/15


    [80 lines not shown]
DeltaFile
+2-0net/sctp/ipv6.c
+2-01 files

Linux/linux b98f06fnet/sctp socket.c

sctp: Fetch inet6_sk() after setting ->pinet6 in sctp_clone_sock().

syzbot reported the lockdep splat below. [0]

sctp_clone_sock() sets the child socket's ipv6_mc_list to NULL,
but somehow sock_release() in an error path finally acquires
lock_sock() in ipv6_sock_mc_close().

The root cause is that sctp_clone_sock() fetches inet6_sk(newsk)
before setting newinet->pinet6, meaning that the parent's
ipv6_mc_list was actually cleared.

Also, sctp_v6_copy_ip_options() uses inet6_sk() but is called
before newinet->pinet6 is set.

Let's use inet6_sk() only after setting newinet->pinet6.

[0]:
WARNING: possible recursive locking detected

    [71 lines not shown]
DeltaFile
+4-3net/sctp/socket.c
+4-31 files

Linux/linux 15564bdnet/handshake request.c

net/handshake: duplicate handshake cancellations leak socket

When a handshake request is cancelled it is removed from the
handshake_net->hn_requests list, but it is still present in the
handshake_rhashtbl until it is destroyed.

If a second cancellation request arrives for the same handshake request,
then remove_pending() will return false... and assuming
HANDSHAKE_F_REQ_COMPLETED isn't set in req->hr_flags, we'll continue
processing through the out_true label, where we put another reference on
the sock and a refcount underflow occurs.

This can happen for example if a handshake times out - particularly if
the SUNRPC client sends the AUTH_TLS probe to the server but doesn't
follow it up with the ClientHello due to a problem with tlshd.  When the
timeout is hit on the server, the server will send a FIN, which triggers
a cancellation request via xs_reset_transport().  When the timeout is
hit on the client, another cancellation request happens via
xs_tls_handshake_sync().

    [11 lines not shown]
DeltaFile
+5-1net/handshake/request.c
+5-11 files

Linux/linux 3e82accinclude/net/netfilter nf_tables.h, net/netfilter nf_tables_api.c nf_nat_core.c

Merge tag 'nf-25-12-16' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf

Florian Westphal says:

====================
netfilter: updates for net

The following patchset contains Netfilter fixes for *net*:

1)  Jozsef Kadlecsik is retiring.  Fortunately Jozsef will still keep an
    eye on ipset patches.

2)  remove a bogus direction check from nat core, this caused spurious
    flakes in the 'reverse clash' selftest, from myself.

3) nf_tables doesn't need to do chain validation on register store,
   from Pablo Neira Ayuso.

4) nf_tables shouldn't revisit chains during ruleset (graph) validation

    [24 lines not shown]
DeltaFile
+67-17net/netfilter/nf_tables_api.c
+26-8include/net/netfilter/nf_tables.h
+1-13net/netfilter/nf_nat_core.c
+9-4tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
+1-1tools/testing/selftests/net/netfilter/packetdrill/conntrack_syn_challenge_ack.pkt
+2-0tools/testing/selftests/net/netfilter/conntrack_reverse_clash.sh
+106-432 files not shown
+107-448 files

Linux/linux 78a4753drivers/net/ethernet/mellanox/mlx5/core fw_reset.c eswitch_offloads.c, drivers/net/ethernet/mellanox/mlx5/core/diag fw_tracer.c

Merge branch 'mlx5-misc-fixes-2025-12-09'

Tariq Toukan says:

====================
mlx5 misc fixes 2025-12-09

This patchset provides misc bug fixes from the team to the mlx5 core and
Eth drivers.
====================

Link: https://patch.msgid.link/1765284977-1363052-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>
DeltaFile
+84-13drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+43-5drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
+5-3drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
+6-0drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+5-1drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+5-0drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+148-224 files not shown
+152-2310 files

Linux/linux 4198a14drivers/net/ethernet/mellanox/mlx5/core en.h

net/mlx5e: Don't include PSP in the hard MTU calculations

Commit [1] added the 40 bytes required by the PSP header+trailer and the
UDP header to MLX5E_ETH_HARD_MTU, which limits the device-wide max
software MTU that could be set. This is not okay, because most packets
are not PSP packets and it doesn't make sense to always reserve space
for headers which won't get added in most cases.

As it turns out, for TCP connections, PSP overhead is already taken into
account in the TCP MSS calculations via inet_csk(sk)->icsk_ext_hdr_len.
This was added in commit [2]. This means that the extra space reserved
in the hard MTU for mlx5 ends up unused and wasted.

Remove the unnecessary 40 byte reservation from hard MTU.

[1] commit e5a1861a298e ("net/mlx5e: Implement PSP Tx data path")
[2] commit e97269257fe4 ("net: psp: update the TCP MSS to reflect PSP
packet overhead")


    [7 lines not shown]
DeltaFile
+1-1drivers/net/ethernet/mellanox/mlx5/core/en.h
+1-11 files

Linux/linux c0289f6drivers/net/ethernet/mellanox/mlx5/core/diag fw_tracer.c

net/mlx5: fw_tracer, Handle escaped percent properly

The firmware tracer's format string validation and parameter counting
did not properly handle escaped percent signs (%%). This caused
fw_tracer to count more parameters when trace format strings contained
literal percent characters.

To fix it, allow %% to pass string validation and skip %% sequences when
counting parameters since they represent literal percent signs rather
than format specifiers.

Fixes: 70dd6fdb8987 ("net/mlx5: FW tracer, parse traces and kernel tracing support")
Signed-off-by: Shay Drory <shayd at nvidia.com>
Reported-by: Breno Leitao <leitao at debian.org>
Reviewed-by: Moshe Shemesh <moshe at nvidia.com>
Closes: https://lore.kernel.org/netdev/hanz6rzrb2bqbplryjrakvkbmv4y5jlmtthnvi3thg5slqvelp@t3s3erottr6s/
Signed-off-by: Tariq Toukan <tariqt at nvidia.com>
Link: https://patch.msgid.link/1765284977-1363052-5-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni at redhat.com>

DeltaFile
+14-6drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+14-61 files

Linux/linux 367e501drivers/net/ethernet/mellanox/mlx5/core fw_reset.c eswitch_offloads.c

net/mlx5: Serialize firmware reset with devlink

The firmware reset mechanism can be triggered by asynchronous events,
which may race with other devlink operations like devlink reload or
devlink dev eswitch set, potentially leading to inconsistent states.

This patch addresses the race by using the devl_lock to serialize the
firmware reset against other devlink operations. When a reset is
requested, the driver attempts to acquire the lock. If successful, it
sets a flag to block devlink reload or eswitch changes, ACKs the reset
to firmware and then releases the lock. If the lock is already held by
another operation, the driver NACKs the firmware reset request,
indicating that the reset cannot proceed.

Firmware reset does not keep the devl_lock and instead uses an internal
firmware reset bit. This is because firmware resets can be triggered by
asynchronous events, and processed in different threads. It is illegal
and unsafe to acquire a lock in one thread and attempt to release it in
another, as lock ownership is intrinsically thread-specific.

    [13 lines not shown]
DeltaFile
+41-4drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
+6-0drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+5-0drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+1-0drivers/net/ethernet/mellanox/mlx5/core/fw_reset.h
+53-44 files

Linux/linux b359660drivers/net/ethernet/mellanox/mlx5/core/diag fw_tracer.c fw_tracer.h

net/mlx5: fw_tracer, Validate format string parameters

Add validation for format string parameters in the firmware tracer to
prevent potential security vulnerabilities and crashes from malformed
format strings received from firmware.

The firmware tracer receives format strings from the device firmware and
uses them to format trace messages. Without proper validation, bad
firmware could provide format strings with invalid format specifiers
(e.g., %s, %p, %n) that could lead to crashes, or other undefined
behavior.

Add mlx5_tracer_validate_params() to validate that all format specifiers
in trace strings are limited to safe integer/hex formats (%x, %d, %i,
%u, %llx, %lx, etc.). Reject strings containing other format types that
could be used to access arbitrary memory or cause crashes.
Invalid format strings are added to the trace output for visibility with
"BAD_FORMAT: " prefix.


    [9 lines not shown]
DeltaFile
+73-10drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
+1-0drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.h
+74-102 files

Linux/linux c8591dedrivers/net/ethernet/mellanox/mlx5/core en_tx.c

net/mlx5e: Do not update BQL of old txqs during channel reconfiguration

During channel reconfiguration (e.g., ethtool private flags changes),
the driver can trigger a kernel BUG_ON in dql_completed() with the error
"kernel BUG at lib/dynamic_queue_limits.c:99".

The issue occurs in the following sequence:

During mlx5e_safe_switch_params(), old channels are deactivated via
mlx5e_deactivate_txqsq(). New channels are created and activated, taking
ownership of the netdev_queues and their BQL state.

When old channels are closed via mlx5e_close_txqsq(), there may be
pending TX descriptors (sq->cc != sq->pc) that were in-flight during the
deactivation.

mlx5e_free_txqsq_descs() frees these pending descriptors and attempts to
complete them via netdev_tx_completed_queue().


    [14 lines not shown]
DeltaFile
+5-1drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+5-11 files

Linux/linux 9ab89bddrivers/net/ethernet/mellanox/mlx5/core/en_accel ipsec.c

net/mlx5e: Trigger neighbor resolution for unresolved destinations

When initializing the MAC addresses for an outbound IPsec packet offload
rule in mlx5e_ipsec_init_macs, the call to dst_neigh_lookup is used to
find the next-hop neighbor (typically the gateway in tunnel mode).
This call might create a new neighbor entry if one doesn't already
exist. This newly created entry starts in the INCOMPLETE state, as the
kernel hasn't yet sent an ARP or NDISC probe to resolve the MAC
address. In this case, neigh_ha_snapshot will correctly return an
all-zero MAC address.

IPsec packet offload requires the actual next-hop MAC address to
program the rule correctly. If the neighbor state is INCOMPLETE when
the rule is created, the hardware rule is programmed with an all-zero
destination MAC address. Packets sent using this rule will be
subsequently dropped by the receiving network infrastructure or host.

This patch adds a check specifically for the outbound offload path. If
neigh_ha_snapshot returns an all-zero MAC address, it proactively

    [13 lines not shown]
DeltaFile
+3-0drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
+3-01 files