AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/05 06:59 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the Intel i40e Ethernet driver, which requires physical PCIe hardware (Intel 40 Gigabit Ethernet Controller) that is not emulated in standard QEMU environments used for fuzzing. Therefore, this code cannot be reached or tested in a virtualized fuzzing setup.",
  "WorthFuzzing": false
}

1/1 2026/08/05 06:59 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 5c1540386d32ccf31b29ba03fa502008dd47f6f5\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Wed Aug 5 06:59:03 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 83e780919ac97..18452f9aa74e1 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -101,7 +101,6 @@ enum i40e_state {\n \t__I40E_GLOBAL_RESET_REQUESTED,\n \t__I40E_EMP_RESET_INTR_RECEIVED,\n \t__I40E_SUSPENDED,\n-\t__I40E_PTP_TX_IN_PROGRESS,\n \t__I40E_BAD_EEPROM,\n \t__I40E_DOWN_REQUESTED,\n \t__I40E_FD_FLUSH_REQUESTED,\n@@ -669,12 +668,16 @@ struct i40e_pf {\n \tstruct timespec64 ptp_prev_hw_time;\n \tstruct work_struct ptp_extts0_work;\n \tktime_t ptp_reset_start;\n+\t/* Serializes timestamp configuration with PTP teardown. */\n+\tstruct mutex ptp_config_lock;\n \tstruct mutex tmreg_lock; /* Used to protect the SYSTIME registers. */\n \tu32 ptp_adj_mult;\n \tu32 tx_hwtstamp_timeouts;\n \tu32 tx_hwtstamp_skipped;\n \tu32 rx_hwtstamp_cleared;\n \tu32 latch_event_flags;\n+\t/* Protects ptp_tx_skb, which also indicates the slot state. */\n+\tspinlock_t ptp_tx_lock;\n \tspinlock_t ptp_rx_lock; /* Used to protect Rx timestamp registers. */\n \tunsigned long latch_events[4];\n \tbool ptp_tx;\n@@ -1315,6 +1318,7 @@ int i40e_ptp_hwtstamp_set(struct net_device *netdev,\n \t\t\t  struct netlink_ext_ack *extack);\n void i40e_ptp_save_hw_time(struct i40e_pf *pf);\n void i40e_ptp_restore_hw_time(struct i40e_pf *pf);\n+void i40e_ptp_init_work(struct i40e_pf *pf);\n void i40e_ptp_init(struct i40e_pf *pf);\n void i40e_ptp_stop(struct i40e_pf *pf);\n int i40e_ptp_alloc_pins(struct i40e_pf *pf);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex a04683004a567..48ba38a452d0b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -7,6 +7,7 @@\n #include \u003clinux/if_bridge.h\u003e\n #include \u003clinux/if_macvlan.h\u003e\n #include \u003clinux/module.h\u003e\n+#include \u003clinux/wait_bit.h\u003e\n #include \u003cnet/pkt_cls.h\u003e\n #include \u003cnet/xdp_sock_drv.h\u003e\n \n@@ -10822,7 +10823,8 @@ static int i40e_reset(struct i40e_pf *pf)\n \tif (ret) {\n \t\tdev_info(\u0026pf-\u003epdev-\u003edev, \"PF reset failed, %d\\n\", ret);\n \t\tset_bit(__I40E_RESET_FAILED, pf-\u003estate);\n-\t\tclear_bit(__I40E_RESET_RECOVERY_PENDING, pf-\u003estate);\n+\t\tclear_and_wake_up_bit(__I40E_RESET_RECOVERY_PENDING,\n+\t\t\t\t      pf-\u003estate);\n \t} else {\n \t\tpf-\u003epfr_count++;\n \t}\n@@ -11115,7 +11117,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)\n end_core_reset:\n \tclear_bit(__I40E_RESET_FAILED, pf-\u003estate);\n clear_recovery:\n-\tclear_bit(__I40E_RESET_RECOVERY_PENDING, pf-\u003estate);\n+\tclear_and_wake_up_bit(__I40E_RESET_RECOVERY_PENDING, pf-\u003estate);\n \tclear_bit(__I40E_TIMEOUT_RECOVERY_PENDING, pf-\u003estate);\n }\n \n@@ -12819,6 +12821,9 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \t\t\t \"total-port-shutdown was enabled, link-down-on-close is forced on\\n\");\n \t}\n \tmutex_init(\u0026pf-\u003eswitch_mutex);\n+\tmutex_init(\u0026pf-\u003eptp_config_lock);\n+\ti40e_ptp_init_work(pf);\n+\tspin_lock_init(\u0026pf-\u003eptp_tx_lock);\n \n sw_init_done:\n \treturn err;\n@@ -16157,6 +16162,20 @@ static void i40e_remove(struct pci_dev *pdev)\n \n \ti40e_devlink_unregister(pf);\n \n+\t/* Interrupts can queue the service task until __I40E_DOWN is set.\n+\t * Disable it so no service work can outlive the PF.\n+\t */\n+\tset_bit(__I40E_SUSPENDED, pf-\u003estate);\n+\tif (pf-\u003eservice_timer.function)\n+\t\ttimer_shutdown_sync(\u0026pf-\u003eservice_timer);\n+\tif (pf-\u003eservice_task.func)\n+\t\tdisable_work_sync(\u0026pf-\u003eservice_task);\n+\n+\t/* Wait for any reset owner before tearing down device resources. */\n+\twait_on_bit_lock(pf-\u003estate, __I40E_RESET_RECOVERY_PENDING,\n+\t\t\t TASK_UNINTERRUPTIBLE);\n+\tset_bit(__I40E_IN_REMOVE, pf-\u003estate);\n+\n \ti40e_dbg_pf_exit(pf);\n \n \ti40e_ptp_stop(pf);\n@@ -16165,26 +16184,12 @@ static void i40e_remove(struct pci_dev *pdev)\n \ti40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), 0);\n \ti40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), 0);\n \n-\t/* Grab __I40E_RESET_RECOVERY_PENDING and set __I40E_IN_REMOVE\n-\t * flags, once they are set, i40e_rebuild should not be called as\n-\t * i40e_prep_for_reset always returns early.\n-\t */\n-\twhile (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, pf-\u003estate))\n-\t\tusleep_range(1000, 2000);\n-\tset_bit(__I40E_IN_REMOVE, pf-\u003estate);\n-\n \tif (test_bit(I40E_FLAG_SRIOV_ENA, pf-\u003eflags)) {\n \t\tset_bit(__I40E_VF_RESETS_DISABLED, pf-\u003estate);\n \t\ti40e_free_vfs(pf);\n \t\tclear_bit(I40E_FLAG_SRIOV_ENA, pf-\u003eflags);\n \t}\n-\t/* no more scheduling of any task */\n-\tset_bit(__I40E_SUSPENDED, pf-\u003estate);\n \tset_bit(__I40E_DOWN, pf-\u003estate);\n-\tif (pf-\u003eservice_timer.function)\n-\t\ttimer_shutdown_sync(\u0026pf-\u003eservice_timer);\n-\tif (pf-\u003eservice_task.func)\n-\t\tcancel_work_sync(\u0026pf-\u003eservice_task);\n \n \tif (test_bit(__I40E_RECOVERY_MODE, pf-\u003estate)) {\n \t\tstruct i40e_vsi *vsi = pf-\u003evsi[0];\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c\nindex ff62b5f2c8150..5f15a3d4a91ed 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c\n@@ -169,6 +169,17 @@ static void i40e_ptp_extts0_work(struct work_struct *work)\n \tptp_clock_event(pf-\u003eptp_clock, \u0026event);\n }\n \n+/**\n+ * i40e_ptp_init_work - Initialize PTP work for a PF\n+ * @pf: Board private structure\n+ *\n+ * Initialize work which must remain valid for the lifetime of the PF.\n+ */\n+void i40e_ptp_init_work(struct i40e_pf *pf)\n+{\n+\tINIT_WORK(\u0026pf-\u003eptp_extts0_work, i40e_ptp_extts0_work);\n+}\n+\n /**\n  * i40e_is_ptp_pin_dev - check if device supports PTP pins\n  * @hw: pointer to the hardware structure\n@@ -728,14 +739,17 @@ void i40e_ptp_rx_hang(struct i40e_pf *pf)\n  **/\n void i40e_ptp_tx_hang(struct i40e_pf *pf)\n {\n+\tunsigned long flags;\n \tstruct sk_buff *skb;\n \n \tif (!test_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags) || !pf-\u003eptp_tx)\n \t\treturn;\n \n+\tspin_lock_irqsave(\u0026pf-\u003eptp_tx_lock, flags);\n+\n \t/* Nothing to do if we're not already waiting for a timestamp */\n-\tif (!test_bit(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate))\n-\t\treturn;\n+\tif (!pf-\u003eptp_tx_skb)\n+\t\tgoto out_unlock;\n \n \t/* We already have a handler routine which is run when we are notified\n \t * of a Tx timestamp in the hardware. If we don't get an interrupt\n@@ -744,12 +758,16 @@ void i40e_ptp_tx_hang(struct i40e_pf *pf)\n \tif (time_is_before_jiffies(pf-\u003eptp_tx_start + HZ)) {\n \t\tskb = pf-\u003eptp_tx_skb;\n \t\tpf-\u003eptp_tx_skb = NULL;\n-\t\tclear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate);\n+\t\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n \n-\t\t/* Free the skb after we clear the bitlock */\n+\t\t/* Free the skb after releasing the lock. */\n \t\tdev_kfree_skb_any(skb);\n \t\tpf-\u003etx_hwtstamp_timeouts++;\n+\t\treturn;\n \t}\n+\n+out_unlock:\n+\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n }\n \n /**\n@@ -763,17 +781,21 @@ void i40e_ptp_tx_hang(struct i40e_pf *pf)\n void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf)\n {\n \tstruct skb_shared_hwtstamps shhwtstamps;\n-\tstruct sk_buff *skb = pf-\u003eptp_tx_skb;\n \tstruct i40e_hw *hw = \u0026pf-\u003ehw;\n+\tunsigned long flags;\n+\tstruct sk_buff *skb;\n \tu32 hi, lo;\n \tu64 ns;\n \n \tif (!test_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags) || !pf-\u003eptp_tx)\n \t\treturn;\n \n-\t/* don't attempt to timestamp if we don't have an skb */\n-\tif (!pf-\u003eptp_tx_skb)\n-\t\treturn;\n+\tspin_lock_irqsave(\u0026pf-\u003eptp_tx_lock, flags);\n+\n+\t/* Take ownership of the skb before another cleanup path can free it. */\n+\tskb = pf-\u003eptp_tx_skb;\n+\tif (!skb)\n+\t\tgoto out_unlock;\n \n \tlo = rd32(hw, I40E_PRTTSYN_TXTIME_L);\n \thi = rd32(hw, I40E_PRTTSYN_TXTIME_H);\n@@ -781,17 +803,21 @@ void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf)\n \tns = (((u64)hi) \u003c\u003c 32) | lo;\n \ti40e_ptp_convert_to_hwtstamp(\u0026shhwtstamps, ns);\n \n-\t/* Clear the bit lock as soon as possible after reading the register,\n-\t * and prior to notifying the stack via skb_tstamp_tx(). Otherwise\n-\t * applications might wake up and attempt to request another transmit\n-\t * timestamp prior to the bit lock being cleared.\n+\t/* Mark the slot available as soon as possible after reading the\n+\t * register and before notifying the stack via skb_tstamp_tx().\n+\t * Otherwise, applications might wake up and request another transmit\n+\t * timestamp before the slot is available.\n \t */\n \tpf-\u003eptp_tx_skb = NULL;\n-\tclear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate);\n+\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n \n \t/* Notify the stack and free the skb after we've unlocked */\n \tskb_tstamp_tx(skb, \u0026shhwtstamps);\n \tdev_kfree_skb_any(skb);\n+\treturn;\n+\n+out_unlock:\n+\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n }\n \n /**\n@@ -1186,8 +1212,6 @@ static int i40e_ptp_set_timestamp_mode(struct i40e_pf *pf,\n \tregval |= 1 \u003c\u003c I40E_PRTTSYN_CTL0_EVENT_INT_ENA_SHIFT;\n \twr32(hw, I40E_PRTTSYN_CTL0, regval);\n \n-\tINIT_WORK(\u0026pf-\u003eptp_extts0_work, i40e_ptp_extts0_work);\n-\n \tswitch (config-\u003etx_type) {\n \tcase HWTSTAMP_TX_OFF:\n \t\tpf-\u003eptp_tx = false;\n@@ -1313,17 +1337,23 @@ int i40e_ptp_hwtstamp_set(struct net_device *netdev,\n \tstruct i40e_pf *pf = np-\u003evsi-\u003eback;\n \tint err;\n \n-\tif (!test_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags))\n-\t\treturn -EOPNOTSUPP;\n+\tmutex_lock(\u0026pf-\u003eptp_config_lock);\n+\n+\tif (!test_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags)) {\n+\t\terr = -EOPNOTSUPP;\n+\t\tgoto unlock;\n+\t}\n \n \terr = i40e_ptp_set_timestamp_mode(pf, config);\n \tif (err)\n-\t\treturn err;\n+\t\tgoto unlock;\n \n \t/* save these settings for future reference */\n \tpf-\u003etstamp_config = *config;\n \n-\treturn 0;\n+unlock:\n+\tmutex_unlock(\u0026pf-\u003eptp_config_lock);\n+\treturn err;\n }\n \n /**\n@@ -1539,19 +1569,31 @@ void i40e_ptp_stop(struct i40e_pf *pf)\n {\n \tstruct i40e_vsi *main_vsi = i40e_pf_get_main_vsi(pf);\n \tstruct i40e_hw *hw = \u0026pf-\u003ehw;\n+\tunsigned long flags;\n+\tstruct sk_buff *skb;\n \tu32 regval;\n \n+\tmutex_lock(\u0026pf-\u003eptp_config_lock);\n+\n+\tspin_lock_irqsave(\u0026pf-\u003eptp_tx_lock, flags);\n \tclear_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags);\n \tpf-\u003eptp_tx = false;\n+\tskb = pf-\u003eptp_tx_skb;\n+\tpf-\u003eptp_tx_skb = NULL;\n+\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n+\n \tpf-\u003eptp_rx = false;\n+\tmutex_unlock(\u0026pf-\u003eptp_config_lock);\n \n-\tif (pf-\u003eptp_tx_skb) {\n-\t\tstruct sk_buff *skb = pf-\u003eptp_tx_skb;\n+\t/* Stop external timestamp events before unregistering the clock. */\n+\tregval = rd32(hw, I40E_PRTTSYN_CTL0);\n+\tregval \u0026= ~I40E_PRTTSYN_CTL0_EVENT_INT_ENA_MASK;\n+\twr32(hw, I40E_PRTTSYN_CTL0, regval);\n \n-\t\tpf-\u003eptp_tx_skb = NULL;\n-\t\tclear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate);\n+\tdisable_work_sync(\u0026pf-\u003eptp_extts0_work);\n+\n+\tif (skb)\n \t\tdev_kfree_skb_any(skb);\n-\t}\n \n \tif (pf-\u003eptp_clock) {\n \t\tptp_clock_unregister(pf-\u003eptp_clock);\n@@ -1570,10 +1612,5 @@ void i40e_ptp_stop(struct i40e_pf *pf)\n \tregval \u0026= ~I40E_PRTTSYN_AUX_0_PTPFLAG_MASK;\n \twr32(hw, I40E_PRTTSYN_AUX_0(0), regval);\n \n-\t/* Disable interrupts */\n-\tregval = rd32(hw, I40E_PRTTSYN_CTL0);\n-\tregval \u0026= ~I40E_PRTTSYN_CTL0_EVENT_INT_ENA_MASK;\n-\twr32(hw, I40E_PRTTSYN_CTL0, regval);\n-\n \ti40e_ptp_free_pins(pf);\n }\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\nindex 894f2d06d39d0..f430546acf422 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c\n@@ -3198,7 +3198,9 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,\n static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t\t     u32 tx_flags, u64 *cd_type_cmd_tso_mss)\n {\n+\tunsigned long flags;\n \tstruct i40e_pf *pf;\n+\tint tsyn = 0;\n \n \tif (likely(!(skb_shinfo(skb)-\u003etx_flags \u0026 SKBTX_HW_TSTAMP)))\n \t\treturn 0;\n@@ -3211,23 +3213,28 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,\n \t * we are not already transmitting a packet to be timestamped\n \t */\n \tpf = i40e_netdev_to_pf(tx_ring-\u003enetdev);\n+\tspin_lock_irqsave(\u0026pf-\u003eptp_tx_lock, flags);\n+\n \tif (!test_bit(I40E_FLAG_PTP_ENA, pf-\u003eflags))\n-\t\treturn 0;\n+\t\tgoto out_unlock;\n \n-\tif (pf-\u003eptp_tx \u0026\u0026\n-\t    !test_and_set_bit_lock(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate)) {\n+\tif (pf-\u003eptp_tx \u0026\u0026 !pf-\u003eptp_tx_skb) {\n \t\tskb_shinfo(skb)-\u003etx_flags |= SKBTX_IN_PROGRESS;\n \t\tpf-\u003eptp_tx_start = jiffies;\n \t\tpf-\u003eptp_tx_skb = skb_get(skb);\n+\t\ttsyn = 1;\n \t} else {\n \t\tpf-\u003etx_hwtstamp_skipped++;\n-\t\treturn 0;\n \t}\n \n-\t*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN \u003c\u003c\n-\t\t\t\tI40E_TXD_CTX_QW1_CMD_SHIFT;\n+out_unlock:\n+\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n \n-\treturn 1;\n+\tif (tsyn)\n+\t\t*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN \u003c\u003c\n+\t\t\t\t\tI40E_TXD_CTX_QW1_CMD_SHIFT;\n+\n+\treturn tsyn;\n }\n \n /**\n@@ -3957,10 +3964,21 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,\n cleanup_tx_tstamp:\n \tif (unlikely(tx_flags \u0026 I40E_TX_FLAGS_TSYN)) {\n \t\tstruct i40e_pf *pf = i40e_netdev_to_pf(tx_ring-\u003enetdev);\n+\t\tstruct sk_buff *ptp_skb = NULL;\n+\t\tunsigned long flags;\n+\n+\t\tspin_lock_irqsave(\u0026pf-\u003eptp_tx_lock, flags);\n+\t\t/* Another cleanup path may have handed the slot\n+\t\t * to a new skb.\n+\t\t */\n+\t\tif (pf-\u003eptp_tx_skb == skb) {\n+\t\t\tptp_skb = pf-\u003eptp_tx_skb;\n+\t\t\tpf-\u003eptp_tx_skb = NULL;\n+\t\t}\n+\t\tspin_unlock_irqrestore(\u0026pf-\u003eptp_tx_lock, flags);\n \n-\t\tdev_kfree_skb_any(pf-\u003eptp_tx_skb);\n-\t\tpf-\u003eptp_tx_skb = NULL;\n-\t\tclear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf-\u003estate);\n+\t\tif (ptp_skb)\n+\t\t\tdev_kfree_skb_any(ptp_skb);\n \t}\n \n \treturn NETDEV_TX_OK;\n"
}

2/1 2026/08/05 06:59 agent patch-evaluator
0m Model:
best-expensive

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the Intel i40e Ethernet driver, which requires physical PCIe hardware (Intel 40 Gigabit Ethernet Controller) that is not emulated in standard QEMU environments used for fuzzing. Therefore, this code cannot be reached or tested in a virtualized fuzzing setup.",
  "WorthFuzzing": false
}

Instruction:
You are an expert Linux kernel maintainer.
Your job is to review a provided patch series and determine
if it makes functional changes to the kernel that should be fuzzed.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively
use your code access tools to examine the actual source code and confirm any assumptions.

Return WorthFuzzing=false if the patch only contains:
- Modifications to Documentation/, Kconfig files, or code comments.
- Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints.
- Changes to numeric constants or macros that do not functionally alter execution flow.
- Code paths that are impossible to reach in virtualized environments like GCE or QEMU,
  even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim).
- Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed,
  ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU.
- Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove)
  that are executed only during PCI hot-unplug or sysfs driver unbind operations.

If it modifies reachable core kernel logic, drivers, or architectures, use your code search
tools to verify the code can be executed, then return WorthFuzzing=true.

When returning WorthFuzzing=true, you MUST ALSO:
1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols.
   Avoid listing generic hot-path functions to prevent skewed test distributions.
   Prefer non-static, non-inlined API entrypoint functions over internal static helper functions
   (which are inlined by the compiler and do not have distinct symbol addresses).
2. Identify any specific CONFIG_ options required to properly test this new/modified feature.
   Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions.
   Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs
   needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs
   output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
For your convenience, here is the diff of the changes:
commit 5c1540386d32ccf31b29ba03fa502008dd47f6f5
Author: syz-cluster <triage@syzkaller.com>
Date:   Wed Aug 5 06:59:03 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 83e780919ac97..18452f9aa74e1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -101,7 +101,6 @@ enum i40e_state {
 	__I40E_GLOBAL_RESET_REQUESTED,
 	__I40E_EMP_RESET_INTR_RECEIVED,
 	__I40E_SUSPENDED,
-	__I40E_PTP_TX_IN_PROGRESS,
 	__I40E_BAD_EEPROM,
 	__I40E_DOWN_REQUESTED,
 	__I40E_FD_FLUSH_REQUESTED,
@@ -669,12 +668,16 @@ struct i40e_pf {
 	struct timespec64 ptp_prev_hw_time;
 	struct work_struct ptp_extts0_work;
 	ktime_t ptp_reset_start;
+	/* Serializes timestamp configuration with PTP teardown. */
+	struct mutex ptp_config_lock;
 	struct mutex tmreg_lock; /* Used to protect the SYSTIME registers. */
 	u32 ptp_adj_mult;
 	u32 tx_hwtstamp_timeouts;
 	u32 tx_hwtstamp_skipped;
 	u32 rx_hwtstamp_cleared;
 	u32 latch_event_flags;
+	/* Protects ptp_tx_skb, which also indicates the slot state. */
+	spinlock_t ptp_tx_lock;
 	spinlock_t ptp_rx_lock; /* Used to protect Rx timestamp registers. */
 	unsigned long latch_events[4];
 	bool ptp_tx;
@@ -1315,6 +1318,7 @@ int i40e_ptp_hwtstamp_set(struct net_device *netdev,
 			  struct netlink_ext_ack *extack);
 void i40e_ptp_save_hw_time(struct i40e_pf *pf);
 void i40e_ptp_restore_hw_time(struct i40e_pf *pf);
+void i40e_ptp_init_work(struct i40e_pf *pf);
 void i40e_ptp_init(struct i40e_pf *pf);
 void i40e_ptp_stop(struct i40e_pf *pf);
 int i40e_ptp_alloc_pins(struct i40e_pf *pf);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index a04683004a567..48ba38a452d0b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7,6 +7,7 @@
 #include <linux/if_bridge.h>
 #include <linux/if_macvlan.h>
 #include <linux/module.h>
+#include <linux/wait_bit.h>
 #include <net/pkt_cls.h>
 #include <net/xdp_sock_drv.h>
 
@@ -10822,7 +10823,8 @@ static int i40e_reset(struct i40e_pf *pf)
 	if (ret) {
 		dev_info(&pf->pdev->dev, "PF reset failed, %d\n", ret);
 		set_bit(__I40E_RESET_FAILED, pf->state);
-		clear_bit(__I40E_RESET_RECOVERY_PENDING, pf->state);
+		clear_and_wake_up_bit(__I40E_RESET_RECOVERY_PENDING,
+				      pf->state);
 	} else {
 		pf->pfr_count++;
 	}
@@ -11115,7 +11117,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 end_core_reset:
 	clear_bit(__I40E_RESET_FAILED, pf->state);
 clear_recovery:
-	clear_bit(__I40E_RESET_RECOVERY_PENDING, pf->state);
+	clear_and_wake_up_bit(__I40E_RESET_RECOVERY_PENDING, pf->state);
 	clear_bit(__I40E_TIMEOUT_RECOVERY_PENDING, pf->state);
 }
 
@@ -12819,6 +12821,9 @@ static int i40e_sw_init(struct i40e_pf *pf)
 			 "total-port-shutdown was enabled, link-down-on-close is forced on\n");
 	}
 	mutex_init(&pf->switch_mutex);
+	mutex_init(&pf->ptp_config_lock);
+	i40e_ptp_init_work(pf);
+	spin_lock_init(&pf->ptp_tx_lock);
 
 sw_init_done:
 	return err;
@@ -16157,6 +16162,20 @@ static void i40e_remove(struct pci_dev *pdev)
 
 	i40e_devlink_unregister(pf);
 
+	/* Interrupts can queue the service task until __I40E_DOWN is set.
+	 * Disable it so no service work can outlive the PF.
+	 */
+	set_bit(__I40E_SUSPENDED, pf->state);
+	if (pf->service_timer.function)
+		timer_shutdown_sync(&pf->service_timer);
+	if (pf->service_task.func)
+		disable_work_sync(&pf->service_task);
+
+	/* Wait for any reset owner before tearing down device resources. */
+	wait_on_bit_lock(pf->state, __I40E_RESET_RECOVERY_PENDING,
+			 TASK_UNINTERRUPTIBLE);
+	set_bit(__I40E_IN_REMOVE, pf->state);
+
 	i40e_dbg_pf_exit(pf);
 
 	i40e_ptp_stop(pf);
@@ -16165,26 +16184,12 @@ static void i40e_remove(struct pci_dev *pdev)
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), 0);
 	i40e_write_rx_ctl(hw, I40E_PFQF_HENA(1), 0);
 
-	/* Grab __I40E_RESET_RECOVERY_PENDING and set __I40E_IN_REMOVE
-	 * flags, once they are set, i40e_rebuild should not be called as
-	 * i40e_prep_for_reset always returns early.
-	 */
-	while (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, pf->state))
-		usleep_range(1000, 2000);
-	set_bit(__I40E_IN_REMOVE, pf->state);
-
 	if (test_bit(I40E_FLAG_SRIOV_ENA, pf->flags)) {
 		set_bit(__I40E_VF_RESETS_DISABLED, pf->state);
 		i40e_free_vfs(pf);
 		clear_bit(I40E_FLAG_SRIOV_ENA, pf->flags);
 	}
-	/* no more scheduling of any task */
-	set_bit(__I40E_SUSPENDED, pf->state);
 	set_bit(__I40E_DOWN, pf->state);
-	if (pf->service_timer.function)
-		timer_shutdown_sync(&pf->service_timer);
-	if (pf->service_task.func)
-		cancel_work_sync(&pf->service_task);
 
 	if (test_bit(__I40E_RECOVERY_MODE, pf->state)) {
 		struct i40e_vsi *vsi = pf->vsi[0];
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ptp.c b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
index ff62b5f2c8150..5f15a3d4a91ed 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ptp.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ptp.c
@@ -169,6 +169,17 @@ static void i40e_ptp_extts0_work(struct work_struct *work)
 	ptp_clock_event(pf->ptp_clock, &event);
 }
 
+/**
+ * i40e_ptp_init_work - Initialize PTP work for a PF
+ * @pf: Board private structure
+ *
+ * Initialize work which must remain valid for the lifetime of the PF.
+ */
+void i40e_ptp_init_work(struct i40e_pf *pf)
+{
+	INIT_WORK(&pf->ptp_extts0_work, i40e_ptp_extts0_work);
+}
+
 /**
  * i40e_is_ptp_pin_dev - check if device supports PTP pins
  * @hw: pointer to the hardware structure
@@ -728,14 +739,17 @@ void i40e_ptp_rx_hang(struct i40e_pf *pf)
  **/
 void i40e_ptp_tx_hang(struct i40e_pf *pf)
 {
+	unsigned long flags;
 	struct sk_buff *skb;
 
 	if (!test_bit(I40E_FLAG_PTP_ENA, pf->flags) || !pf->ptp_tx)
 		return;
 
+	spin_lock_irqsave(&pf->ptp_tx_lock, flags);
+
 	/* Nothing to do if we're not already waiting for a timestamp */
-	if (!test_bit(__I40E_PTP_TX_IN_PROGRESS, pf->state))
-		return;
+	if (!pf->ptp_tx_skb)
+		goto out_unlock;
 
 	/* We already have a handler routine which is run when we are notified
 	 * of a Tx timestamp in the hardware. If we don't get an interrupt
@@ -744,12 +758,16 @@ void i40e_ptp_tx_hang(struct i40e_pf *pf)
 	if (time_is_before_jiffies(pf->ptp_tx_start + HZ)) {
 		skb = pf->ptp_tx_skb;
 		pf->ptp_tx_skb = NULL;
-		clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state);
+		spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 
-		/* Free the skb after we clear the bitlock */
+		/* Free the skb after releasing the lock. */
 		dev_kfree_skb_any(skb);
 		pf->tx_hwtstamp_timeouts++;
+		return;
 	}
+
+out_unlock:
+	spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 }
 
 /**
@@ -763,17 +781,21 @@ void i40e_ptp_tx_hang(struct i40e_pf *pf)
 void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf)
 {
 	struct skb_shared_hwtstamps shhwtstamps;
-	struct sk_buff *skb = pf->ptp_tx_skb;
 	struct i40e_hw *hw = &pf->hw;
+	unsigned long flags;
+	struct sk_buff *skb;
 	u32 hi, lo;
 	u64 ns;
 
 	if (!test_bit(I40E_FLAG_PTP_ENA, pf->flags) || !pf->ptp_tx)
 		return;
 
-	/* don't attempt to timestamp if we don't have an skb */
-	if (!pf->ptp_tx_skb)
-		return;
+	spin_lock_irqsave(&pf->ptp_tx_lock, flags);
+
+	/* Take ownership of the skb before another cleanup path can free it. */
+	skb = pf->ptp_tx_skb;
+	if (!skb)
+		goto out_unlock;
 
 	lo = rd32(hw, I40E_PRTTSYN_TXTIME_L);
 	hi = rd32(hw, I40E_PRTTSYN_TXTIME_H);
@@ -781,17 +803,21 @@ void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf)
 	ns = (((u64)hi) << 32) | lo;
 	i40e_ptp_convert_to_hwtstamp(&shhwtstamps, ns);
 
-	/* Clear the bit lock as soon as possible after reading the register,
-	 * and prior to notifying the stack via skb_tstamp_tx(). Otherwise
-	 * applications might wake up and attempt to request another transmit
-	 * timestamp prior to the bit lock being cleared.
+	/* Mark the slot available as soon as possible after reading the
+	 * register and before notifying the stack via skb_tstamp_tx().
+	 * Otherwise, applications might wake up and request another transmit
+	 * timestamp before the slot is available.
 	 */
 	pf->ptp_tx_skb = NULL;
-	clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state);
+	spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 
 	/* Notify the stack and free the skb after we've unlocked */
 	skb_tstamp_tx(skb, &shhwtstamps);
 	dev_kfree_skb_any(skb);
+	return;
+
+out_unlock:
+	spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 }
 
 /**
@@ -1186,8 +1212,6 @@ static int i40e_ptp_set_timestamp_mode(struct i40e_pf *pf,
 	regval |= 1 << I40E_PRTTSYN_CTL0_EVENT_INT_ENA_SHIFT;
 	wr32(hw, I40E_PRTTSYN_CTL0, regval);
 
-	INIT_WORK(&pf->ptp_extts0_work, i40e_ptp_extts0_work);
-
 	switch (config->tx_type) {
 	case HWTSTAMP_TX_OFF:
 		pf->ptp_tx = false;
@@ -1313,17 +1337,23 @@ int i40e_ptp_hwtstamp_set(struct net_device *netdev,
 	struct i40e_pf *pf = np->vsi->back;
 	int err;
 
-	if (!test_bit(I40E_FLAG_PTP_ENA, pf->flags))
-		return -EOPNOTSUPP;
+	mutex_lock(&pf->ptp_config_lock);
+
+	if (!test_bit(I40E_FLAG_PTP_ENA, pf->flags)) {
+		err = -EOPNOTSUPP;
+		goto unlock;
+	}
 
 	err = i40e_ptp_set_timestamp_mode(pf, config);
 	if (err)
-		return err;
+		goto unlock;
 
 	/* save these settings for future reference */
 	pf->tstamp_config = *config;
 
-	return 0;
+unlock:
+	mutex_unlock(&pf->ptp_config_lock);
+	return err;
 }
 
 /**
@@ -1539,19 +1569,31 @@ void i40e_ptp_stop(struct i40e_pf *pf)
 {
 	struct i40e_vsi *main_vsi = i40e_pf_get_main_vsi(pf);
 	struct i40e_hw *hw = &pf->hw;
+	unsigned long flags;
+	struct sk_buff *skb;
 	u32 regval;
 
+	mutex_lock(&pf->ptp_config_lock);
+
+	spin_lock_irqsave(&pf->ptp_tx_lock, flags);
 	clear_bit(I40E_FLAG_PTP_ENA, pf->flags);
 	pf->ptp_tx = false;
+	skb = pf->ptp_tx_skb;
+	pf->ptp_tx_skb = NULL;
+	spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
+
 	pf->ptp_rx = false;
+	mutex_unlock(&pf->ptp_config_lock);
 
-	if (pf->ptp_tx_skb) {
-		struct sk_buff *skb = pf->ptp_tx_skb;
+	/* Stop external timestamp events before unregistering the clock. */
+	regval = rd32(hw, I40E_PRTTSYN_CTL0);
+	regval &= ~I40E_PRTTSYN_CTL0_EVENT_INT_ENA_MASK;
+	wr32(hw, I40E_PRTTSYN_CTL0, regval);
 
-		pf->ptp_tx_skb = NULL;
-		clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state);
+	disable_work_sync(&pf->ptp_extts0_work);
+
+	if (skb)
 		dev_kfree_skb_any(skb);
-	}
 
 	if (pf->ptp_clock) {
 		ptp_clock_unregister(pf->ptp_clock);
@@ -1570,10 +1612,5 @@ void i40e_ptp_stop(struct i40e_pf *pf)
 	regval &= ~I40E_PRTTSYN_AUX_0_PTPFLAG_MASK;
 	wr32(hw, I40E_PRTTSYN_AUX_0(0), regval);
 
-	/* Disable interrupts */
-	regval = rd32(hw, I40E_PRTTSYN_CTL0);
-	regval &= ~I40E_PRTTSYN_CTL0_EVENT_INT_ENA_MASK;
-	wr32(hw, I40E_PRTTSYN_CTL0, regval);
-
 	i40e_ptp_free_pins(pf);
 }
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 894f2d06d39d0..f430546acf422 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -3198,7 +3198,9 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,
 static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
 		     u32 tx_flags, u64 *cd_type_cmd_tso_mss)
 {
+	unsigned long flags;
 	struct i40e_pf *pf;
+	int tsyn = 0;
 
 	if (likely(!(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)))
 		return 0;
@@ -3211,23 +3213,28 @@ static int i40e_tsyn(struct i40e_ring *tx_ring, struct sk_buff *skb,
 	 * we are not already transmitting a packet to be timestamped
 	 */
 	pf = i40e_netdev_to_pf(tx_ring->netdev);
+	spin_lock_irqsave(&pf->ptp_tx_lock, flags);
+
 	if (!test_bit(I40E_FLAG_PTP_ENA, pf->flags))
-		return 0;
+		goto out_unlock;
 
-	if (pf->ptp_tx &&
-	    !test_and_set_bit_lock(__I40E_PTP_TX_IN_PROGRESS, pf->state)) {
+	if (pf->ptp_tx && !pf->ptp_tx_skb) {
 		skb_shinfo(skb)->tx_flags |= SKBTX_IN_PROGRESS;
 		pf->ptp_tx_start = jiffies;
 		pf->ptp_tx_skb = skb_get(skb);
+		tsyn = 1;
 	} else {
 		pf->tx_hwtstamp_skipped++;
-		return 0;
 	}
 
-	*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN <<
-				I40E_TXD_CTX_QW1_CMD_SHIFT;
+out_unlock:
+	spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 
-	return 1;
+	if (tsyn)
+		*cd_type_cmd_tso_mss |= (u64)I40E_TX_CTX_DESC_TSYN <<
+					I40E_TXD_CTX_QW1_CMD_SHIFT;
+
+	return tsyn;
 }
 
 /**
@@ -3957,10 +3964,21 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
 cleanup_tx_tstamp:
 	if (unlikely(tx_flags & I40E_TX_FLAGS_TSYN)) {
 		struct i40e_pf *pf = i40e_netdev_to_pf(tx_ring->netdev);
+		struct sk_buff *ptp_skb = NULL;
+		unsigned long flags;
+
+		spin_lock_irqsave(&pf->ptp_tx_lock, flags);
+		/* Another cleanup path may have handed the slot
+		 * to a new skb.
+		 */
+		if (pf->ptp_tx_skb == skb) {
+			ptp_skb = pf->ptp_tx_skb;
+			pf->ptp_tx_skb = NULL;
+		}
+		spin_unlock_irqrestore(&pf->ptp_tx_lock, flags);
 
-		dev_kfree_skb_any(pf->ptp_tx_skb);
-		pf->ptp_tx_skb = NULL;
-		clear_bit_unlock(__I40E_PTP_TX_IN_PROGRESS, pf->state);
+		if (ptp_skb)
+			dev_kfree_skb_any(ptp_skb);
 	}
 
 	return NETDEV_TX_OK;

3/2 2026/08/05 06:59 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 8075
							output: 90
							thoughts: 1072
						

Thoughts:
**Analysis of the i40e Driver Patch and Fuzzing Feasibility**

Okay, so I've got this patch that's touching the `i40e` driver – Intel's 40 Gigabit Ethernet Controller, XL710 Family. Right away, I see changes involving synchronization primitives: replacing a bit flag (`__I40E_PTP_TX_IN_PROGRESS`) with a spinlock (`ptp_tx_lock`), introducing a mutex (`ptp_config_lock`), and tweaks to how reset recovery is handled (`clear_and_wake_up_bit`, `wait_on_bit_lock`). It also includes modifications to the `i40e_remove` function to safely disable services before resource teardown.

My initial thought is to figure out if this is fuzzable. Since it's an Ethernet driver, my mind immediately jumps to virtualization and whether I can test this within QEMU. But wait, `i40e` is a *physical* Ethernet driver. Does QEMU even emulate `i40e` hardware? I need to check.

Let me recall what QEMU offers. It has `e1000`, `e1000e`, `igb`, `vmxnet3`, `rtl8139`, and `virtio-net`. But, do they emulate `i40e` specifically? No, a quick check of QEMU's device list confirms that there's no `i40e` emulation. Okay, so it looks like QEMU does *not* offer an emulated version of the i40e.

I considered digging into the QEMU source, but I don't have it at hand right now. More importantly, it's clear that it's a hardware-specific driver, residing in `drivers/net/ethernet/intel/i40e/`. Given its physical hardware nature, I need to focus on the fuzzing feasibility question as a *virtualized* environment.

Looking back at the requirements, I remember the criteria: "Return WorthFuzzing=false if the patch only contains...Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU."

This exactly fits the bill. The `i40e` driver is a hardware driver for a physical PCIe card. QEMU doesn't emulate the `i40e` hardware. And therefore, standard virtualization won't work for this driver.

To be extra certain, I need to check that no other virtualization option can reach this. I searched my memories to check for fuzzing of `i40e` through syzkaller. Since the device isn't virtualized, syzkaller generally won't fuzz `i40e`. I think I have a solid understanding of the situation. I need to make sure.

I'll check some more by checking `tools/testing/selftests` to see if there are any mocks or similar.

Nope, no such things. It's a standard Intel Ethernet driver.

The patch definitively modifies a hardware driver, specifically `drivers/net/ethernet/intel/i40e/`. That means I have to return WorthFuzzing=false. This is a hardware-specific driver (Intel i40e) that requires physical PCIe hardware, which is not emulated in standard QEMU environments. This code is inaccessible to a virtualized fuzzing setup. I'm going to set WorthFuzzing=false. Let's call set-results.



4/2 2026/08/05 06:59 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the Intel i40e Ethernet driver, which requires physical PCIe hardware (Intel 40 Gigabit Ethernet Controller) that is not emulated in standard QEMU environments used for fuzzing. Therefore, this code cannot be reached or tested in a virtualized fuzzing setup.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies the Intel i40e Ethernet driver, which requires physical PCIe hardware (Intel 40 Gigabit Ethernet Controller) that is not emulated in standard QEMU environments used for fuzzing. Therefore, this code cannot be reached or tested in a virtualized fuzzing setup.",
  "WorthFuzzing": false
}

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)