AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/15 07:04 flow patch-triage
3m Args:
null

Results:
{
  "EnableConfigs": [
    "NETDEVSIM",
    "PTP_1588_CLOCK_MOCK",
    "PTP_1588_CLOCK"
  ],
  "FocusSymbols": [
    "nsim_set_ts_config",
    "nsim_get_ts_config",
    "nsim_get_ts_info",
    "mock_phc_adjfine",
    "mock_phc_adjtime",
    "mock_phc_settime64",
    "mock_phc_gettime64"
  ],
  "KMSANReasoning": "The patch introduces hardware timestamping support to the netdevsim driver. It adds `nsim_get_ts_config` and `nsim_set_ts_config` to configure timestamping, which read/write to a zero-initialized `tstamp_config` structure. It modifies `nsim_start_xmit` to capture TX and RX timestamps using `mock_phc_gettime64`. The `timespec64` variables `tx_ts` and `rx_ts` are fully initialized by `mock_phc_gettime64` before being converted to `ktime_t` and stored in the skb's `hwtstamps`. The `skb_shared_hwtstamps` structure is zero-initialized before use. The `hwtstamp_config` structure copied to userspace in `dev_get_hwtstamp` is fully initialized by `hwtstamp_config_from_kernel`, and it has no padding. There are no new structures copied to userspace with uninitialized padding or fields, and no conditional logic depending on uninitialized variables. Any potential bugs introduced by this patch (e.g., NULL pointer dereferences, use-after-free, or locking issues) would be caught by standard KASAN and LOCKDEP. Therefore, a dedicated KMSAN fuzzing session is not justified.",
  "NeedsKMSAN": false,
  "Reasoning": "The patch adds hardware timestamping support to the netdevsim driver, which is a software-emulated networking device heavily used for testing and fuzzing. It implements new ndo_hwtstamp_set, ndo_hwtstamp_get, and get_ts_info callbacks, and modifies the mock_phc PTP clock driver to be safe for use in atomic contexts (e.g., during packet transmission). These changes introduce new reachable control paths and data flows that should be fuzzed.",
  "WorthFuzzing": true
}

1/1 2026/08/15 07:04 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit f34ee39ba8d1079ae8053c6021141a8f209bc494\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sat Aug 15 07:04:43 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c\nindex 025ea79879f3a..24e7d5592e799 100644\n--- a/drivers/net/netdevsim/ethtool.c\n+++ b/drivers/net/netdevsim/ethtool.c\n@@ -200,7 +200,22 @@ static int nsim_get_ts_info(struct net_device *dev,\n {\n \tstruct netdevsim *ns = netdev_priv(dev);\n \n+\tethtool_op_get_ts_info(dev, info);\n+\tif (!ns-\u003ephc) {\n+\t\tinfo-\u003ephc_index = -1;\n+\t\treturn 0;\n+\t}\n+\n \tinfo-\u003ephc_index = mock_phc_index(ns-\u003ephc);\n+\tif (info-\u003ephc_index \u003c 0)\n+\t\treturn 0;\n+\n+\tinfo-\u003eso_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |\n+\t\t\t\t SOF_TIMESTAMPING_RX_HARDWARE |\n+\t\t\t\t SOF_TIMESTAMPING_RAW_HARDWARE;\n+\n+\tinfo-\u003etx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);\n+\tinfo-\u003erx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);\n \n \treturn 0;\n }\ndiff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c\nindex 4e9d7e10b527e..e586fd8f3bc37 100644\n--- a/drivers/net/netdevsim/netdev.c\n+++ b/drivers/net/netdevsim/netdev.c\n@@ -30,6 +30,8 @@\n #include \u003cnet/rtnetlink.h\u003e\n #include \u003cnet/udp_tunnel.h\u003e\n #include \u003cnet/busy_poll.h\u003e\n+#include \u003clinux/ptp_clock_kernel.h\u003e\n+#include \u003clinux/timecounter.h\u003e\n \n #include \"netdevsim.h\"\n \n@@ -122,7 +124,12 @@ static int nsim_forward_skb(struct net_device *tx_dev,\n \n static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)\n {\n+\tstruct skb_shared_hwtstamps shhwtstamps = {};\n+\tstruct ptp_clock_info *ptp_info_tx = NULL;\n+\tstruct ptp_clock_info *ptp_info_rx = NULL;\n \tstruct netdevsim *ns = netdev_priv(dev);\n+\tstruct timespec64 tx_ts, rx_ts;\n+\tstruct sk_buff *skb_orig = skb;\n \tstruct skb_ext *psp_ext = NULL;\n \tstruct net_device *peer_dev;\n \tunsigned int len = skb-\u003elen;\n@@ -164,6 +171,44 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)\n \t\tskb_linearize(skb);\n \n \tskb_tx_timestamp(skb);\n+\n+\tif (unlikely(READ_ONCE(peer_ns-\u003etstamp_config.rx_filter) !=\n+\t\t     HWTSTAMP_FILTER_NONE))\n+\t\tptp_info_rx = mock_phc_get_ptp_info(peer_ns-\u003ephc);\n+\n+\tif (unlikely(skb_shinfo(skb)-\u003etx_flags \u0026 SKBTX_HW_TSTAMP) \u0026\u0026\n+\t    READ_ONCE(ns-\u003etstamp_config.tx_type) == HWTSTAMP_TX_ON)\n+\t\tptp_info_tx = mock_phc_get_ptp_info(ns-\u003ephc);\n+\n+\tif (unlikely(ptp_info_tx || ptp_info_rx)) {\n+\t\t/* Capture both timestamps closely */\n+\t\tif (ptp_info_tx)\n+\t\t\tptp_info_tx-\u003egettime64(ptp_info_tx, \u0026tx_ts);\n+\t\tif (ptp_info_rx)\n+\t\t\tptp_info_rx-\u003egettime64(ptp_info_rx, \u0026rx_ts);\n+\n+\t\t/* If TX hardware timestamping is enabled report TX timestamp */\n+\t\tif (ptp_info_tx) {\n+\t\t\tshhwtstamps.hwtstamp = timespec64_to_ktime(tx_ts);\n+\t\t\tskb_tstamp_tx(skb_orig, \u0026shhwtstamps);\n+\t\t}\n+\n+\t\t/* Unshare the skb, stamping it must not corrupt cloned copies\n+\t\t * and prevents returning single tstamp for Tx and Rx\n+\t\t */\n+\t\tskb = skb_unshare(skb_orig, GFP_ATOMIC);\n+\t\tif (unlikely(!skb)) {\n+\t\t\tif (psp_ext)\n+\t\t\t\t__skb_ext_put(psp_ext);\n+\t\t\tgoto out_drop_cnt;\n+\t\t}\n+\n+\t\t/* If RX hardware timestamping is enabled report RX timestamp */\n+\t\tif (ptp_info_rx)\n+\t\t\tskb_hwtstamps(skb)-\u003ehwtstamp =\n+\t\t\t\ttimespec64_to_ktime(rx_ts);\n+\t}\n+\n \tif (unlikely(nsim_forward_skb(dev, peer_dev,\n \t\t\t\t      skb, rq, psp_ext) == NET_RX_DROP))\n \t\tgoto out_drop_cnt;\n@@ -185,6 +230,63 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)\n \treturn NETDEV_TX_OK;\n }\n \n+static int nsim_set_ts_config(struct net_device *netdev,\n+\t\t\t      struct kernel_hwtstamp_config *config,\n+\t\t\t      struct netlink_ext_ack *extack)\n+{\n+\tstruct netdevsim *ns = netdev_priv(netdev);\n+\tint rx_filter;\n+\n+\tif (!ns-\u003ephc)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tswitch (config-\u003erx_filter) {\n+\tcase HWTSTAMP_FILTER_NONE:\n+\t\trx_filter = HWTSTAMP_FILTER_NONE;\n+\t\tbreak;\n+\tcase HWTSTAMP_FILTER_PTP_V1_L4_EVENT:\n+\tcase HWTSTAMP_FILTER_PTP_V1_L4_SYNC:\n+\tcase HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:\n+\tcase HWTSTAMP_FILTER_PTP_V2_EVENT:\n+\tcase HWTSTAMP_FILTER_PTP_V2_L4_EVENT:\n+\tcase HWTSTAMP_FILTER_PTP_V2_SYNC:\n+\tcase HWTSTAMP_FILTER_PTP_V2_L4_SYNC:\n+\tcase HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:\n+\tcase HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:\n+\tcase HWTSTAMP_FILTER_NTP_ALL:\n+\tcase HWTSTAMP_FILTER_ALL:\n+\t\trx_filter = HWTSTAMP_FILTER_ALL;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -ERANGE;\n+\t}\n+\n+\tswitch (config-\u003etx_type) {\n+\tcase HWTSTAMP_TX_OFF:\n+\t\tWRITE_ONCE(ns-\u003etstamp_config.tx_type, HWTSTAMP_TX_OFF);\n+\t\tbreak;\n+\tcase HWTSTAMP_TX_ON:\n+\t\tWRITE_ONCE(ns-\u003etstamp_config.tx_type, HWTSTAMP_TX_ON);\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -ERANGE;\n+\t}\n+\n+\tWRITE_ONCE(ns-\u003etstamp_config.rx_filter, rx_filter);\n+\tconfig-\u003erx_filter = rx_filter;\n+\n+\treturn 0;\n+}\n+\n+static int nsim_get_ts_config(struct net_device *netdev,\n+\t\t\t      struct kernel_hwtstamp_config *config)\n+{\n+\tstruct netdevsim *ns = netdev_priv(netdev);\n+\n+\t*config = ns-\u003etstamp_config;\n+\treturn 0;\n+}\n+\n static int nsim_set_rx_mode(struct net_device *dev,\n \t\t\t    struct netdev_hw_addr_list *uc,\n \t\t\t    struct netdev_hw_addr_list *mc)\n@@ -647,6 +749,8 @@ static const struct net_device_ops nsim_netdev_ops = {\n \t.ndo_vlan_rx_add_vid\t= nsim_vlan_rx_add_vid,\n \t.ndo_vlan_rx_kill_vid\t= nsim_vlan_rx_kill_vid,\n \t.net_shaper_ops\t\t= \u0026nsim_shaper_ops,\n+\t.ndo_hwtstamp_get\t= nsim_get_ts_config,\n+\t.ndo_hwtstamp_set\t= nsim_set_ts_config,\n };\n \n static const struct net_device_ops nsim_vf_netdev_ops = {\ndiff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h\nindex 64f77f93d937c..5cdd1e294446c 100644\n--- a/drivers/net/netdevsim/netdevsim.h\n+++ b/drivers/net/netdevsim/netdevsim.h\n@@ -108,6 +108,7 @@ struct netdevsim {\n \tstruct net_device *netdev;\n \tstruct nsim_dev *nsim_dev;\n \tstruct nsim_dev_port *nsim_dev_port;\n+\tstruct kernel_hwtstamp_config tstamp_config;\n \tstruct mock_phc *phc;\n \tstruct nsim_rq **rq;\n \ndiff --git a/drivers/ptp/ptp_mock.c b/drivers/ptp/ptp_mock.c\nindex 4d66b61471210..7a4e5f3274a67 100644\n--- a/drivers/ptp/ptp_mock.c\n+++ b/drivers/ptp/ptp_mock.c\n@@ -49,15 +49,16 @@ static u64 mock_phc_cc_read(struct cyclecounter *cc)\n static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)\n {\n \tstruct mock_phc *phc = info_to_phc(info);\n+\tunsigned long flags;\n \ts64 adj;\n \n \tadj = (s64)scaled_ppm \u003c\u003c MOCK_PHC_FADJ_SHIFT;\n \tadj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR);\n \n-\tspin_lock(\u0026phc-\u003elock);\n+\tspin_lock_irqsave(\u0026phc-\u003elock, flags);\n \ttimecounter_read(\u0026phc-\u003etc);\n \tphc-\u003ecc.mult = MOCK_PHC_CC_MULT + adj;\n-\tspin_unlock(\u0026phc-\u003elock);\n+\tspin_unlock_irqrestore(\u0026phc-\u003elock, flags);\n \n \treturn 0;\n }\n@@ -65,10 +66,11 @@ static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)\n static int mock_phc_adjtime(struct ptp_clock_info *info, s64 delta)\n {\n \tstruct mock_phc *phc = info_to_phc(info);\n+\tunsigned long flags;\n \n-\tspin_lock(\u0026phc-\u003elock);\n+\tspin_lock_irqsave(\u0026phc-\u003elock, flags);\n \ttimecounter_adjtime(\u0026phc-\u003etc, delta);\n-\tspin_unlock(\u0026phc-\u003elock);\n+\tspin_unlock_irqrestore(\u0026phc-\u003elock, flags);\n \n \treturn 0;\n }\n@@ -78,10 +80,11 @@ static int mock_phc_settime64(struct ptp_clock_info *info,\n {\n \tstruct mock_phc *phc = info_to_phc(info);\n \tu64 ns = timespec64_to_ns(ts);\n+\tunsigned long flags;\n \n-\tspin_lock(\u0026phc-\u003elock);\n+\tspin_lock_irqsave(\u0026phc-\u003elock, flags);\n \ttimecounter_init(\u0026phc-\u003etc, \u0026phc-\u003ecc, ns);\n-\tspin_unlock(\u0026phc-\u003elock);\n+\tspin_unlock_irqrestore(\u0026phc-\u003elock, flags);\n \n \treturn 0;\n }\n@@ -89,11 +92,12 @@ static int mock_phc_settime64(struct ptp_clock_info *info,\n static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts)\n {\n \tstruct mock_phc *phc = info_to_phc(info);\n+\tunsigned long flags;\n \tu64 ns;\n \n-\tspin_lock(\u0026phc-\u003elock);\n+\tspin_lock_irqsave(\u0026phc-\u003elock, flags);\n \tns = timecounter_read(\u0026phc-\u003etc);\n-\tspin_unlock(\u0026phc-\u003elock);\n+\tspin_unlock_irqrestore(\u0026phc-\u003elock, flags);\n \n \t*ts = ns_to_timespec64(ns);\n \n@@ -171,5 +175,11 @@ void mock_phc_destroy(struct mock_phc *phc)\n }\n EXPORT_SYMBOL_GPL(mock_phc_destroy);\n \n+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)\n+{\n+\treturn \u0026phc-\u003einfo;\n+}\n+EXPORT_SYMBOL_GPL(mock_phc_get_ptp_info);\n+\n MODULE_DESCRIPTION(\"Mock-up PTP Hardware Clock driver\");\n MODULE_LICENSE(\"GPL\");\ndiff --git a/include/linux/ptp_mock.h b/include/linux/ptp_mock.h\nindex 72eb401034d93..e33188dec2b7f 100644\n--- a/include/linux/ptp_mock.h\n+++ b/include/linux/ptp_mock.h\n@@ -16,6 +16,7 @@ struct mock_phc;\n struct mock_phc *mock_phc_create(struct device *dev);\n void mock_phc_destroy(struct mock_phc *phc);\n int mock_phc_index(struct mock_phc *phc);\n+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc);\n \n #else\n \n@@ -33,6 +34,10 @@ static inline int mock_phc_index(struct mock_phc *phc)\n \treturn -1;\n }\n \n+static inline struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)\n+{\n+\treturn NULL;\n+}\n #endif\n \n #endif /* _PTP_MOCK_H_ */\ndiff --git a/tools/testing/selftests/drivers/net/Makefile b/tools/testing/selftests/drivers/net/Makefile\nindex d5bf4cb638a8c..18bb7c693b69a 100644\n--- a/tools/testing/selftests/drivers/net/Makefile\n+++ b/tools/testing/selftests/drivers/net/Makefile\n@@ -19,6 +19,7 @@ TEST_PROGS := \\\n \tnetpoll_basic.py \\\n \tping.py \\\n \tpsp.py \\\n+\tptp.py \\\n \tqueues.py \\\n \tring_reconfig.py \\\n \tshaper.py \\\ndiff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config\nindex b6989c7d3d9d1..7be30a72e1197 100644\n--- a/tools/testing/selftests/drivers/net/config\n+++ b/tools/testing/selftests/drivers/net/config\n@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y\n CONFIG_NET_SCH_PRIO=m\n CONFIG_PPP=y\n CONFIG_PPPOE=y\n+CONFIG_PTP_1588_CLOCK_MOCK=y\n CONFIG_VLAN_8021Q=m\n CONFIG_XDP_SOCKETS=y\ndiff --git a/tools/testing/selftests/drivers/net/ptp.py b/tools/testing/selftests/drivers/net/ptp.py\nnew file mode 100755\nindex 0000000000000..57ea77659b117\n--- /dev/null\n+++ b/tools/testing/selftests/drivers/net/ptp.py\n@@ -0,0 +1,84 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: GPL-2.0-only\n+#\n+# By Maciek Machnikowski \u003cmaciek@machnikowski.net\u003e (c) 2026,\n+\n+\"\"\"\n+Test suite for PTP sync using ptp4l.\n+\n+Start a ptp4l leader and follower and check that the follower locks onto the\n+leader (state s2)\n+\"\"\"\n+\n+import time\n+\n+from lib.py import (\n+    NetDrvEpEnv,\n+    bkg,\n+    fd_read_timeout,\n+    ksft_exit,\n+    ksft_pr,\n+    ksft_run,\n+    ksft_true,\n+)\n+\n+PTP4L_SYNC_TIMEOUT = 40\n+\n+\n+def _poll_follower_sync(follower, timeout):\n+    \"\"\"Read the follower stdout pipe until ptp4l reports sync state s2.\n+\n+    Returns a tuple (synced, output) where output is the text read so far.\n+    The synchronized ptp4l log line looks like this:\n+    ptp4l[18374.558]: master offset        844 s2 freq    +822 path delay       521\n+    \"\"\"\n+    fd_file = follower.proc.stdout\n+    fd = fd_file.fileno()\n+    buf = b\"\"\n+    deadline = time.monotonic() + timeout\n+    while time.monotonic() \u003c deadline:\n+        if b\" s2 \" in buf:\n+            break\n+        if follower.proc.poll() is not None:\n+            chunk = fd_file.read()\n+            if chunk:\n+                buf += chunk\n+            break\n+        try:\n+            remaining = deadline - time.monotonic()\n+            buf += fd_read_timeout(fd, max(0, min(1, remaining)))\n+        except TimeoutError:\n+            continue\n+    return b\" s2 \" in buf, buf.decode(\"utf-8\", \"replace\")\n+\n+\n+def ptp_sync_test(cfg):\n+    \"\"\"Verify ptp4l leader/follower synchronization reaches state s2.\"\"\"\n+    cfg.require_cmd(\"ptp4l\", remote=True)\n+\n+    leader_cmd = f\"ptp4l -i {cfg.remote_ifname} -m -2\"\n+    follower_cmd = f\"ptp4l -i {cfg.ifname} -m -s -2\"\n+\n+    with bkg(leader_cmd, host=cfg.remote), \\\n+         bkg(follower_cmd) as follower:\n+        synced, output = _poll_follower_sync(follower, PTP4L_SYNC_TIMEOUT)\n+\n+    if synced:\n+        return\n+\n+    ksft_pr(f\"ptp4l follower did not reach locked state (s2) within \"\n+            f\"{PTP4L_SYNC_TIMEOUT}s\")\n+    tail = output.strip().split(\"\\n\")[-10:]\n+    ksft_pr(\"Follower log (last 10 lines): \" + \" | \".join(tail))\n+    ksft_true(False, \"PTP sync timeout\")\n+\n+\n+def main():\n+    \"\"\"Run ksft tests.\"\"\"\n+    with NetDrvEpEnv(__file__) as cfg:\n+        ksft_run([ptp_sync_test], args=(cfg, ))\n+    ksft_exit()\n+\n+\n+if __name__ == \"__main__\":\n+    main()\n"
}

2/1 2026/08/15 07:04 agent patch-evaluator
1m Model:
best-expensive

Args:
null

Results:
{
  "EnableConfigs": [
    "NETDEVSIM",
    "PTP_1588_CLOCK_MOCK",
    "PTP_1588_CLOCK"
  ],
  "FocusSymbols": [
    "nsim_set_ts_config",
    "nsim_get_ts_config",
    "nsim_get_ts_info",
    "mock_phc_adjfine",
    "mock_phc_adjtime",
    "mock_phc_settime64",
    "mock_phc_gettime64"
  ],
  "Reasoning": "The patch adds hardware timestamping support to the netdevsim driver, which is a software-emulated networking device heavily used for testing and fuzzing. It implements new ndo_hwtstamp_set, ndo_hwtstamp_get, and get_ts_info callbacks, and modifies the mock_phc PTP clock driver to be safe for use in atomic contexts (e.g., during packet transmission). These changes introduce new reachable control paths and data flows that should be fuzzed.",
  "WorthFuzzing": true
}

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 f34ee39ba8d1079ae8053c6021141a8f209bc494
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Aug 15 07:04:43 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 025ea79879f3a..24e7d5592e799 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -200,7 +200,22 @@ static int nsim_get_ts_info(struct net_device *dev,
 {
 	struct netdevsim *ns = netdev_priv(dev);
 
+	ethtool_op_get_ts_info(dev, info);
+	if (!ns->phc) {
+		info->phc_index = -1;
+		return 0;
+	}
+
 	info->phc_index = mock_phc_index(ns->phc);
+	if (info->phc_index < 0)
+		return 0;
+
+	info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
+				 SOF_TIMESTAMPING_RX_HARDWARE |
+				 SOF_TIMESTAMPING_RAW_HARDWARE;
+
+	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
+	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);
 
 	return 0;
 }
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index 4e9d7e10b527e..e586fd8f3bc37 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -30,6 +30,8 @@
 #include <net/rtnetlink.h>
 #include <net/udp_tunnel.h>
 #include <net/busy_poll.h>
+#include <linux/ptp_clock_kernel.h>
+#include <linux/timecounter.h>
 
 #include "netdevsim.h"
 
@@ -122,7 +124,12 @@ static int nsim_forward_skb(struct net_device *tx_dev,
 
 static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
+	struct skb_shared_hwtstamps shhwtstamps = {};
+	struct ptp_clock_info *ptp_info_tx = NULL;
+	struct ptp_clock_info *ptp_info_rx = NULL;
 	struct netdevsim *ns = netdev_priv(dev);
+	struct timespec64 tx_ts, rx_ts;
+	struct sk_buff *skb_orig = skb;
 	struct skb_ext *psp_ext = NULL;
 	struct net_device *peer_dev;
 	unsigned int len = skb->len;
@@ -164,6 +171,44 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		skb_linearize(skb);
 
 	skb_tx_timestamp(skb);
+
+	if (unlikely(READ_ONCE(peer_ns->tstamp_config.rx_filter) !=
+		     HWTSTAMP_FILTER_NONE))
+		ptp_info_rx = mock_phc_get_ptp_info(peer_ns->phc);
+
+	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+	    READ_ONCE(ns->tstamp_config.tx_type) == HWTSTAMP_TX_ON)
+		ptp_info_tx = mock_phc_get_ptp_info(ns->phc);
+
+	if (unlikely(ptp_info_tx || ptp_info_rx)) {
+		/* Capture both timestamps closely */
+		if (ptp_info_tx)
+			ptp_info_tx->gettime64(ptp_info_tx, &tx_ts);
+		if (ptp_info_rx)
+			ptp_info_rx->gettime64(ptp_info_rx, &rx_ts);
+
+		/* If TX hardware timestamping is enabled report TX timestamp */
+		if (ptp_info_tx) {
+			shhwtstamps.hwtstamp = timespec64_to_ktime(tx_ts);
+			skb_tstamp_tx(skb_orig, &shhwtstamps);
+		}
+
+		/* Unshare the skb, stamping it must not corrupt cloned copies
+		 * and prevents returning single tstamp for Tx and Rx
+		 */
+		skb = skb_unshare(skb_orig, GFP_ATOMIC);
+		if (unlikely(!skb)) {
+			if (psp_ext)
+				__skb_ext_put(psp_ext);
+			goto out_drop_cnt;
+		}
+
+		/* If RX hardware timestamping is enabled report RX timestamp */
+		if (ptp_info_rx)
+			skb_hwtstamps(skb)->hwtstamp =
+				timespec64_to_ktime(rx_ts);
+	}
+
 	if (unlikely(nsim_forward_skb(dev, peer_dev,
 				      skb, rq, psp_ext) == NET_RX_DROP))
 		goto out_drop_cnt;
@@ -185,6 +230,63 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 }
 
+static int nsim_set_ts_config(struct net_device *netdev,
+			      struct kernel_hwtstamp_config *config,
+			      struct netlink_ext_ack *extack)
+{
+	struct netdevsim *ns = netdev_priv(netdev);
+	int rx_filter;
+
+	if (!ns->phc)
+		return -EOPNOTSUPP;
+
+	switch (config->rx_filter) {
+	case HWTSTAMP_FILTER_NONE:
+		rx_filter = HWTSTAMP_FILTER_NONE;
+		break;
+	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
+	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
+	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
+	case HWTSTAMP_FILTER_PTP_V2_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_SYNC:
+	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
+	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
+	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
+	case HWTSTAMP_FILTER_NTP_ALL:
+	case HWTSTAMP_FILTER_ALL:
+		rx_filter = HWTSTAMP_FILTER_ALL;
+		break;
+	default:
+		return -ERANGE;
+	}
+
+	switch (config->tx_type) {
+	case HWTSTAMP_TX_OFF:
+		WRITE_ONCE(ns->tstamp_config.tx_type, HWTSTAMP_TX_OFF);
+		break;
+	case HWTSTAMP_TX_ON:
+		WRITE_ONCE(ns->tstamp_config.tx_type, HWTSTAMP_TX_ON);
+		break;
+	default:
+		return -ERANGE;
+	}
+
+	WRITE_ONCE(ns->tstamp_config.rx_filter, rx_filter);
+	config->rx_filter = rx_filter;
+
+	return 0;
+}
+
+static int nsim_get_ts_config(struct net_device *netdev,
+			      struct kernel_hwtstamp_config *config)
+{
+	struct netdevsim *ns = netdev_priv(netdev);
+
+	*config = ns->tstamp_config;
+	return 0;
+}
+
 static int nsim_set_rx_mode(struct net_device *dev,
 			    struct netdev_hw_addr_list *uc,
 			    struct netdev_hw_addr_list *mc)
@@ -647,6 +749,8 @@ static const struct net_device_ops nsim_netdev_ops = {
 	.ndo_vlan_rx_add_vid	= nsim_vlan_rx_add_vid,
 	.ndo_vlan_rx_kill_vid	= nsim_vlan_rx_kill_vid,
 	.net_shaper_ops		= &nsim_shaper_ops,
+	.ndo_hwtstamp_get	= nsim_get_ts_config,
+	.ndo_hwtstamp_set	= nsim_set_ts_config,
 };
 
 static const struct net_device_ops nsim_vf_netdev_ops = {
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index 64f77f93d937c..5cdd1e294446c 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -108,6 +108,7 @@ struct netdevsim {
 	struct net_device *netdev;
 	struct nsim_dev *nsim_dev;
 	struct nsim_dev_port *nsim_dev_port;
+	struct kernel_hwtstamp_config tstamp_config;
 	struct mock_phc *phc;
 	struct nsim_rq **rq;
 
diff --git a/drivers/ptp/ptp_mock.c b/drivers/ptp/ptp_mock.c
index 4d66b61471210..7a4e5f3274a67 100644
--- a/drivers/ptp/ptp_mock.c
+++ b/drivers/ptp/ptp_mock.c
@@ -49,15 +49,16 @@ static u64 mock_phc_cc_read(struct cyclecounter *cc)
 static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 	s64 adj;
 
 	adj = (s64)scaled_ppm << MOCK_PHC_FADJ_SHIFT;
 	adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR);
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_read(&phc->tc);
 	phc->cc.mult = MOCK_PHC_CC_MULT + adj;
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -65,10 +66,11 @@ static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
 static int mock_phc_adjtime(struct ptp_clock_info *info, s64 delta)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_adjtime(&phc->tc, delta);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -78,10 +80,11 @@ static int mock_phc_settime64(struct ptp_clock_info *info,
 {
 	struct mock_phc *phc = info_to_phc(info);
 	u64 ns = timespec64_to_ns(ts);
+	unsigned long flags;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_init(&phc->tc, &phc->cc, ns);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -89,11 +92,12 @@ static int mock_phc_settime64(struct ptp_clock_info *info,
 static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 	u64 ns;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	ns = timecounter_read(&phc->tc);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	*ts = ns_to_timespec64(ns);
 
@@ -171,5 +175,11 @@ void mock_phc_destroy(struct mock_phc *phc)
 }
 EXPORT_SYMBOL_GPL(mock_phc_destroy);
 
+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)
+{
+	return &phc->info;
+}
+EXPORT_SYMBOL_GPL(mock_phc_get_ptp_info);
+
 MODULE_DESCRIPTION("Mock-up PTP Hardware Clock driver");
 MODULE_LICENSE("GPL");
diff --git a/include/linux/ptp_mock.h b/include/linux/ptp_mock.h
index 72eb401034d93..e33188dec2b7f 100644
--- a/include/linux/ptp_mock.h
+++ b/include/linux/ptp_mock.h
@@ -16,6 +16,7 @@ struct mock_phc;
 struct mock_phc *mock_phc_create(struct device *dev);
 void mock_phc_destroy(struct mock_phc *phc);
 int mock_phc_index(struct mock_phc *phc);
+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc);
 
 #else
 
@@ -33,6 +34,10 @@ static inline int mock_phc_index(struct mock_phc *phc)
 	return -1;
 }
 
+static inline struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)
+{
+	return NULL;
+}
 #endif
 
 #endif /* _PTP_MOCK_H_ */
diff --git a/tools/testing/selftests/drivers/net/Makefile b/tools/testing/selftests/drivers/net/Makefile
index d5bf4cb638a8c..18bb7c693b69a 100644
--- a/tools/testing/selftests/drivers/net/Makefile
+++ b/tools/testing/selftests/drivers/net/Makefile
@@ -19,6 +19,7 @@ TEST_PROGS := \
 	netpoll_basic.py \
 	ping.py \
 	psp.py \
+	ptp.py \
 	queues.py \
 	ring_reconfig.py \
 	shaper.py \
diff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config
index b6989c7d3d9d1..7be30a72e1197 100644
--- a/tools/testing/selftests/drivers/net/config
+++ b/tools/testing/selftests/drivers/net/config
@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y
 CONFIG_NET_SCH_PRIO=m
 CONFIG_PPP=y
 CONFIG_PPPOE=y
+CONFIG_PTP_1588_CLOCK_MOCK=y
 CONFIG_VLAN_8021Q=m
 CONFIG_XDP_SOCKETS=y
diff --git a/tools/testing/selftests/drivers/net/ptp.py b/tools/testing/selftests/drivers/net/ptp.py
new file mode 100755
index 0000000000000..57ea77659b117
--- /dev/null
+++ b/tools/testing/selftests/drivers/net/ptp.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# By Maciek Machnikowski <maciek@machnikowski.net> (c) 2026,
+
+"""
+Test suite for PTP sync using ptp4l.
+
+Start a ptp4l leader and follower and check that the follower locks onto the
+leader (state s2)
+"""
+
+import time
+
+from lib.py import (
+    NetDrvEpEnv,
+    bkg,
+    fd_read_timeout,
+    ksft_exit,
+    ksft_pr,
+    ksft_run,
+    ksft_true,
+)
+
+PTP4L_SYNC_TIMEOUT = 40
+
+
+def _poll_follower_sync(follower, timeout):
+    """Read the follower stdout pipe until ptp4l reports sync state s2.
+
+    Returns a tuple (synced, output) where output is the text read so far.
+    The synchronized ptp4l log line looks like this:
+    ptp4l[18374.558]: master offset        844 s2 freq    +822 path delay       521
+    """
+    fd_file = follower.proc.stdout
+    fd = fd_file.fileno()
+    buf = b""
+    deadline = time.monotonic() + timeout
+    while time.monotonic() < deadline:
+        if b" s2 " in buf:
+            break
+        if follower.proc.poll() is not None:
+            chunk = fd_file.read()
+            if chunk:
+                buf += chunk
+            break
+        try:
+            remaining = deadline - time.monotonic()
+            buf += fd_read_timeout(fd, max(0, min(1, remaining)))
+        except TimeoutError:
+            continue
+    return b" s2 " in buf, buf.decode("utf-8", "replace")
+
+
+def ptp_sync_test(cfg):
+    """Verify ptp4l leader/follower synchronization reaches state s2."""
+    cfg.require_cmd("ptp4l", remote=True)
+
+    leader_cmd = f"ptp4l -i {cfg.remote_ifname} -m -2"
+    follower_cmd = f"ptp4l -i {cfg.ifname} -m -s -2"
+
+    with bkg(leader_cmd, host=cfg.remote), \
+         bkg(follower_cmd) as follower:
+        synced, output = _poll_follower_sync(follower, PTP4L_SYNC_TIMEOUT)
+
+    if synced:
+        return
+
+    ksft_pr(f"ptp4l follower did not reach locked state (s2) within "
+            f"{PTP4L_SYNC_TIMEOUT}s")
+    tail = output.strip().split("\n")[-10:]
+    ksft_pr("Follower log (last 10 lines): " + " | ".join(tail))
+    ksft_true(False, "PTP sync timeout")
+
+
+def main():
+    """Run ksft tests."""
+    with NetDrvEpEnv(__file__) as cfg:
+        ksft_run([ptp_sync_test], args=(cfg, ))
+    ksft_exit()
+
+
+if __name__ == "__main__":
+    main()

3/2 2026/08/15 07:04 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 7124
							output: 35
							thoughts: 605
						

Thoughts:
**WorthFuzzing Analysis: netdevsim Hardware Timestamping**

Okay, so I've got a patch here that's adding hardware timestamping to `netdevsim`. My first thought is, "Is this even relevant for fuzzing?" I know `netdevsim` is a simulated networking device, which means it should be reachable in virtualized environments – software, so yes, it is. But let's run through the checklist: the prompt says to return WorthFuzzing=false for documentation, comments, decorative changes, unreachable code paths, or vendor-specific drivers. `netdevsim` is heavily fuzzed by syzkaller so the added features would be relevant.

Now, let's look closer. This patch touches a few files: `drivers/net/netdevsim/ethtool.c`, `drivers/net/netdevsim/netdev.c`, and `netdevsim.h`, the PTP mock driver, and adds a selftest. Specifically, it's adding these functions: `nsim_get_ts_info`, `nsim_start_xmit`, `nsim_set_ts_config`, `nsim_get_ts_config` in `netdevsim` and `mock_phc_adjfine`, `mock_phc_adjtime`, `mock_phc_settime64`, `mock_phc_gettime64`, `mock_phc_get_ptp_info` to the PTP mock. That's a strong indication of new, fuzzable functionality.

I need to confirm the configuration to determine the usefulness. I see `CONFIG_NETDEVSIM` and that `CONFIG_PTP_1588_CLOCK_MOCK` is added to the selftests config. I'll need to double-check `drivers/net/netdevsim/Kconfig` for its dependencies, but this looks promising. This adds hardware timestamping. This is worth fuzzing.



4/2 2026/08/15 07:04 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "config NETDEVSIM",
  "PathPrefix": "drivers/net/netdevsim/Kconfig"
}

Results:
{
  "error": "no matches"
}

5/2 2026/08/15 07:04 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 8205
							output: 29
							thoughts: 33
						

Thoughts:
Okay, here's my summary, taking on the persona you requested:

**Kconfig File Hunt**

Hmm, I'm trying to figure out where a specific Kconfig file is located. Let me think... perhaps that `drivers/net/netdevsim/Kconfig` file I'm looking for doesn't actually exist in that precise path. It's a possibility, right? These things happen. Or, maybe it's been moved, and is now nested directly within `drivers/net/Kconfig`? That would make sense, consolidating the networking device configurations. Time to go check those locations, I suppose.



6/2 2026/08/15 07:04 tool grepper
0m Args:
{
  "Expression": "config NETDEVSIM",
  "PathPrefix": "drivers/net/"
}

Results:
{
  "Output": "drivers/net/Kconfig=602=source \"drivers/net/hyperv/Kconfig\"\ndrivers/net/Kconfig-603-\ndrivers/net/Kconfig:604:config NETDEVSIM\ndrivers/net/Kconfig-605-\ttristate \"Simulated networking device\"\n"
}

7/2 2026/08/15 07:04 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 8487
							output: 34
							thoughts: 12
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing NETDEVSIM Dependencies**

Alright, let's dive in. My immediate thought is, "What's NETDEVSIM built upon? What are its critical dependencies?" I need to understand the underlying architecture before I can assess its functionality and potential limitations. I'm thinking about the libraries and frameworks it's leveraging. Is it a Python project? If so, I'll be looking for common scientific computing libraries like NumPy, SciPy, and Matplotlib, or maybe even something more specialized. Are there any network simulation specific libraries or frameworks involved? Perhaps something like Mininet, NS-3 bindings, or custom-built components?

I'll also consider the potential for external API calls or integrations. Does NETDEVSIM rely on external data sources or services? Are there any third-party tools or hardware it interfaces with? Understanding these external dependencies is crucial for evaluating its reliability, performance, and portability. I'll need to know the specific versions and potential compatibility issues. Any version mismatches here could be a nightmare to debug.

This dependency analysis is fundamental to understand the scope and complexity of NETDEVSIM. I want to build a clear picture of its foundation. This information is key to understanding the project's scalability, maintainability, and ultimately, its usefulness for my own purposes.



8/2 2026/08/15 07:04 tool read-file
0m Args:
{
  "File": "drivers/net/Kconfig",
  "FirstLine": 604,
  "LineCount": 20
}

Results:
{
  "Contents": " 604:\tconfig NETDEVSIM\n 605:\t\ttristate \"Simulated networking device\"\n 606:\t\tdepends on DEBUG_FS\n 607:\t\tdepends on INET\n 608:\t\tdepends on PSAMPLE || PSAMPLE=n\n 609:\t\tdepends on PTP_1588_CLOCK_MOCK || PTP_1588_CLOCK_MOCK=n\n 610:\t\tselect NET_DEVLINK\n 611:\t\tselect PAGE_POOL\n 612:\t\tselect NET_SHAPER\n 613:\t\thelp\n 614:\t\t  This driver is a developer testing tool and software model that can\n 615:\t\t  be used to test various control path networking APIs, especially\n 616:\t\t  HW-offload related.\n 617:\t\n 618:\t\t  To compile this driver as a module, choose M here: the module\n 619:\t\t  will be called netdevsim.\n 620:\t\n 621:\tconfig NET_FAILOVER\n 622:\t\ttristate \"Failover driver\"\n 623:\t\tselect FAILOVER\n"
}

9/2 2026/08/15 07:04 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 9123
							output: 38
							thoughts: 95
						

Thoughts:
Here's my thought process, as it stands:

**Examining a Configuration Change**

Okay, so this change's behavior is contingent on `PTP_1588_CLOCK_MOCK` – either it's already defined or it's being explicitly set to "n". Hmm, interesting. The patch *itself* is introducing `CONFIG_PTP_1588_CLOCK_MOCK=y` in the `tools/testing/selftests/drivers/net/config` file. That's a key piece of information. I need to understand this new configuration variable and its implications. Time to dive into the `Kconfig` files and see what I can find about `PTP_1588_CLOCK_MOCK`. I need to figure out what this mock clock is, what it does, and why it's being introduced here. This will determine the impact of this patch.



10/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "config PTP_1588_CLOCK_MOCK",
  "PathPrefix": "drivers/ptp/"
}

Results:
{
  "Output": "drivers/ptp/Kconfig=176=config PTP_1588_CLOCK_FC3W\n--\ndrivers/ptp/Kconfig-187-\ndrivers/ptp/Kconfig:188:config PTP_1588_CLOCK_MOCK\ndrivers/ptp/Kconfig-189-\ttristate \"Mock-up PTP clock\"\n"
}

11/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 9559
							output: 35
							thoughts: 20
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into PTP Configuration**

Alright, let's get down to brass tacks. I'm going to jump into the `drivers/ptp/Kconfig` file, specifically around line 188. My intuition tells me that's where we'll likely find the configuration options related to [***insert your expert field here, e.g., precise time synchronization for specific hardware, or a particular PTP implementation*]**. I'm anticipating we'll be looking at the dependencies, default values, and potentially some conditional logic for that area. Understanding those configurations is key to [***explain why understanding this specific part of the configuration is important in your field, e.g., optimizing performance, troubleshooting a specific issue, or enabling a particular feature*]**. I need to see how these options interact with the overall PTP subsystem, and how it aligns with the [***mention the relevant standard or specification for context, e.g., IEEE 1588, or a related network protocol*]** requirements. This should tell me everything I need to know about the current configuration, and what changes I need to make to get it where I want it.



12/2 2026/08/15 07:05 tool read-file
0m Args:
{
  "File": "drivers/ptp/Kconfig",
  "FirstLine": 188,
  "LineCount": 10
}

Results:
{
  "Contents": " 188:\tconfig PTP_1588_CLOCK_MOCK\n 189:\t\ttristate \"Mock-up PTP clock\"\n 190:\t\tdepends on PTP_1588_CLOCK\n 191:\t\thelp\n 192:\t\t  This driver offers a set of PTP clock manipulation operations over\n 193:\t\t  the system monotonic time. It can be used by virtual network device\n 194:\t\t  drivers to emulate PTP capabilities.\n 195:\t\n 196:\t\t  To compile this driver as a module, choose M here: the module\n 197:\t\t  will be called ptp_mock.\n"
}

13/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 10055
							output: 38
							thoughts: 677
						

Thoughts:
**Analyzing the Network Simulator and PTP Mock Clock Integration**

Okay, so I'm looking at this change and how it integrates the `PTP_1588_CLOCK_MOCK` with the `netdevsim` driver. My initial thought is that `PTP_1588_CLOCK_MOCK` has a dependency on `PTP_1588_CLOCK`, which makes sense. To use the mock clock within `netdevsim`, I need to ensure `PTP_1588_CLOCK_MOCK` is enabled, and I need to check the dependencies. Interestingly, `netdevsim` has a configuration dependency: `depends on PTP_1588_CLOCK_MOCK || PTP_1588_CLOCK_MOCK=n`.  That means if `PTP_1588_CLOCK_MOCK` is compiled as a module, `NETDEVSIM` cannot be built-in.

The patch includes `CONFIG_PTP_1588_CLOCK_MOCK=y` in the selftest config, so it looks like we need to enable `PTP_1588_CLOCK_MOCK` and `NETDEVSIM`. Now, the next step is to make sure those two are included.

Let's quickly go through the functions that have been added or modified, to gauge the impact. I see: `nsim_get_ts_info`, `nsim_start_xmit`, `nsim_set_ts_config`, `nsim_get_ts_config`, `mock_phc_adjfine`, `mock_phc_adjtime`, `mock_phc_settime64`, `mock_phc_gettime64`, and `mock_phc_get_ptp_info`.

Okay, `nsim_set_ts_config` and `nsim_get_ts_config` are assigned to the `ndo_hwtstamp_set` and `ndo_hwtstamp_get` netdev ops. `nsim_start_xmit` is the transmit function, so that's the data path. `nsim_get_ts_info` is accessed through ethtool. I need to keep in mind how these functions are reached. The ethtool and hwtstamp functions are accessed via ioctls or netlink, and packet transmission calls `nsim_start_xmit`. The `mock_phc_*` functions are part of the `ptp_clock_info` callbacks, which can be reached via PTP ioctls.

So, for focused testing, I should focus on: `nsim_set_ts_config`, `nsim_get_ts_config`, `nsim_get_ts_info`, `mock_phc_adjfine`, `mock_phc_adjtime`, `mock_phc_settime64`, and `mock_phc_gettime64`.

Wait, but `nsim_start_xmit` is a hot-path function, so I need to avoid listing it. The goal is to prevent skewed test distributions.

I should also check if `mock_phc_adjfine` is a static function. That should be in `drivers/ptp/ptp_mock.c`.



14/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "mock_phc_adjfine",
  "PathPrefix": "drivers/ptp/ptp_mock.c"
}

Results:
{
  "Output": "drivers/ptp/ptp_mock.c=44=static u64 mock_phc_cc_read(struct cyclecounter *cc)\n--\ndrivers/ptp/ptp_mock.c-48-\ndrivers/ptp/ptp_mock.c:49:static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)\ndrivers/ptp/ptp_mock.c-50-{\n--\ndrivers/ptp/ptp_mock.c=122=struct mock_phc *mock_phc_create(struct device *dev)\n--\ndrivers/ptp/ptp_mock.c-136-\t\t.max_adj\t= MOCK_PHC_MAX_ADJ_PPB,\ndrivers/ptp/ptp_mock.c:137:\t\t.adjfine\t= mock_phc_adjfine,\ndrivers/ptp/ptp_mock.c-138-\t\t.adjtime\t= mock_phc_adjtime,\n"
}

15/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 11753
							output: 40
							thoughts: 135
						

Thoughts:
**Considering Static Function Resolution**

Okay, here's the situation. I'm looking at this code and these instructions are telling me to lean towards non-static, non-inlined API entrypoints over internal static helper functions. The compiler, right? It just optimizes away those static functions, makes them disappear as discrete symbols. Now, I see `mock_phc_adjfine`. That's *static*! But here's the twist: it's assigned to a function pointer, `.adjfine = mock_phc_adjfine`. So, even though it's static, it shouldn't be inlined. It's an entry point, and it's visible to the PTP subsystem. But, syzkaller, the fuzzer, may have an issue with static function resolution. Maybe we shouldn't list them, just in case. I'd better check `nsim_set_ts_config`. Is that function static? I need to know.



16/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "nsim_set_ts_config",
  "PathPrefix": "drivers/net/netdevsim/netdev.c"
}

Results:
{
  "Output": "drivers/net/netdevsim/netdev.c=125=static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/netdevsim/netdev.c-232-\ndrivers/net/netdevsim/netdev.c:233:static int nsim_set_ts_config(struct net_device *netdev,\ndrivers/net/netdevsim/netdev.c-234-\t\t\t      struct kernel_hwtstamp_config *config,\n--\ndrivers/net/netdevsim/netdev.c=729=static const struct net_device_ops nsim_netdev_ops = {\n--\ndrivers/net/netdevsim/netdev.c-752-\t.ndo_hwtstamp_get\t= nsim_get_ts_config,\ndrivers/net/netdevsim/netdev.c:753:\t.ndo_hwtstamp_set\t= nsim_set_ts_config,\ndrivers/net/netdevsim/netdev.c-754-};\n"
}

17/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 12419
							output: 41
							thoughts: 29
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from a first-person perspective, assuming I'm already well-versed in this technical domain:

**My Line of Inquiry: nsim_set_ts_config & nsim_get_ts_info**

Alright, so I've confirmed that `nsim_set_ts_config` is indeed a static function. That's good to have nailed down; it confirms my initial understanding and helps define its scope of access and modification.

Now, that brings me to my next logical question in this context, and it's something I need to clarify: what about `nsim_get_ts_info`? Is that static too? The behavior of these two functions is interconnected, and the static nature of one has a direct impact on how the other might behave. Understanding the static linkage, visibility, and potential shared data access of these functions is key to designing a robust, thread-safe, and predictable system. Knowing the type and scope of `nsim_get_ts_info` will enable me to fully understand the architecture of this module. This is the next piece of the puzzle I need.



18/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "nsim_get_ts_info",
  "PathPrefix": "drivers/net/netdevsim/ethtool.c"
}

Results:
{
  "Output": "drivers/net/netdevsim/ethtool.c=176=nsim_get_fec_stats(struct net_device *dev, struct ethtool_fec_stats *fec_stats,\n--\ndrivers/net/netdevsim/ethtool.c-197-\ndrivers/net/netdevsim/ethtool.c:198:static int nsim_get_ts_info(struct net_device *dev,\ndrivers/net/netdevsim/ethtool.c-199-\t\t\t    struct kernel_ethtool_ts_info *info)\n--\ndrivers/net/netdevsim/ethtool.c=223=static const struct ethtool_ops nsim_ethtool_ops = {\n--\ndrivers/net/netdevsim/ethtool.c-239-\t.get_fec_stats\t\t\t= nsim_get_fec_stats,\ndrivers/net/netdevsim/ethtool.c:240:\t.get_ts_info\t\t\t= nsim_get_ts_info,\ndrivers/net/netdevsim/ethtool.c-241-};\n"
}

19/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 13026
							output: 42
							thoughts: 29
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own:

**Analyzing Code Structure and Exported Functions**

Right, so the code's got a definite static vibe going on. A bit concerning, honestly. Makes me wonder, are there *any* non-static functions at all in this section? Need to track that down to see how modular this really is.

Hmm, okay, *mock_phc_get_ptp_info* is exported. That's interesting. So it's designed to be overridden. Okay, so that suggests a testable interface.



20/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "mock_phc_get_ptp_info",
  "PathPrefix": "drivers/ptp/ptp_mock.c"
}

Results:
{
  "Output": "drivers/ptp/ptp_mock.c=176=EXPORT_SYMBOL_GPL(mock_phc_destroy);\ndrivers/ptp/ptp_mock.c-177-\ndrivers/ptp/ptp_mock.c:178:struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)\ndrivers/ptp/ptp_mock.c-179-{\n--\ndrivers/ptp/ptp_mock.c-181-}\ndrivers/ptp/ptp_mock.c:182:EXPORT_SYMBOL_GPL(mock_phc_get_ptp_info);\ndrivers/ptp/ptp_mock.c-183-\n"
}

21/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 13418
							output: 37
							thoughts: 479
						

Thoughts:
**My Strategy for Fuzzing the Netdevsim PTP Clock**

Okay, so `mock_phc_get_ptp_info` is a simple getter. Not much to see there, so I'm not going to bother with it for fuzzing purposes. My focus needs to be on the functions assigned to the `ops` structures. Even if they're static, they're not inlined, since their addresses are taken and put into structures like `net_device_ops` and `ethtool_ops`. Syzkaller should be able to target them effectively, or at least they will be exercised when corresponding ioctls or netlink messages are sent.

Wait, I need to remind myself what the instructions say! Ah, yes: "Prefer non-static, non-inlined API entrypoint functions over internal static helper functions." Well, these *are* non-inlined because their addresses are being taken. Excellent! This means I can include them.

I'll include these functions in my fuzzing target list:
*   `nsim_set_ts_config`
*   `nsim_get_ts_config`
*   `nsim_get_ts_info`
*   `mock_phc_adjfine`
*   `mock_phc_adjtime`
*   `mock_phc_settime64`
*   `mock_phc_gettime64`

Now, let me check the Kconfig dependencies for `NETDEVSIM`. It needs `DEBUG_FS`, `INET`, and `PSAMPLE` (optional), and `PTP_1588_CLOCK_MOCK` (optional). To effectively test the PTP clock aspect, I need both `NETDEVSIM` and `PTP_1588_CLOCK_MOCK`. But wait... `PTP_1588_CLOCK_MOCK` itself depends on `PTP_1588_CLOCK`. So, the necessary configs I need to enable are:

*   `NETDEVSIM`
*   `PTP_1588_CLOCK_MOCK`
*   `PTP_1588_CLOCK`

I'll now verify if there are any additional dependencies for `PTP_1588_CLOCK`. I want to make sure I get everything configured correctly.



22/2 2026/08/15 07:05 tool grepper
0m Args:
{
  "Expression": "config PTP_1588_CLOCK",
  "PathPrefix": "drivers/ptp/Kconfig"
}

Results:
{
  "Output": "drivers/ptp/Kconfig=6=menu \"PTP clock support\"\ndrivers/ptp/Kconfig-7-\ndrivers/ptp/Kconfig:8:config PTP_1588_CLOCK\ndrivers/ptp/Kconfig-9-\ttristate \"PTP clock support\"\n--\ndrivers/ptp/Kconfig-29-\ndrivers/ptp/Kconfig:30:config PTP_1588_CLOCK_OPTIONAL\ndrivers/ptp/Kconfig-31-\ttristate\n--\ndrivers/ptp/Kconfig-41-\ndrivers/ptp/Kconfig:42:config PTP_1588_CLOCK_DTE\ndrivers/ptp/Kconfig-43-\ttristate \"Broadcom DTE as PTP clock\"\n--\ndrivers/ptp/Kconfig-57-\ndrivers/ptp/Kconfig:58:config PTP_1588_CLOCK_QORIQ\ndrivers/ptp/Kconfig-59-\ttristate \"Freescale QorIQ 1588 timer as PTP clock\"\n--\ndrivers/ptp/Kconfig=75=config DP83640_PHY\n--\ndrivers/ptp/Kconfig-92-\ndrivers/ptp/Kconfig:93:config PTP_1588_CLOCK_INES\ndrivers/ptp/Kconfig-94-\ttristate \"ZHAW InES PTP time stamping IP core\"\n--\ndrivers/ptp/Kconfig-103-\ndrivers/ptp/Kconfig:104:config PTP_1588_CLOCK_PCH\ndrivers/ptp/Kconfig-105-\ttristate \"Intel PCH EG20T as PTP clock\"\n--\ndrivers/ptp/Kconfig-122-\ndrivers/ptp/Kconfig:123:config PTP_1588_CLOCK_KVM\ndrivers/ptp/Kconfig-124-\ttristate \"KVM virtual PTP clock\"\n--\ndrivers/ptp/Kconfig-134-\ndrivers/ptp/Kconfig:135:config PTP_1588_CLOCK_VMCLOCK\ndrivers/ptp/Kconfig-136-\ttristate \"Virtual machine PTP clock\"\n--\ndrivers/ptp/Kconfig-151-\ndrivers/ptp/Kconfig:152:config PTP_1588_CLOCK_IDT82P33\ndrivers/ptp/Kconfig-153-\ttristate \"IDT 82P33xxx PTP clock\"\n--\ndrivers/ptp/Kconfig-163-\ndrivers/ptp/Kconfig:164:config PTP_1588_CLOCK_IDTCM\ndrivers/ptp/Kconfig-165-\ttristate \"IDT CLOCKMATRIX as PTP clock\"\n--\ndrivers/ptp/Kconfig-175-\ndrivers/ptp/Kconfig:176:config PTP_1588_CLOCK_FC3W\ndrivers/ptp/Kconfig-177-\ttristate \"RENESAS FemtoClock3 Wireless as PTP clock\"\n--\ndrivers/ptp/Kconfig-187-\ndrivers/ptp/Kconfig:188:config PTP_1588_CLOCK_MOCK\ndrivers/ptp/Kconfig-189-\ttristate \"Mock-up PTP clock\"\n--\ndrivers/ptp/Kconfig-198-\ndrivers/ptp/Kconfig:199:config PTP_1588_CLOCK_VMW\ndrivers/ptp/Kconfig-200-\ttristate \"VMware virtual PTP clock\"\n--\ndrivers/ptp/Kconfig-210-\ndrivers/ptp/Kconfig:211:config PTP_1588_CLOCK_OCP\ndrivers/ptp/Kconfig-212-\ttristate \"OpenCompute TimeCard as PTP clock\"\n"
}

23/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 15438
							output: 33
							thoughts: 18
						

Thoughts:
Here's my summary, as though I'm thinking through this process:

**Diving into the PTP Kernel Configuration**

Okay, let's get down to brass tacks. I'm going to pull up `drivers/ptp/Kconfig` and zoom in on, say, around line 8. My initial goal here is to get a sense of the *high-level* structure of the PTP configuration options. I'm looking for the major groupings, the overall hierarchy. What are the core features exposed to the user? What dependencies exist between them? Are we talking about basic clock support, hardware-assisted timestamping, specific PHY drivers, or something more specialized? I'm hoping to quickly identify the major players in this config file so I can understand the configuration landscape. This will provide a good foundation before diving into the more detailed elements.



24/2 2026/08/15 07:05 tool read-file
0m Args:
{
  "File": "drivers/ptp/Kconfig",
  "FirstLine": 8,
  "LineCount": 15
}

Results:
{
  "Contents": "   8:\tconfig PTP_1588_CLOCK\n   9:\t\ttristate \"PTP clock support\"\n  10:\t\tdepends on NET \u0026\u0026 POSIX_TIMERS\n  11:\t\tdefault ETHERNET\n  12:\t\tselect PPS\n  13:\t\tselect NET_PTP_CLASSIFY\n  14:\t\thelp\n  15:\t\t  The IEEE 1588 standard defines a method to precisely\n  16:\t\t  synchronize distributed clocks over Ethernet networks. The\n  17:\t\t  standard defines a Precision Time Protocol (PTP), which can\n  18:\t\t  be used to achieve synchronization within a few dozen\n  19:\t\t  microseconds. In addition, with the help of special hardware\n  20:\t\t  time stamping units, it can be possible to achieve\n  21:\t\t  synchronization to within a few hundred nanoseconds.\n  22:\t\n"
}

25/2 2026/08/15 07:05 llm patch-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 15895
							output: 245
							thoughts: 1277
						

Thoughts:
**Analysis of Netdevsim Hardware Timestamping Implementation**

Okay, so I'm looking at this patch and, based on the dependencies, `PTP_1588_CLOCK` is the primary thing here, alongside `NET` and `POSIX_TIMERS`, which are standard, so no surprises there. And yes, the relevant configs are `PTP_1588_CLOCK`, `PTP_1588_CLOCK_MOCK`, and `NETDEVSIM`.

My initial thought was to ensure I identified the right API entry points. Confirmed, we've got `nsim_set_ts_config`, `nsim_get_ts_config` in `drivers/net/netdevsim/netdev.c`, and `nsim_get_ts_info` in `drivers/net/netdevsim/ethtool.c`. And for the PTP side, `mock_phc_adjfine`, `mock_phc_adjtime`, `mock_phc_settime64`, and `mock_phc_gettime64` in `drivers/ptp/ptp_mock.c`.

I was slightly concerned about the prompt's preference for non-static, non-inlined functions, but after a closer look, even though these mock functions are static, they're assigned to function pointers, which prevents them from being inlined, so they are correct to use. And I note that `mock_phc_adjfine` doesn't have a non-static wrapper. I'll still list them, though.

I then did a deeper review of the code:

```c
static int nsim_set_ts_config(struct net_device *netdev,
			      struct kernel_hwtstamp_config *config,
			      struct netlink_ext_ack *extack)
```

```c
static int nsim_get_ts_config(struct net_device *netdev,
			      struct kernel_hwtstamp_config *config)
```

```c
static int nsim_get_ts_info(struct net_device *dev,
			    struct kernel_ethtool_ts_info *info)
```

```c
static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
```

```c
static int mock_phc_adjtime(struct ptp_clock_info *info, s64 delta)
```

```c
static int mock_phc_settime64(struct ptp_clock_info *info,
			      const struct timespec64 *ts)
```

```c
static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts)
```

Then I noticed the change in the spinlock implementation:

```c
@@ -49,15 +49,16 @@ static u64 mock_phc_cc_read(struct cyclecounter *cc)
 static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 	s64 adj;
 
 	adj = (s64)scaled_ppm << MOCK_PHC_FADJ_SHIFT;
 	adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR);
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_read(&phc->tc);
 	phc->cc.mult = MOCK_PHC_CC_MULT + adj;
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
```

Ah, right, this is a bug fix. The use of `spin_lock_irqsave` instead of `spin_lock` is crucial because these functions are now called from `nsim_start_xmit`, which could be in a softirq or interrupt context. So, effectively, what we have is the introduction of hardware timestamping capabilities in `netdevsim`.

Therefore, I'll focus on these:
*   `nsim_set_ts_config`
*   `nsim_get_ts_config`
*   `ns


26/2 2026/08/15 07:05 tool set-results
0m Args:
{
  "EnableConfigs": [
    "NETDEVSIM",
    "PTP_1588_CLOCK_MOCK",
    "PTP_1588_CLOCK"
  ],
  "FocusSymbols": [
    "nsim_set_ts_config",
    "nsim_get_ts_config",
    "nsim_get_ts_info",
    "mock_phc_adjfine",
    "mock_phc_adjtime",
    "mock_phc_settime64",
    "mock_phc_gettime64"
  ],
  "Reasoning": "The patch adds hardware timestamping support to the netdevsim driver, which is a software-emulated networking device heavily used for testing and fuzzing. It implements new ndo_hwtstamp_set, ndo_hwtstamp_get, and get_ts_info callbacks, and modifies the mock_phc PTP clock driver to be safe for use in atomic contexts (e.g., during packet transmission). These changes introduce new reachable control paths and data flows that should be fuzzed.",
  "WorthFuzzing": true
}

Results:
{
  "EnableConfigs": [
    "NETDEVSIM",
    "PTP_1588_CLOCK_MOCK",
    "PTP_1588_CLOCK"
  ],
  "FocusSymbols": [
    "nsim_set_ts_config",
    "nsim_get_ts_config",
    "nsim_get_ts_info",
    "mock_phc_adjfine",
    "mock_phc_adjtime",
    "mock_phc_settime64",
    "mock_phc_gettime64"
  ],
  "Reasoning": "The patch adds hardware timestamping support to the netdevsim driver, which is a software-emulated networking device heavily used for testing and fuzzing. It implements new ndo_hwtstamp_set, ndo_hwtstamp_get, and get_ts_info callbacks, and modifies the mock_phc PTP clock driver to be safe for use in atomic contexts (e.g., during packet transmission). These changes introduce new reachable control paths and data flows that should be fuzzed.",
  "WorthFuzzing": true
}

27/1 2026/08/15 07:05 action If
1m Args:
{
  "WorthFuzzing": true
}

Results:
null

28/2 2026/08/15 07:05 agent kmsan-evaluator
1m Model:
best-expensive

Args:
null

Results:
{
  "KMSANReasoning": "The patch introduces hardware timestamping support to the netdevsim driver. It adds `nsim_get_ts_config` and `nsim_set_ts_config` to configure timestamping, which read/write to a zero-initialized `tstamp_config` structure. It modifies `nsim_start_xmit` to capture TX and RX timestamps using `mock_phc_gettime64`. The `timespec64` variables `tx_ts` and `rx_ts` are fully initialized by `mock_phc_gettime64` before being converted to `ktime_t` and stored in the skb's `hwtstamps`. The `skb_shared_hwtstamps` structure is zero-initialized before use. The `hwtstamp_config` structure copied to userspace in `dev_get_hwtstamp` is fully initialized by `hwtstamp_config_from_kernel`, and it has no padding. There are no new structures copied to userspace with uninitialized padding or fields, and no conditional logic depending on uninitialized variables. Any potential bugs introduced by this patch (e.g., NULL pointer dereferences, use-after-free, or locking issues) would be caught by standard KASAN and LOCKDEP. Therefore, a dedicated KMSAN fuzzing session is not justified.",
  "NeedsKMSAN": false
}

Instruction:
You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.

CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
  a comprehensive suite of debugging tools and sanitizers, including KASAN
  (out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
  (locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
  or page allocations) and kernel-to-user memory info-leaks.

Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.

Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.

Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
   attributes, ioctl output arguments, socket options, or BPF buffers) where fields
   or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
   or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
   could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
   uninitialized bytes of existing buffers.

Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
  dereferences, locking deadlocks, or use-after-free bugs (these are already caught
  by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
  or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.

Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
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 f34ee39ba8d1079ae8053c6021141a8f209bc494
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Aug 15 07:04:43 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 025ea79879f3a..24e7d5592e799 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -200,7 +200,22 @@ static int nsim_get_ts_info(struct net_device *dev,
 {
 	struct netdevsim *ns = netdev_priv(dev);
 
+	ethtool_op_get_ts_info(dev, info);
+	if (!ns->phc) {
+		info->phc_index = -1;
+		return 0;
+	}
+
 	info->phc_index = mock_phc_index(ns->phc);
+	if (info->phc_index < 0)
+		return 0;
+
+	info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
+				 SOF_TIMESTAMPING_RX_HARDWARE |
+				 SOF_TIMESTAMPING_RAW_HARDWARE;
+
+	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);
+	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);
 
 	return 0;
 }
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index 4e9d7e10b527e..e586fd8f3bc37 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -30,6 +30,8 @@
 #include <net/rtnetlink.h>
 #include <net/udp_tunnel.h>
 #include <net/busy_poll.h>
+#include <linux/ptp_clock_kernel.h>
+#include <linux/timecounter.h>
 
 #include "netdevsim.h"
 
@@ -122,7 +124,12 @@ static int nsim_forward_skb(struct net_device *tx_dev,
 
 static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
+	struct skb_shared_hwtstamps shhwtstamps = {};
+	struct ptp_clock_info *ptp_info_tx = NULL;
+	struct ptp_clock_info *ptp_info_rx = NULL;
 	struct netdevsim *ns = netdev_priv(dev);
+	struct timespec64 tx_ts, rx_ts;
+	struct sk_buff *skb_orig = skb;
 	struct skb_ext *psp_ext = NULL;
 	struct net_device *peer_dev;
 	unsigned int len = skb->len;
@@ -164,6 +171,44 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 		skb_linearize(skb);
 
 	skb_tx_timestamp(skb);
+
+	if (unlikely(READ_ONCE(peer_ns->tstamp_config.rx_filter) !=
+		     HWTSTAMP_FILTER_NONE))
+		ptp_info_rx = mock_phc_get_ptp_info(peer_ns->phc);
+
+	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
+	    READ_ONCE(ns->tstamp_config.tx_type) == HWTSTAMP_TX_ON)
+		ptp_info_tx = mock_phc_get_ptp_info(ns->phc);
+
+	if (unlikely(ptp_info_tx || ptp_info_rx)) {
+		/* Capture both timestamps closely */
+		if (ptp_info_tx)
+			ptp_info_tx->gettime64(ptp_info_tx, &tx_ts);
+		if (ptp_info_rx)
+			ptp_info_rx->gettime64(ptp_info_rx, &rx_ts);
+
+		/* If TX hardware timestamping is enabled report TX timestamp */
+		if (ptp_info_tx) {
+			shhwtstamps.hwtstamp = timespec64_to_ktime(tx_ts);
+			skb_tstamp_tx(skb_orig, &shhwtstamps);
+		}
+
+		/* Unshare the skb, stamping it must not corrupt cloned copies
+		 * and prevents returning single tstamp for Tx and Rx
+		 */
+		skb = skb_unshare(skb_orig, GFP_ATOMIC);
+		if (unlikely(!skb)) {
+			if (psp_ext)
+				__skb_ext_put(psp_ext);
+			goto out_drop_cnt;
+		}
+
+		/* If RX hardware timestamping is enabled report RX timestamp */
+		if (ptp_info_rx)
+			skb_hwtstamps(skb)->hwtstamp =
+				timespec64_to_ktime(rx_ts);
+	}
+
 	if (unlikely(nsim_forward_skb(dev, peer_dev,
 				      skb, rq, psp_ext) == NET_RX_DROP))
 		goto out_drop_cnt;
@@ -185,6 +230,63 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev)
 	return NETDEV_TX_OK;
 }
 
+static int nsim_set_ts_config(struct net_device *netdev,
+			      struct kernel_hwtstamp_config *config,
+			      struct netlink_ext_ack *extack)
+{
+	struct netdevsim *ns = netdev_priv(netdev);
+	int rx_filter;
+
+	if (!ns->phc)
+		return -EOPNOTSUPP;
+
+	switch (config->rx_filter) {
+	case HWTSTAMP_FILTER_NONE:
+		rx_filter = HWTSTAMP_FILTER_NONE;
+		break;
+	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
+	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
+	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
+	case HWTSTAMP_FILTER_PTP_V2_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_SYNC:
+	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
+	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
+	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
+	case HWTSTAMP_FILTER_NTP_ALL:
+	case HWTSTAMP_FILTER_ALL:
+		rx_filter = HWTSTAMP_FILTER_ALL;
+		break;
+	default:
+		return -ERANGE;
+	}
+
+	switch (config->tx_type) {
+	case HWTSTAMP_TX_OFF:
+		WRITE_ONCE(ns->tstamp_config.tx_type, HWTSTAMP_TX_OFF);
+		break;
+	case HWTSTAMP_TX_ON:
+		WRITE_ONCE(ns->tstamp_config.tx_type, HWTSTAMP_TX_ON);
+		break;
+	default:
+		return -ERANGE;
+	}
+
+	WRITE_ONCE(ns->tstamp_config.rx_filter, rx_filter);
+	config->rx_filter = rx_filter;
+
+	return 0;
+}
+
+static int nsim_get_ts_config(struct net_device *netdev,
+			      struct kernel_hwtstamp_config *config)
+{
+	struct netdevsim *ns = netdev_priv(netdev);
+
+	*config = ns->tstamp_config;
+	return 0;
+}
+
 static int nsim_set_rx_mode(struct net_device *dev,
 			    struct netdev_hw_addr_list *uc,
 			    struct netdev_hw_addr_list *mc)
@@ -647,6 +749,8 @@ static const struct net_device_ops nsim_netdev_ops = {
 	.ndo_vlan_rx_add_vid	= nsim_vlan_rx_add_vid,
 	.ndo_vlan_rx_kill_vid	= nsim_vlan_rx_kill_vid,
 	.net_shaper_ops		= &nsim_shaper_ops,
+	.ndo_hwtstamp_get	= nsim_get_ts_config,
+	.ndo_hwtstamp_set	= nsim_set_ts_config,
 };
 
 static const struct net_device_ops nsim_vf_netdev_ops = {
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index 64f77f93d937c..5cdd1e294446c 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -108,6 +108,7 @@ struct netdevsim {
 	struct net_device *netdev;
 	struct nsim_dev *nsim_dev;
 	struct nsim_dev_port *nsim_dev_port;
+	struct kernel_hwtstamp_config tstamp_config;
 	struct mock_phc *phc;
 	struct nsim_rq **rq;
 
diff --git a/drivers/ptp/ptp_mock.c b/drivers/ptp/ptp_mock.c
index 4d66b61471210..7a4e5f3274a67 100644
--- a/drivers/ptp/ptp_mock.c
+++ b/drivers/ptp/ptp_mock.c
@@ -49,15 +49,16 @@ static u64 mock_phc_cc_read(struct cyclecounter *cc)
 static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 	s64 adj;
 
 	adj = (s64)scaled_ppm << MOCK_PHC_FADJ_SHIFT;
 	adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR);
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_read(&phc->tc);
 	phc->cc.mult = MOCK_PHC_CC_MULT + adj;
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -65,10 +66,11 @@ static int mock_phc_adjfine(struct ptp_clock_info *info, long scaled_ppm)
 static int mock_phc_adjtime(struct ptp_clock_info *info, s64 delta)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_adjtime(&phc->tc, delta);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -78,10 +80,11 @@ static int mock_phc_settime64(struct ptp_clock_info *info,
 {
 	struct mock_phc *phc = info_to_phc(info);
 	u64 ns = timespec64_to_ns(ts);
+	unsigned long flags;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	timecounter_init(&phc->tc, &phc->cc, ns);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	return 0;
 }
@@ -89,11 +92,12 @@ static int mock_phc_settime64(struct ptp_clock_info *info,
 static int mock_phc_gettime64(struct ptp_clock_info *info, struct timespec64 *ts)
 {
 	struct mock_phc *phc = info_to_phc(info);
+	unsigned long flags;
 	u64 ns;
 
-	spin_lock(&phc->lock);
+	spin_lock_irqsave(&phc->lock, flags);
 	ns = timecounter_read(&phc->tc);
-	spin_unlock(&phc->lock);
+	spin_unlock_irqrestore(&phc->lock, flags);
 
 	*ts = ns_to_timespec64(ns);
 
@@ -171,5 +175,11 @@ void mock_phc_destroy(struct mock_phc *phc)
 }
 EXPORT_SYMBOL_GPL(mock_phc_destroy);
 
+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)
+{
+	return &phc->info;
+}
+EXPORT_SYMBOL_GPL(mock_phc_get_ptp_info);
+
 MODULE_DESCRIPTION("Mock-up PTP Hardware Clock driver");
 MODULE_LICENSE("GPL");
diff --git a/include/linux/ptp_mock.h b/include/linux/ptp_mock.h
index 72eb401034d93..e33188dec2b7f 100644
--- a/include/linux/ptp_mock.h
+++ b/include/linux/ptp_mock.h
@@ -16,6 +16,7 @@ struct mock_phc;
 struct mock_phc *mock_phc_create(struct device *dev);
 void mock_phc_destroy(struct mock_phc *phc);
 int mock_phc_index(struct mock_phc *phc);
+struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc);
 
 #else
 
@@ -33,6 +34,10 @@ static inline int mock_phc_index(struct mock_phc *phc)
 	return -1;
 }
 
+static inline struct ptp_clock_info *mock_phc_get_ptp_info(struct mock_phc *phc)
+{
+	return NULL;
+}
 #endif
 
 #endif /* _PTP_MOCK_H_ */
diff --git a/tools/testing/selftests/drivers/net/Makefile b/tools/testing/selftests/drivers/net/Makefile
index d5bf4cb638a8c..18bb7c693b69a 100644
--- a/tools/testing/selftests/drivers/net/Makefile
+++ b/tools/testing/selftests/drivers/net/Makefile
@@ -19,6 +19,7 @@ TEST_PROGS := \
 	netpoll_basic.py \
 	ping.py \
 	psp.py \
+	ptp.py \
 	queues.py \
 	ring_reconfig.py \
 	shaper.py \
diff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config
index b6989c7d3d9d1..7be30a72e1197 100644
--- a/tools/testing/selftests/drivers/net/config
+++ b/tools/testing/selftests/drivers/net/config
@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y
 CONFIG_NET_SCH_PRIO=m
 CONFIG_PPP=y
 CONFIG_PPPOE=y
+CONFIG_PTP_1588_CLOCK_MOCK=y
 CONFIG_VLAN_8021Q=m
 CONFIG_XDP_SOCKETS=y
diff --git a/tools/testing/selftests/drivers/net/ptp.py b/tools/testing/selftests/drivers/net/ptp.py
new file mode 100755
index 0000000000000..57ea77659b117
--- /dev/null
+++ b/tools/testing/selftests/drivers/net/ptp.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# By Maciek Machnikowski <maciek@machnikowski.net> (c) 2026,
+
+"""
+Test suite for PTP sync using ptp4l.
+
+Start a ptp4l leader and follower and check that the follower locks onto the
+leader (state s2)
+"""
+
+import time
+
+from lib.py import (
+    NetDrvEpEnv,
+    bkg,
+    fd_read_timeout,
+    ksft_exit,
+    ksft_pr,
+    ksft_run,
+    ksft_true,
+)
+
+PTP4L_SYNC_TIMEOUT = 40
+
+
+def _poll_follower_sync(follower, timeout):
+    """Read the follower stdout pipe until ptp4l reports sync state s2.
+
+    Returns a tuple (synced, output) where output is the text read so far.
+    The synchronized ptp4l log line looks like this:
+    ptp4l[18374.558]: master offset        844 s2 freq    +822 path delay       521
+    """
+    fd_file = follower.proc.stdout
+    fd = fd_file.fileno()
+    buf = b""
+    deadline = time.monotonic() + timeout
+    while time.monotonic() < deadline:
+        if b" s2 " in buf:
+            break
+        if follower.proc.poll() is not None:
+            chunk = fd_file.read()
+            if chunk:
+                buf += chunk
+            break
+        try:
+            remaining = deadline - time.monotonic()
+            buf += fd_read_timeout(fd, max(0, min(1, remaining)))
+        except TimeoutError:
+            continue
+    return b" s2 " in buf, buf.decode("utf-8", "replace")
+
+
+def ptp_sync_test(cfg):
+    """Verify ptp4l leader/follower synchronization reaches state s2."""
+    cfg.require_cmd("ptp4l", remote=True)
+
+    leader_cmd = f"ptp4l -i {cfg.remote_ifname} -m -2"
+    follower_cmd = f"ptp4l -i {cfg.ifname} -m -s -2"
+
+    with bkg(leader_cmd, host=cfg.remote), \
+         bkg(follower_cmd) as follower:
+        synced, output = _poll_follower_sync(follower, PTP4L_SYNC_TIMEOUT)
+
+    if synced:
+        return
+
+    ksft_pr(f"ptp4l follower did not reach locked state (s2) within "
+            f"{PTP4L_SYNC_TIMEOUT}s")
+    tail = output.strip().split("\n")[-10:]
+    ksft_pr("Follower log (last 10 lines): " + " | ".join(tail))
+    ksft_true(False, "PTP sync timeout")
+
+
+def main():
+    """Run ksft tests."""
+    with NetDrvEpEnv(__file__) as cfg:
+        ksft_run([ptp_sync_test], args=(cfg, ))
+    ksft_exit()
+
+
+if __name__ == "__main__":
+    main()

29/3 2026/08/15 07:05 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 7121
							output: 22
							thoughts: 1424
						

Thoughts:
**Analyzing Hardware Timestamping in the Netdevsim Driver**

Okay, so I'm diving into this patch that adds hardware timestamping support to the `netdevsim` driver. My initial assessment is that it looks fairly straightforward, but I need to make sure I haven't missed anything subtle. It seems the core changes are centered around enabling the driver to report timestamping capabilities via `nsim_get_ts_info`, and then actually capturing timestamps during transmit and receive using the `mock_phc_get_ptp_info` and `ptp_info->gettime64()` calls in `nsim_start_xmit`. We also have the addition of `nsim_set_ts_config` and `nsim_get_ts_config` to handle configuration. Plus, the inclusion of a test case using `ptp4l` is good for verifying the functionality. And finally the changes to the spinlocks in the mock PHC code.

Let's zoom in on `nsim_start_xmit`. I see the code is structured to capture both TX and RX timestamps closely, which is good practice. The use of `ptp_info_tx` and `ptp_info_rx` pointers suggests that the timestamping functionality can be enabled or disabled independently for TX and RX, which is a useful feature. Now, a quick scan of the code block reveals an interesting point. Initially, `tx_ts` and `rx_ts` are uninitialized, which raised a red flag. However, on closer inspection, the code checks if `ptp_info_tx` or `ptp_info_rx` is non-NULL. If `ptp_info_tx` is true, then `ptp_info_tx->gettime64` is called and *that* function (likely `mock_phc_gettime64` in this instance) is what will populate `tx_ts`. A quick look at the `mock_phc_gettime64` function confirms that it does fully initialize the `ts` variable. Phew.

Okay, let's step back a moment and analyze what is going on.
The `shhwtstamps` struct, which is used to store hardware timestamp information, *is* initialized to zero, which is good.  `gettime64` ensures that `tx_ts` and `rx_ts` are completely initialized, and finally `skb_tstamp_tx` will copy the contents of `shhwtstamps` into the skb. No uninitialized memory leaks there.

Now, let's look at `nsim_get_ts_config`. This function simply copies `ns->tstamp_config` to the provided `config` structure. But, `ns->tstamp_config` is of type `struct kernel_hwtstamp_config`. This got me thinking. How is this initialized? Is there a potential for uninitialized memory to be leaked to userspace? A quick memory jog tells me that when `netdevsim` structures are allocated they are likely zeroed using `alloc_netdev`. Let's confirm that. Yes, `nsim_create`, via `alloc_netdev`, zeros the private data, including `ns->tstamp_config`. So, that's good. Further, `nsim_set_ts_config` will overwrite parts of `ns->tstamp_config`, ensuring that at least those fields are initialized.

But hold on. A deeper dive is necessary. I need to be *absolutely* sure about how this configuration data is handled. `struct kernel_hwtstamp_config` itself is not directly exposed to userspace. The ioctl `SIOCGHWTSTAMP` uses a different structure, `struct hwtstamp_config` for the user-space interaction. There must be a translation between the internal kernel structure and the user-space structure, which probably happens somewhere in `net/core/dev_ioctl.c` or `net/ethtool/common.c`. I need to review that translation carefully to make *sure* no uninitialized data leaks out. And I should review the definition of `kernel_hwtstamp_config` and compare with `hwtstamp_config` to make certain everything lines up.



30/3 2026/08/15 07:06 tool grepper
0m Args:
{
  "Expression": "struct kernel_hwtstamp_config"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 1658 lines.\nUse more precise expression if possible.\n\ndrivers/infiniband/ulp/ipoib/ipoib_main.c=1829=static int ipoib_hwtstamp_get(struct net_device *dev,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:1830:\t\t\t      struct kernel_hwtstamp_config *config)\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1831-{\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c=1840=static int ipoib_hwtstamp_set(struct net_device *dev,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:1841:\t\t\t      struct kernel_hwtstamp_config *config,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1842-\t\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/bonding/bond_main.c=5779=static u32 bond_mode_bcast_speed(struct slave *slave, u32 speed)\n--\ndrivers/net/bonding/bond_main.c-5789-/* Set the BOND_PHC_INDEX flag to notify user space */\ndrivers/net/bonding/bond_main.c:5790:static int bond_set_phc_index_flag(struct kernel_hwtstamp_config *kernel_cfg)\ndrivers/net/bonding/bond_main.c-5791-{\n--\ndrivers/net/bonding/bond_main.c=5810=static int bond_hwtstamp_get(struct net_device *dev,\ndrivers/net/bonding/bond_main.c:5811:\t\t\t     struct kernel_hwtstamp_config *cfg)\ndrivers/net/bonding/bond_main.c-5812-{\n--\ndrivers/net/bonding/bond_main.c=5828=static int bond_hwtstamp_set(struct net_device *dev,\ndrivers/net/bonding/bond_main.c:5829:\t\t\t     struct kernel_hwtstamp_config *cfg,\ndrivers/net/bonding/bond_main.c-5830-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/can/dev/dev.c=429=int can_hwtstamp_get(struct net_device *netdev,\ndrivers/net/can/dev/dev.c:430:\t\t     struct kernel_hwtstamp_config *cfg)\ndrivers/net/can/dev/dev.c-431-{\n--\ndrivers/net/can/dev/dev.c=442=int can_hwtstamp_set(struct net_device *netdev,\ndrivers/net/can/dev/dev.c:443:\t\t     struct kernel_hwtstamp_config *cfg,\ndrivers/net/can/dev/dev.c-444-\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/can/peak_canfd/peak_canfd.c=746=static int peak_eth_hwtstamp_get(struct net_device *netdev,\ndrivers/net/can/peak_canfd/peak_canfd.c:747:\t\t\t\t struct kernel_hwtstamp_config *config)\ndrivers/net/can/peak_canfd/peak_canfd.c-748-{\n--\ndrivers/net/can/peak_canfd/peak_canfd.c=755=static int peak_eth_hwtstamp_set(struct net_device *netdev,\ndrivers/net/can/peak_canfd/peak_canfd.c:756:\t\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/can/peak_canfd/peak_canfd.c-757-\t\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/can/usb/gs_usb.c=1185=static int gs_can_hwtstamp_get(struct net_device *netdev,\ndrivers/net/can/usb/gs_usb.c:1186:\t\t\t       struct kernel_hwtstamp_config *cfg)\ndrivers/net/can/usb/gs_usb.c-1187-{\n--\ndrivers/net/can/usb/gs_usb.c=1196=static int gs_can_hwtstamp_set(struct net_device *netdev,\ndrivers/net/can/usb/gs_usb.c:1197:\t\t\t       struct kernel_hwtstamp_config *cfg,\ndrivers/net/can/usb/gs_usb.c-1198-\t\t\t       struct netlink_ext_ack *extack)\n--\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c=786=static int peak_hwtstamp_get(struct net_device *netdev,\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c:787:\t\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c-788-{\n--\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c=795=static int peak_hwtstamp_set(struct net_device *netdev,\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c:796:\t\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c-797-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/hirschmann/hellcreek.h=235=struct hellcreek_port_hwtstamp {\n--\ndrivers/net/dsa/hirschmann/hellcreek.h-246-\t/* Current timestamp configuration */\ndrivers/net/dsa/hirschmann/hellcreek.h:247:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/dsa/hirschmann/hellcreek.h-248-};\n--\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c=42=static int hellcreek_set_hwtstamp_config(struct hellcreek *hellcreek, int port,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c:43:\t\t\t\t\t struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c-44-{\n--\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c=112=int hellcreek_port_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c:113:\t\t\t\tstruct kernel_hwtstamp_config *config,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c-114-\t\t\t\tstruct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c=132=int hellcreek_port_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c:133:\t\t\t\tstruct kernel_hwtstamp_config *config)\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.c-134-{\n--\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h=40=int hellcreek_port_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h:41:\t\t\t\tstruct kernel_hwtstamp_config *config,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h-42-\t\t\t\tstruct netlink_ext_ack *extack);\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h=43=int hellcreek_port_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h:44:\t\t\t\tstruct kernel_hwtstamp_config *config);\ndrivers/net/dsa/hirschmann/hellcreek_hwtstamp.h-45-\n--\ndrivers/net/dsa/microchip/ksz_common.h=169=struct ksz_port {\n--\ndrivers/net/dsa/microchip/ksz_common.h-193-#if IS_ENABLED(CONFIG_NET_DSA_MICROCHIP_KSZ_PTP)\ndrivers/net/dsa/microchip/ksz_common.h:194:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/dsa/microchip/ksz_common.h-195-\tbool hwts_tx_en;\n--\ndrivers/net/dsa/microchip/ksz_ptp.c=357=int ksz_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.c:358:\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/microchip/ksz_ptp.c-359-{\n--\ndrivers/net/dsa/microchip/ksz_ptp.c=369=static int ksz8463_set_hwtstamp_config(struct ksz_device *dev,\ndrivers/net/dsa/microchip/ksz_ptp.c-370-\t\t\t\t       struct ksz_port *prt,\ndrivers/net/dsa/microchip/ksz_ptp.c:371:\t\t\t\t       struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/microchip/ksz_ptp.c-372-{\n--\ndrivers/net/dsa/microchip/ksz_ptp.c=416=int ksz8463_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.c:417:\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/microchip/ksz_ptp.c-418-\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/microchip/ksz_ptp.c=435=static int ksz_set_hwtstamp_config(struct ksz_device *dev,\ndrivers/net/dsa/microchip/ksz_ptp.c-436-\t\t\t\t   struct ksz_port *prt,\ndrivers/net/dsa/microchip/ksz_ptp.c:437:\t\t\t\t   struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/microchip/ksz_ptp.c-438-{\n--\ndrivers/net/dsa/microchip/ksz_ptp.c=508=int ksz_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.c:509:\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/microchip/ksz_ptp.c-510-\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/microchip/ksz_ptp.h=44=int ksz_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.h:45:\t\t     struct kernel_hwtstamp_config *config);\ndrivers/net/dsa/microchip/ksz_ptp.h-46-int ksz_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.h:47:\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/microchip/ksz_ptp.h-48-\t\t     struct netlink_ext_ack *extack);\ndrivers/net/dsa/microchip/ksz_ptp.h=49=int ksz8463_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/microchip/ksz_ptp.h:50:\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/microchip/ksz_ptp.h-51-\t\t\t struct netlink_ext_ack *extack);\n--\ndrivers/net/dsa/mv88e6xxx/chip.h=230=struct mv88e6xxx_port_hwtstamp {\n--\ndrivers/net/dsa/mv88e6xxx/chip.h-246-\t/* Current timestamp configuration */\ndrivers/net/dsa/mv88e6xxx/chip.h:247:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/dsa/mv88e6xxx/chip.h-248-};\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c=91=static int mv88e6xxx_set_hwtstamp_config(struct mv88e6xxx_chip *chip, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c:92:\t\t\t\t\t struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c-93-{\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c=171=int mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c:172:\t\t\t\tstruct kernel_hwtstamp_config *config,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c-173-\t\t\t\tstruct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c=192=int mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c:193:\t\t\t\tstruct kernel_hwtstamp_config *config)\ndrivers/net/dsa/mv88e6xxx/hwtstamp.c-194-{\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h=113=int mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h:114:\t\t\t\tstruct kernel_hwtstamp_config *cfg,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h-115-\t\t\t\tstruct netlink_ext_ack *extack);\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h=116=int mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h:117:\t\t\t\tstruct kernel_hwtstamp_config *cfg);\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h-118-\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h=138=mv88e6xxx_port_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h:139:\t\t\t    struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h-140-\t\t\t    struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h=146=mv88e6xxx_port_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h:147:\t\t\t    struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/mv88e6xxx/hwtstamp.h-148-{\n--\ndrivers/net/dsa/ocelot/felix.c=1797=static int felix_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c:1798:\t\t\t      struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/ocelot/felix.c-1799-{\n--\ndrivers/net/dsa/ocelot/felix.c=1807=static int felix_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/ocelot/felix.c:1808:\t\t\t      struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/ocelot/felix.c-1809-\t\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/sja1105/sja1105_ptp.c=61=int sja1105_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/sja1105/sja1105_ptp.c:62:\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/sja1105/sja1105_ptp.c-63-\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/dsa/sja1105/sja1105_ptp.c=99=int sja1105_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/sja1105/sja1105_ptp.c:100:\t\t\t struct kernel_hwtstamp_config *config)\ndrivers/net/dsa/sja1105/sja1105_ptp.c-101-{\n--\ndrivers/net/dsa/sja1105/sja1105_ptp.h=115=int sja1105_hwtstamp_get(struct dsa_switch *ds, int port,\ndrivers/net/dsa/sja1105/sja1105_ptp.h:116:\t\t\t struct kernel_hwtstamp_config *config);\ndrivers/net/dsa/sja1105/sja1105_ptp.h-117-\ndrivers/net/dsa/sja1105/sja1105_ptp.h=118=int sja1105_hwtstamp_set(struct dsa_switch *ds, int port,\ndrivers/net/dsa/sja1105/sja1105_ptp.h:119:\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/dsa/sja1105/sja1105_ptp.h-120-\t\t\t struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c=160=int xgbe_get_hwtstamp_settings(struct net_device *netdev,\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c:161:\t\t\t       struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c-162-{\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c=170=int xgbe_set_hwtstamp_settings(struct net_device *netdev,\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c:171:\t\t\t       struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c-172-\t\t\t       struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/amd/xgbe/xgbe.h=993=struct xgbe_prv_data {\n--\ndrivers/net/ethernet/amd/xgbe/xgbe.h-1164-\tstruct ptp_clock *ptp_clock;\ndrivers/net/ethernet/amd/xgbe/xgbe.h:1165:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/ethernet/amd/xgbe/xgbe.h-1166-\tunsigned int tstamp_addend;\n--\ndrivers/net/ethernet/amd/xgbe/xgbe.h=1331=int xgbe_get_hwtstamp_settings(struct net_device *netdev,\ndrivers/net/ethernet/amd/xgbe/xgbe.h:1332:\t\t\t       struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/amd/xgbe/xgbe.h-1333-int xgbe_set_hwtstamp_settings(struct net_device *netdev,\ndrivers/net/ethernet/amd/xgbe/xgbe.h:1334:\t\t\t       struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/amd/xgbe/xgbe.h-1335-\t\t\t       struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c=263=static int aq_ndev_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c:264:\t\t\t\tstruct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c-265-\t\t\t\tstruct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c=301=static int aq_ndev_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c:302:\t\t\t\tstruct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c-303-{\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c=70=struct aq_ptp_s {\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c-71-\tstruct aq_nic_s *aq_nic;\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c:72:\tstruct kernel_hwtstamp_config hwtstamp_config;\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c-73-\tspinlock_t ptp_lock;\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c=778=void aq_ptp_hwtstamp_config_get(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c:779:\t\t\t\tstruct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c-780-{\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c=815=int aq_ptp_hwtstamp_config_set(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c:816:\t\t\t       struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.c-817-{\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h=69=void aq_ptp_hwtstamp_config_get(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h:70:\t\t\t\tstruct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h-71-int aq_ptp_hwtstamp_config_set(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h:72:\t\t\t       struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h-73-\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h=141=static inline void aq_ptp_hwtstamp_config_get(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h:142:\t\t\t\t\t      struct kernel_hwtstamp_config *config) {}\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h-143-static inline int aq_ptp_hwtstamp_config_set(struct aq_ptp_s *aq_ptp,\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h:144:\t\t\t\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/aquantia/atlantic/aq_ptp.h-145-{\n--\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c=311=static int bnx2x_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:312:\t\t\t      struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-313-\t\t\t      struct netlink_ext_ack *extack);\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c=314=static int bnx2x_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:315:\t\t\t      struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-316-\n--\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c=15367=static int bnx2x_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15368:\t\t\t      struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-15369-\t\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c=15409=static int bnx2x_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:15410:\t\t\t      struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-15411-{\n--\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c=547=int bnxt_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:548:\t\t      struct kernel_hwtstamp_config *stmpconf,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c-549-\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c=620=int bnxt_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c:621:\t\t      struct kernel_hwtstamp_config *stmpconf)\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c-622-{\n--\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h=163=int bnxt_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h:164:\t\t      struct kernel_hwtstamp_config *stmpconf,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h-165-\t\t      struct netlink_ext_ack *extack);\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h=166=int bnxt_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h:167:\t\t      struct kernel_hwtstamp_config *stmpconf);\ndrivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h-168-void bnxt_ptp_free_txts_skbs(struct bnxt_ptp_cfg *ptp);\n--\ndrivers/net/ethernet/broadcom/tg3.c=13916=static int tg3_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/broadcom/tg3.c:13917:\t\t\t    struct kernel_hwtstamp_config *stmpconf,\ndrivers/net/ethernet/broadcom/tg3.c-13918-\t\t\t    struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/broadcom/tg3.c=13997=static int tg3_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/broadcom/tg3.c:13998:\t\t\t    struct kernel_hwtstamp_config *stmpconf)\ndrivers/net/ethernet/broadcom/tg3.c-13999-{\n--\ndrivers/net/ethernet/cadence/macb.h=1203=struct macb_ptp_info {\n--\ndrivers/net/ethernet/cadence/macb.h-1210-\tint (*get_hwtst)(struct net_device *netdev,\ndrivers/net/ethernet/cadence/macb.h:1211:\t\t\t struct kernel_hwtstamp_config *tstamp_config);\ndrivers/net/ethernet/cadence/macb.h-1212-\tint (*set_hwtst)(struct net_device *netdev,\ndrivers/net/ethernet/cadence/macb.h:1213:\t\t\t struct kernel_hwtstamp_config *tstamp_config,\ndrivers/net/ethernet/cadence/macb.h-1214-\t\t\t struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/cadence/macb.h=1298=struct macb {\n--\ndrivers/net/ethernet/cadence/macb.h-1367-\tstruct tsu_incr tsu_incr;\ndrivers/net/ethernet/cadence/macb.h:1368:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/ethernet/cadence/macb.h-1369-\n--\ndrivers/net/ethernet/cadence/macb.h=1423=int gem_get_hwtst(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb.h:1424:\t\t  struct kernel_hwtstamp_config *tstamp_config);\ndrivers/net/ethernet/cadence/macb.h-1425-int gem_set_hwtst(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb.h:1426:\t\t  struct kernel_hwtstamp_config *tstamp_config,\ndrivers/net/ethernet/cadence/macb.h-1427-\t\t  struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/cadence/macb_main.c=4207=static int macb_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb_main.c:4208:\t\t\t     struct kernel_hwtstamp_config *cfg)\ndrivers/net/ethernet/cadence/macb_main.c-4209-{\n--\ndrivers/net/ethernet/cadence/macb_main.c=4221=static int macb_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb_main.c:4222:\t\t\t     struct kernel_hwtstamp_config *cfg,\ndrivers/net/ethernet/cadence/macb_main.c-4223-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cadence/macb_ptp.c=381=int gem_get_hwtst(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb_ptp.c:382:\t\t  struct kernel_hwtstamp_config *tstamp_config)\ndrivers/net/ethernet/cadence/macb_ptp.c-383-{\n--\ndrivers/net/ethernet/cadence/macb_ptp.c=405=int gem_set_hwtst(struct net_device *dev,\ndrivers/net/ethernet/cadence/macb_ptp.c:406:\t\t  struct kernel_hwtstamp_config *tstamp_config,\ndrivers/net/ethernet/cadence/macb_ptp.c-407-\t\t  struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cavium/liquidio/lio_main.c=2108=static int liquidio_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/cavium/liquidio/lio_main.c:2109:\t\t\t\t struct kernel_hwtstamp_config *conf,\ndrivers/net/ethernet/cavium/liquidio/lio_main.c-2110-\t\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cavium/liquidio/lio_main.c=2158=static int liquidio_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/cavium/liquidio/lio_main.c:2159:\t\t\t\t struct kernel_hwtstamp_config *conf)\ndrivers/net/ethernet/cavium/liquidio/lio_main.c-2160-{\n--\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c=1236=static int liquidio_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:1237:\t\t\t\t struct kernel_hwtstamp_config *conf,\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c-1238-\t\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c=1283=static int liquidio_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:1284:\t\t\t\t struct kernel_hwtstamp_config *conf)\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c-1285-{\n--\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c=693=static int octeon_mgmt_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c:694:\t\t\t\t    struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c-695-\t\t\t\t    struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c=781=static int octeon_mgmt_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c:782:\t\t\t\t    struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c-783-{\n--\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c=1902=static int nicvf_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c:1903:\t\t\t      struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c-1904-\t\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c=1952=static int nicvf_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c:1953:\t\t\t      struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c-1954-{\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4.h=653=struct port_info {\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4.h-676-\tbool rxtstamp;  /* Enable TS */\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4.h:677:\tstruct kernel_hwtstamp_config tstamp_config;\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4.h-678-\tbool ptp_enable;\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c=3045=static int cxgb_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3046:\t\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-3047-{\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c=3054=static int cxgb_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3055:\t\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-3056-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/engleder/tsnep.h=159=struct tsnep_adapter {\n--\ndrivers/net/ethernet/engleder/tsnep.h-178-\ndrivers/net/ethernet/engleder/tsnep.h:179:\tstruct kernel_hwtstamp_config hwtstamp_config;\ndrivers/net/ethernet/engleder/tsnep.h-180-\tstruct ptp_clock *ptp_clock;\n--\ndrivers/net/ethernet/engleder/tsnep.h=206=int tsnep_ptp_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/engleder/tsnep.h:207:\t\t\t   struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/engleder/tsnep.h-208-int tsnep_ptp_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/engleder/tsnep.h:209:\t\t\t   struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/engleder/tsnep.h-210-\t\t\t   struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/engleder/tsnep_ptp.c=22=int tsnep_ptp_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/engleder/tsnep_ptp.c:23:\t\t\t   struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/engleder/tsnep_ptp.c-24-{\n--\ndrivers/net/ethernet/engleder/tsnep_ptp.c=31=int tsnep_ptp_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/engleder/tsnep_ptp.c:32:\t\t\t   struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/engleder/tsnep_ptp.c-33-\t\t\t   struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c=3090=static int dpaa_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c:3091:\t\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c-3092-{\n--\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c=3102=static int dpaa_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c:3103:\t\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c-3104-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c=2587=static int dpaa2_eth_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2588:\t\t\t\t  struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c-2589-\t\t\t\t  struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c=2620=static int dpaa2_eth_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2621:\t\t\t\t  struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c-2622-{\n--\ndrivers/net/ethernet/freescale/enetc/enetc.c=3381=int enetc_hwtstamp_set(struct net_device *ndev,\ndrivers/net/ethernet/freescale/enetc/enetc.c:3382:\t\t       struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/enetc/enetc.c-3383-\t\t       struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/enetc/enetc.c=3434=int enetc_hwtstamp_get(struct net_device *ndev,\ndrivers/net/ethernet/freescale/enetc/enetc.c:3435:\t\t       struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/enetc/enetc.c-3436-{\n--\ndrivers/net/ethernet/freescale/enetc/enetc.h=523=int enetc_hwtstamp_get(struct net_device *ndev,\ndrivers/net/ethernet/freescale/enetc/enetc.h:524:\t\t       struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/freescale/enetc/enetc.h-525-int enetc_hwtstamp_set(struct net_device *ndev,\ndrivers/net/ethernet/freescale/enetc/enetc.h:526:\t\t       struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/enetc/enetc.h-527-\t\t       struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/freescale/fec.h=699=void fec_ptp_start_cyclecounter(struct net_device *ndev);\ndrivers/net/ethernet/freescale/fec.h:700:int fec_ptp_set(struct net_device *ndev, struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/fec.h-701-\t\tstruct netlink_ext_ack *extack);\ndrivers/net/ethernet/freescale/fec.h:702:void fec_ptp_get(struct net_device *ndev, struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/freescale/fec.h-703-\n--\ndrivers/net/ethernet/freescale/fec_main.c=4839=static int fec_hwtstamp_get(struct net_device *ndev,\ndrivers/net/ethernet/freescale/fec_main.c:4840:\t\t\t    struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/fec_main.c-4841-{\n--\ndrivers/net/ethernet/freescale/fec_main.c=4855=static int fec_hwtstamp_set(struct net_device *ndev,\ndrivers/net/ethernet/freescale/fec_main.c:4856:\t\t\t    struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/fec_main.c-4857-\t\t\t    struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/fec_ptp.c=524=static int fec_ptp_enable(struct ptp_clock_info *ptp,\n--\ndrivers/net/ethernet/freescale/fec_ptp.c-633-\ndrivers/net/ethernet/freescale/fec_ptp.c:634:int fec_ptp_set(struct net_device *ndev, struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/fec_ptp.c-635-\t\tstruct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/fec_ptp.c-663-\ndrivers/net/ethernet/freescale/fec_ptp.c:664:void fec_ptp_get(struct net_device *ndev, struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/fec_ptp.c-665-{\n--\ndrivers/net/ethernet/freescale/gianfar.c=2056=static int gfar_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/freescale/gianfar.c:2057:\t\t\t     struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/freescale/gianfar.c-2058-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/freescale/gianfar.c=2096=static int gfar_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/freescale/gianfar.c:2097:\t\t\t     struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/freescale/gianfar.c-2098-{\n--\ndrivers/net/ethernet/fungible/funeth/funeth.h=82=struct funeth_priv {\n--\ndrivers/net/ethernet/fungible/funeth/funeth.h-123-\ndrivers/net/ethernet/fungible/funeth/funeth.h:124:\tstruct kernel_hwtstamp_config hwtstamp_cfg;\ndrivers/net/ethernet/fungible/funeth/funeth.h-125-\n--\ndrivers/net/ethernet/fungible/funeth/funeth_main.c=1017=static int fun_hwtstamp_get(struct net_device *dev,\ndrivers/net/ethernet/fungible/funeth/funeth_main.c:1018:\t\t\t    struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/fungible/funeth/funeth_main.c-1019-{\n--\ndrivers/net/ethernet/fungible/funeth/funeth_main.c=1026=static int fun_hwtstamp_set(struct net_device *dev,\ndrivers/net/ethernet/fungible/funeth/funeth_main.c:1027:\t\t\t    struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/fungible/funeth/funeth_main.c-1028-\t\t\t    struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/google/gve/gve.h=800=struct gve_priv {\n--\ndrivers/net/ethernet/google/gve/gve.h-927-\tstruct gve_ptp *ptp;\ndrivers/net/ethernet/google/gve/gve.h:928:\tstruct kernel_hwtstamp_config ts_config;\ndrivers/net/ethernet/google/gve/gve.h-929-\tstruct gve_nic_ts_report *nic_ts_report;\n--\ndrivers/net/ethernet/google/gve/gve_main.c=2208=static int gve_get_ts_config(struct net_device *dev,\ndrivers/net/ethernet/google/gve/gve_main.c:2209:\t\t\t     struct kernel_hwtstamp_config *kernel_config)\ndrivers/net/ethernet/google/gve/gve_main.c-2210-{\n--\ndrivers/net/ethernet/google/gve/gve_main.c=2217=static int gve_set_ts_config(struct net_device *dev,\ndrivers/net/ethernet/google/gve/gve_main.c:2218:\t\t\t     struct kernel_hwtstamp_config *kernel_config,\ndrivers/net/ethernet/google/gve/gve_main.c-2219-\t\t\t     struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h=610=struct hnae3_ae_ops {\n--\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h-812-\tint (*hwtstamp_get)(struct hnae3_handle *handle,\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h:813:\t\t\t    struct kernel_hwtstamp_config *config);\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h-814-\tint (*hwtstamp_set)(struct hnae3_handle *handle,\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h:815:\t\t\t    struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/hisilicon/hns3/hnae3.h-816-\t\t\t    struct netlink_ext_ack *extack);\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c=2444=static int hns3_nic_hwtstamp_get(struct net_device *netdev,\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2445:\t\t\t\t struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c-2446-{\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c=2458=static int hns3_nic_hwtstamp_set(struct net_device *netdev,\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c:2459:\t\t\t\t struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c-2460-\t\t\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c=207=int hclge_ptp_get_cfg(struct hnae3_handle *handle,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c:208:\t\t      struct kernel_hwtstamp_config *config)\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-209-{\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c=259=static int hclge_ptp_cfg(struct hclge_dev *hdev, u32 cfg)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-275-\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c:276:static int hclge_ptp_set_tx_mode(struct kernel_hwtstamp_config *cfg,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-277-\t\t\t\t unsigned long *flags, u32 *ptp_cfg)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-293-\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c:294:static int hclge_ptp_set_rx_mode(struct kernel_hwtstamp_config *cfg,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-295-\t\t\t\t unsigned long *flags, u32 *ptp_cfg)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c=338=static int hclge_ptp_set_ts_mode(struct hclge_dev *hdev,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c:339:\t\t\t\t struct kernel_hwtstamp_config *cfg)\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-340-{\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c=366=int hclge_ptp_set_cfg(struct hnae3_handle *handle,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c:367:\t\t      struct kernel_hwtstamp_config *config,\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c-368-\t\t      struct netlink_ext_ack *extack)\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h=58=struct hclge_ptp {\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h-64-\tstruct ptp_clock_info info;\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h:65:\tstruct kernel_hwtstamp_config ts_cfg;\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h-66-\tspinlock_t lock;\t/* protects ptp registers */\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h=136=int hclge_ptp_get_cfg(struct hnae3_handle *handle,\n\n"
}

31/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 24111
							output: 21
							thoughts: 157
						

Thoughts:
**My Analysis of the `kernel_hwtstamp_config` Structure and its Usage**

Alright, so I'm digging into `kernel_hwtstamp_config`. My understanding is that it's this internal structure – I'm betting it's crucial for the hardware timestamping operations, specifically the `ndo_hwtstamp_get` and `ndo_hwtstamp_set` methods. I need to understand how it's actually *used*. My first instinct is to dive into `net/core/dev_ioctl.c` or perhaps `net/ethtool/common.c`, since those often handle device control and settings, and timestamping falls squarely into that category.

Hold on a second...something's clicking. It seems like `nsim_set_ts_config` and `nsim_get_ts_config` are *assigned* to those `ndo_hwtstamp` function pointers! That's interesting. Now, I should probably focus my search on those particular functions. Therefore, my immediate target will be either `net/core/dev_ioctl.c` or, more likely, `net/core/hwtstamp.c` this time, because I need to trace `ndo_hwtstamp_get` to see how it's used.



32/3 2026/08/15 07:06 tool grepper
0m Args:
{
  "Expression": "ndo_hwtstamp_get"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 541 lines.\nUse more precise expression if possible.\n\nDocumentation/networking/timestamping.rst=631=the actual values as described in the section on SIOCSHWTSTAMP. It\nDocumentation/networking/timestamping.rst:632:should also support ndo_hwtstamp_get NDO to retrieve configuration.\nDocumentation/networking/timestamping.rst-633-\n--\nDocumentation/translations/zh_CN/networking/timestamping.rst=513=ioctl 并更新提供的 struct hwtstamp_config 与实际值,如 SIOCSHWTSTAMP 部分\nDocumentation/translations/zh_CN/networking/timestamping.rst:514:所述。它还应支持 ndo_hwtstamp_get 或遗留 SIOCGHWTSTAMP。\nDocumentation/translations/zh_CN/networking/timestamping.rst-515-\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c=1829=static int ipoib_hwtstamp_get(struct net_device *dev,\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1833-\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:1834:\tif (!priv-\u003ern_ops-\u003endo_hwtstamp_get)\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1835-\t\treturn -EOPNOTSUPP;\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1836-\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:1837:\treturn priv-\u003ern_ops-\u003endo_hwtstamp_get(dev, config);\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-1838-}\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c=2157=static const struct net_device_ops ipoib_netdev_ops_pf = {\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-2175-\t.ndo_eth_ioctl\t\t = ipoib_ioctl,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:2176:\t.ndo_hwtstamp_get\t = ipoib_hwtstamp_get,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-2177-\t.ndo_hwtstamp_set\t = ipoib_hwtstamp_set,\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c=2180=static const struct net_device_ops ipoib_netdev_ops_vf = {\n--\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-2192-\t.ndo_eth_ioctl\t\t = ipoib_ioctl,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c:2193:\t.ndo_hwtstamp_get\t = ipoib_hwtstamp_get,\ndrivers/infiniband/ulp/ipoib/ipoib_main.c-2194-\t.ndo_hwtstamp_set\t = ipoib_hwtstamp_set,\n--\ndrivers/net/bonding/bond_main.c=5944=static const struct net_device_ops bond_netdev_ops = {\n--\ndrivers/net/bonding/bond_main.c-5975-\t.ndo_xdp_get_xmit_slave = bond_xdp_get_xmit_slave,\ndrivers/net/bonding/bond_main.c:5976:\t.ndo_hwtstamp_get\t= bond_hwtstamp_get,\ndrivers/net/bonding/bond_main.c-5977-\t.ndo_hwtstamp_set\t= bond_hwtstamp_set,\n--\ndrivers/net/can/dev/dev.c=424=EXPORT_SYMBOL_GPL(can_set_static_ctrlmode);\ndrivers/net/can/dev/dev.c-425-\ndrivers/net/can/dev/dev.c:426:/* generic implementation of netdev_ops::ndo_hwtstamp_get for CAN devices\ndrivers/net/can/dev/dev.c-427- * supporting hardware timestamps\n--\ndrivers/net/can/esd/esd_402_pci-core.c=85=static const struct net_device_ops pci402_acc_netdev_ops = {\n--\ndrivers/net/can/esd/esd_402_pci-core.c-88-\t.ndo_start_xmit = acc_start_xmit,\ndrivers/net/can/esd/esd_402_pci-core.c:89:\t.ndo_hwtstamp_get = can_hwtstamp_get,\ndrivers/net/can/esd/esd_402_pci-core.c-90-\t.ndo_hwtstamp_set = can_hwtstamp_set,\n--\ndrivers/net/can/kvaser_pciefd/kvaser_pciefd_core.c=902=static const struct net_device_ops kvaser_pciefd_netdev_ops = {\n--\ndrivers/net/can/kvaser_pciefd/kvaser_pciefd_core.c-905-\t.ndo_start_xmit = kvaser_pciefd_start_xmit,\ndrivers/net/can/kvaser_pciefd/kvaser_pciefd_core.c:906:\t.ndo_hwtstamp_get = can_hwtstamp_get,\ndrivers/net/can/kvaser_pciefd/kvaser_pciefd_core.c-907-\t.ndo_hwtstamp_set = can_hwtstamp_set,\n--\ndrivers/net/can/peak_canfd/peak_canfd.c=767=static const struct net_device_ops peak_canfd_netdev_ops = {\n--\ndrivers/net/can/peak_canfd/peak_canfd.c-770-\t.ndo_start_xmit = peak_canfd_start_xmit,\ndrivers/net/can/peak_canfd/peak_canfd.c:771:\t.ndo_hwtstamp_get = peak_eth_hwtstamp_get,\ndrivers/net/can/peak_canfd/peak_canfd.c-772-\t.ndo_hwtstamp_set = peak_eth_hwtstamp_set,\n--\ndrivers/net/can/spi/mcp251xfd/mcp251xfd-core.c=1732=static const struct net_device_ops mcp251xfd_netdev_ops = {\n--\ndrivers/net/can/spi/mcp251xfd/mcp251xfd-core.c-1735-\t.ndo_start_xmit\t= mcp251xfd_start_xmit,\ndrivers/net/can/spi/mcp251xfd/mcp251xfd-core.c:1736:\t.ndo_hwtstamp_get = can_hwtstamp_get,\ndrivers/net/can/spi/mcp251xfd/mcp251xfd-core.c-1737-\t.ndo_hwtstamp_set = can_hwtstamp_set,\n--\ndrivers/net/can/usb/etas_es58x/es58x_core.c=1980=static const struct net_device_ops es58x_netdev_ops = {\n--\ndrivers/net/can/usb/etas_es58x/es58x_core.c-1983-\t.ndo_start_xmit = es58x_start_xmit,\ndrivers/net/can/usb/etas_es58x/es58x_core.c:1984:\t.ndo_hwtstamp_get = can_hwtstamp_get,\ndrivers/net/can/usb/etas_es58x/es58x_core.c-1985-\t.ndo_hwtstamp_set = can_hwtstamp_set,\n--\ndrivers/net/can/usb/gs_usb.c=1208=static const struct net_device_ops gs_usb_netdev_ops = {\n--\ndrivers/net/can/usb/gs_usb.c-1211-\t.ndo_start_xmit = gs_can_start_xmit,\ndrivers/net/can/usb/gs_usb.c:1212:\t.ndo_hwtstamp_get = gs_can_hwtstamp_get,\ndrivers/net/can/usb/gs_usb.c-1213-\t.ndo_hwtstamp_set = gs_can_hwtstamp_set,\n--\ndrivers/net/can/usb/kvaser_usb/kvaser_usb_core.c=791=static const struct net_device_ops kvaser_usb_netdev_ops = {\n--\ndrivers/net/can/usb/kvaser_usb/kvaser_usb_core.c-794-\t.ndo_start_xmit = kvaser_usb_start_xmit,\ndrivers/net/can/usb/kvaser_usb/kvaser_usb_core.c:795:\t.ndo_hwtstamp_get = can_hwtstamp_get,\ndrivers/net/can/usb/kvaser_usb/kvaser_usb_core.c-796-\t.ndo_hwtstamp_set = can_hwtstamp_set,\n--\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c=807=static const struct net_device_ops peak_usb_netdev_ops = {\n--\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c-810-\t.ndo_start_xmit = peak_usb_ndo_start_xmit,\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c:811:\t.ndo_hwtstamp_get = peak_hwtstamp_get,\ndrivers/net/can/usb/peak_usb/pcan_usb_core.c-812-\t.ndo_hwtstamp_set = peak_hwtstamp_set,\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-drv.c=2037=static const struct net_device_ops xgbe_netdev_ops = {\n--\ndrivers/net/ethernet/amd/xgbe/xgbe-drv.c-2055-\t.ndo_features_check\t= xgbe_features_check,\ndrivers/net/ethernet/amd/xgbe/xgbe-drv.c:2056:\t.ndo_hwtstamp_get\t= xgbe_get_hwtstamp_settings,\ndrivers/net/ethernet/amd/xgbe/xgbe-drv.c-2057-\t.ndo_hwtstamp_set\t= xgbe_set_hwtstamp_settings,\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c=459=static const struct net_device_ops aq_ndev_ops = {\n--\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c-472-\t.ndo_xdp_xmit = aq_xdp_xmit,\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c:473:\t.ndo_hwtstamp_get = aq_ndev_hwtstamp_get,\ndrivers/net/ethernet/aquantia/atlantic/aq_main.c-474-\t.ndo_hwtstamp_set = aq_ndev_hwtstamp_set,\n--\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c=13007=static const struct net_device_ops bnx2x_netdev_ops = {\n--\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-13035-\t.ndo_features_check\t= bnx2x_features_check,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:13036:\t.ndo_hwtstamp_get\t= bnx2x_hwtstamp_get,\ndrivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c-13037-\t.ndo_hwtstamp_set\t= bnx2x_hwtstamp_set,\n--\ndrivers/net/ethernet/broadcom/bnxt/bnxt.c=16123=static const struct net_device_ops bnxt_netdev_ops = {\n--\ndrivers/net/ethernet/broadcom/bnxt/bnxt.c-16153-\t.ndo_bridge_setlink\t= bnxt_bridge_setlink,\ndrivers/net/ethernet/broadcom/bnxt/bnxt.c:16154:\t.ndo_hwtstamp_get\t= bnxt_hwtstamp_get,\ndrivers/net/ethernet/broadcom/bnxt/bnxt.c-16155-\t.ndo_hwtstamp_set\t= bnxt_hwtstamp_set,\n--\ndrivers/net/ethernet/broadcom/tg3.c=14368=static const struct net_device_ops tg3_netdev_ops = {\n--\ndrivers/net/ethernet/broadcom/tg3.c-14383-#endif\ndrivers/net/ethernet/broadcom/tg3.c:14384:\t.ndo_hwtstamp_get\t= tg3_hwtstamp_get,\ndrivers/net/ethernet/broadcom/tg3.c-14385-\t.ndo_hwtstamp_set\t= tg3_hwtstamp_set,\n--\ndrivers/net/ethernet/cadence/macb_main.c=4549=static const struct net_device_ops macb_netdev_ops = {\n--\ndrivers/net/ethernet/cadence/macb_main.c-4564-\t.ndo_hwtstamp_set\t= macb_hwtstamp_set,\ndrivers/net/ethernet/cadence/macb_main.c:4565:\t.ndo_hwtstamp_get\t= macb_hwtstamp_get,\ndrivers/net/ethernet/cadence/macb_main.c-4566-\t.ndo_setup_tc\t\t= macb_setup_tc,\n--\ndrivers/net/ethernet/cadence/macb_main.c=5274=static const struct net_device_ops at91ether_netdev_ops = {\n--\ndrivers/net/ethernet/cadence/macb_main.c-5286-\t.ndo_hwtstamp_set\t= macb_hwtstamp_set,\ndrivers/net/ethernet/cadence/macb_main.c:5287:\t.ndo_hwtstamp_get\t= macb_hwtstamp_get,\ndrivers/net/ethernet/cadence/macb_main.c-5288-};\n--\ndrivers/net/ethernet/cavium/liquidio/lio_main.c=3205=static const struct net_device_ops lionetdevops = {\n--\ndrivers/net/ethernet/cavium/liquidio/lio_main.c-3226-\t.ndo_get_port_parent_id\t= liquidio_get_port_parent_id,\ndrivers/net/ethernet/cavium/liquidio/lio_main.c:3227:\t.ndo_hwtstamp_get\t= liquidio_hwtstamp_get,\ndrivers/net/ethernet/cavium/liquidio/lio_main.c-3228-\t.ndo_hwtstamp_set\t= liquidio_hwtstamp_set,\n--\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c=1859=static const struct net_device_ops lionetdevops = {\n--\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c-1871-\t.ndo_set_features\t= liquidio_set_features,\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c:1872:\t.ndo_hwtstamp_get\t= liquidio_hwtstamp_get,\ndrivers/net/ethernet/cavium/liquidio/lio_vf_main.c-1873-\t.ndo_hwtstamp_set\t= liquidio_hwtstamp_set,\n--\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c=1367=static const struct net_device_ops octeon_mgmt_ops = {\n--\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c-1377-#endif\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c:1378:\t.ndo_hwtstamp_get =\t\tocteon_mgmt_hwtstamp_get,\ndrivers/net/ethernet/cavium/octeon/octeon_mgmt.c-1379-\t.ndo_hwtstamp_set =\t\tocteon_mgmt_hwtstamp_set,\n--\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c=2077=static const struct net_device_ops nicvf_netdev_ops = {\n--\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c-2088-\t.ndo_set_rx_mode        = nicvf_set_rx_mode,\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c:2089:\t.ndo_hwtstamp_get\t= nicvf_hwtstamp_get,\ndrivers/net/ethernet/cavium/thunder/nicvf_main.c-2090-\t.ndo_hwtstamp_set\t= nicvf_hwtstamp_set,\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c=3855=static const struct net_device_ops cxgb4_netdev_ops = {\n--\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-3877-\t.ndo_fix_features     = cxgb_fix_features,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3878:\t.ndo_hwtstamp_get     = cxgb_hwtstamp_get,\ndrivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c-3879-\t.ndo_hwtstamp_set     = cxgb_hwtstamp_set,\n--\ndrivers/net/ethernet/engleder/tsnep_main.c=2371=static const struct net_device_ops tsnep_netdev_ops = {\n--\ndrivers/net/ethernet/engleder/tsnep_main.c-2384-\t.ndo_xsk_wakeup = tsnep_netdev_xsk_wakeup,\ndrivers/net/ethernet/engleder/tsnep_main.c:2385:\t.ndo_hwtstamp_get = tsnep_ptp_hwtstamp_get,\ndrivers/net/ethernet/engleder/tsnep_main.c-2386-\t.ndo_hwtstamp_set = tsnep_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c=3145=static const struct net_device_ops dpaa_ops = {\n--\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c-3158-\t.ndo_xdp_xmit = dpaa_xdp_xmit,\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c:3159:\t.ndo_hwtstamp_get = dpaa_hwtstamp_get,\ndrivers/net/ethernet/freescale/dpaa/dpaa_eth.c-3160-\t.ndo_hwtstamp_set = dpaa_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c=3030=static const struct net_device_ops dpaa2_eth_ops = {\n--\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c-3045-\t.ndo_vlan_rx_kill_vid = dpaa2_eth_rx_kill_vid,\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:3046:\t.ndo_hwtstamp_get = dpaa2_eth_hwtstamp_get,\ndrivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c-3047-\t.ndo_hwtstamp_set = dpaa2_eth_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/enetc/enetc4_pf.c=564=static const struct net_device_ops enetc4_ndev_ops = {\n--\ndrivers/net/ethernet/freescale/enetc/enetc4_pf.c-574-\t.ndo_eth_ioctl\t\t= enetc_ioctl,\ndrivers/net/ethernet/freescale/enetc/enetc4_pf.c:575:\t.ndo_hwtstamp_get\t= enetc_hwtstamp_get,\ndrivers/net/ethernet/freescale/enetc/enetc4_pf.c-576-\t.ndo_hwtstamp_set\t= enetc_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf.c=482=static const struct net_device_ops enetc_ndev_ops = {\n--\ndrivers/net/ethernet/freescale/enetc/enetc_pf.c-498-\t.ndo_xdp_xmit\t\t= enetc_xdp_xmit,\ndrivers/net/ethernet/freescale/enetc/enetc_pf.c:499:\t.ndo_hwtstamp_get\t= enetc_hwtstamp_get,\ndrivers/net/ethernet/freescale/enetc/enetc_pf.c-500-\t.ndo_hwtstamp_set\t= enetc_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/enetc/enetc_vf.c=213=static const struct net_device_ops enetc_ndev_ops = {\n--\ndrivers/net/ethernet/freescale/enetc/enetc_vf.c-221-\t.ndo_setup_tc\t\t= enetc_vf_setup_tc,\ndrivers/net/ethernet/freescale/enetc/enetc_vf.c:222:\t.ndo_hwtstamp_get\t= enetc_hwtstamp_get,\ndrivers/net/ethernet/freescale/enetc/enetc_vf.c-223-\t.ndo_hwtstamp_set\t= enetc_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/fec_main.c=4887=static const struct net_device_ops fec_netdev_ops = {\n--\ndrivers/net/ethernet/freescale/fec_main.c-4901-\t.ndo_xsk_wakeup\t\t= fec_enet_xsk_wakeup,\ndrivers/net/ethernet/freescale/fec_main.c:4902:\t.ndo_hwtstamp_get\t= fec_hwtstamp_get,\ndrivers/net/ethernet/freescale/fec_main.c-4903-\t.ndo_hwtstamp_set\t= fec_hwtstamp_set,\n--\ndrivers/net/ethernet/freescale/gianfar.c=3134=static const struct net_device_ops gfar_netdev_ops = {\n--\ndrivers/net/ethernet/freescale/gianfar.c-3149-#endif\ndrivers/net/ethernet/freescale/gianfar.c:3150:\t.ndo_hwtstamp_get = gfar_hwtstamp_get,\ndrivers/net/ethernet/freescale/gianfar.c-3151-\t.ndo_hwtstamp_set = gfar_hwtstamp_set,\n--\ndrivers/net/ethernet/fungible/funeth/funeth_main.c=1322=static const struct net_device_ops fun_netdev_ops = {\n--\ndrivers/net/ethernet/fungible/funeth/funeth_main.c-1336-\t.ndo_get_vf_config\t= fun_get_vf_config,\ndrivers/net/ethernet/fungible/funeth/funeth_main.c:1337:\t.ndo_hwtstamp_get\t= fun_hwtstamp_get,\ndrivers/net/ethernet/fungible/funeth/funeth_main.c-1338-\t.ndo_hwtstamp_set\t= fun_hwtstamp_set,\n--\ndrivers/net/ethernet/google/gve/gve_main.c=2244=static const struct net_device_ops gve_netdev_ops = {\n--\ndrivers/net/ethernet/google/gve/gve_main.c-2254-\t.ndo_xsk_wakeup\t\t=\tgve_xsk_wakeup,\ndrivers/net/ethernet/google/gve/gve_main.c:2255:\t.ndo_hwtstamp_get\t=\tgve_get_ts_config,\ndrivers/net/ethernet/google/gve/gve_main.c-2256-\t.ndo_hwtstamp_set\t=\tgve_set_ts_config,\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c=3071=static const struct net_device_ops hns3_nic_netdev_ops = {\n--\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c-3096-\t.ndo_select_queue\t= hns3_nic_select_queue,\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c:3097:\t.ndo_hwtstamp_get\t= hns3_nic_hwtstamp_get,\ndrivers/net/ethernet/hisilicon/hns3/hns3_enet.c-3098-\t.ndo_hwtstamp_set\t= hns3_nic_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/e1000e/netdev.c=7346=static const struct net_device_ops e1000e_netdev_ops = {\n--\ndrivers/net/ethernet/intel/e1000e/netdev.c-7365-\t.ndo_features_check\t= passthru_features_check,\ndrivers/net/ethernet/intel/e1000e/netdev.c:7366:\t.ndo_hwtstamp_get\t= e1000e_hwtstamp_get,\ndrivers/net/ethernet/intel/e1000e/netdev.c-7367-\t.ndo_hwtstamp_set\t= e1000e_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/i40e/i40e_main.c=13585=static const struct net_device_ops i40e_netdev_ops = {\n--\ndrivers/net/ethernet/intel/i40e/i40e_main.c-13620-\t.ndo_dfwd_del_station\t= i40e_fwd_del,\ndrivers/net/ethernet/intel/i40e/i40e_main.c:13621:\t.ndo_hwtstamp_get\t= i40e_ptp_hwtstamp_get,\ndrivers/net/ethernet/intel/i40e/i40e_main.c-13622-\t.ndo_hwtstamp_set\t= i40e_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/iavf/iavf_main.c=5134=static const struct net_device_ops iavf_netdev_ops = {\n--\ndrivers/net/ethernet/intel/iavf/iavf_main.c-5149-\t.net_shaper_ops\t\t= \u0026iavf_shaper_ops,\ndrivers/net/ethernet/intel/iavf/iavf_main.c:5150:\t.ndo_hwtstamp_get\t= iavf_hwstamp_get,\ndrivers/net/ethernet/intel/iavf/iavf_main.c-5151-\t.ndo_hwtstamp_set\t= iavf_hwstamp_set,\n--\ndrivers/net/ethernet/intel/ice/ice_main.c=9787=static const struct net_device_ops ice_netdev_ops = {\n--\ndrivers/net/ethernet/intel/ice/ice_main.c-9822-\t.ndo_xsk_wakeup = ice_xsk_wakeup,\ndrivers/net/ethernet/intel/ice/ice_main.c:9823:\t.ndo_hwtstamp_get = ice_ptp_hwtstamp_get,\ndrivers/net/ethernet/intel/ice/ice_main.c-9824-\t.ndo_hwtstamp_set = ice_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/idpf/idpf_lib.c=2665=static const struct net_device_ops idpf_netdev_ops = {\n--\ndrivers/net/ethernet/intel/idpf/idpf_lib.c-2676-\t.ndo_tx_timeout = idpf_tx_timeout,\ndrivers/net/ethernet/intel/idpf/idpf_lib.c:2677:\t.ndo_hwtstamp_get = idpf_hwtstamp_get,\ndrivers/net/ethernet/intel/idpf/idpf_lib.c-2678-\t.ndo_hwtstamp_set = idpf_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/igb/igb_main.c=3036=static const struct net_device_ops igb_netdev_ops = {\n--\ndrivers/net/ethernet/intel/igb/igb_main.c-3062-\t.ndo_xsk_wakeup         = igb_xsk_wakeup,\ndrivers/net/ethernet/intel/igb/igb_main.c:3063:\t.ndo_hwtstamp_get\t= igb_ptp_hwtstamp_get,\ndrivers/net/ethernet/intel/igb/igb_main.c-3064-\t.ndo_hwtstamp_set\t= igb_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/igc/igc_main.c=6981=static const struct net_device_ops igc_netdev_ops = {\n--\ndrivers/net/ethernet/intel/igc/igc_main.c-6997-\t.ndo_get_tstamp\t\t= igc_get_tstamp,\ndrivers/net/ethernet/intel/igc/igc_main.c:6998:\t.ndo_hwtstamp_get\t= igc_ptp_hwtstamp_get,\ndrivers/net/ethernet/intel/igc/igc_main.c-6999-\t.ndo_hwtstamp_set\t= igc_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c=11071=static const struct net_device_ops ixgbe_netdev_ops = {\n--\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c-11115-\t.ndo_xsk_wakeup         = ixgbe_xsk_wakeup,\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c:11116:\t.ndo_hwtstamp_get\t= ixgbe_ptp_hwtstamp_get,\ndrivers/net/ethernet/intel/ixgbe/ixgbe_main.c-11117-\t.ndo_hwtstamp_set\t= ixgbe_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c=5810=static const struct net_device_ops mvpp2_netdev_ops = {\n--\ndrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c-5823-\t.ndo_xdp_xmit\t\t= mvpp2_xdp_xmit,\ndrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c:5824:\t.ndo_hwtstamp_get\t= mvpp2_hwtstamp_get,\ndrivers/net/ethernet/marvell/mvpp2/mvpp2_main.c-5825-\t.ndo_hwtstamp_set\t= mvpp2_hwtstamp_set,\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c=2951=static const struct net_device_ops otx2_netdev_ops = {\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c-2970-\t.ndo_set_vf_trust\t= otx2_ndo_set_vf_trust,\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:2971:\t.ndo_hwtstamp_get\t= otx2_config_hwtstamp_get,\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c-2972-\t.ndo_hwtstamp_set\t= otx2_config_hwtstamp_set,\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c=524=static const struct net_device_ops otx2vf_netdev_ops = {\n--\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c-535-\t.ndo_setup_tc = otx2_setup_tc,\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c:536:\t.ndo_hwtstamp_get = otx2_config_hwtstamp_get,\ndrivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c-537-\t.ndo_hwtstamp_set = otx2_config_hwtstamp_set,\n--\ndrivers/net/ethernet/mellanox/mlx4/en_netdev.c=2823=static const struct net_device_ops mlx4_netdev_ops = {\n--\ndrivers/net/ethernet/mellanox/mlx4/en_netdev.c-2845-\t.ndo_bpf\t\t= mlx4_xdp,\ndrivers/net/ethernet/mellanox/mlx4/en_netdev.c:2846:\t.ndo_hwtstamp_get\t= mlx4_en_hwtstamp_get,\ndrivers/net/ethernet/mellanox/mlx4/en_netdev.c-2847-\t.ndo_hwtstamp_set\t= mlx4_en_hwtstamp_set,\n--\ndrivers/net/ethernet/mellanox/mlx5/core/en_main.c=5324=const struct net_device_ops mlx5e_netdev_ops = {\n--\ndrivers/net/ethernet/mellanox/mlx5/core/en_main.c-5343-\t.ndo_xsk_wakeup          = mlx5e_xsk_wakeup,\ndrivers/net/ethernet/mellanox/mlx5/core/en_main.c:5344:\t.ndo_hwtstamp_get        = mlx5e_hwtstamp_get_ndo,\ndrivers/net/ethernet/mellanox/mlx5/core/en_main.c-5345-\t.ndo_hwtstamp_set        = mlx5e_hwtstamp_set_ndo,\n--\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c=65=static const struct net_device_ops mlx5i_netdev_ops = {\n--\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c-71-\t.ndo_change_mtu          = mlx5i_change_mtu,\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c:72:\t.ndo_hwtstamp_get        = mlx5i_hwtstamp_get,\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c-73-\t.ndo_hwtstamp_set        = mlx5i_hwtstamp_set,\n--\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c=144=static const struct net_device_ops mlx5i_pkey_netdev_ops = {\n--\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c-150-\t.ndo_change_mtu          = mlx5i_pkey_change_mtu,\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c:151:\t.ndo_hwtstamp_get        = mlx5i_hwtstamp_get,\ndrivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c-152-\t.ndo_hwtstamp_set        = mlx5i_hwtstamp_set,\n--\ndrivers/net/ethernet/mellanox/mlxsw/spectrum.c=1192=static const struct net_device_ops mlxsw_sp_port_netdev_ops = {\n--\ndrivers/net/ethernet/mellanox/mlxsw/spectrum.c-1205-\t.ndo_set_features\t= mlxsw_sp_set_features,\ndrivers/net/ethernet/mellanox/mlxsw/spectrum.c:1206:\t.ndo_hwtstamp_get\t= mlxsw_sp_port_hwtstamp_get,\ndrivers/net/ethernet/mellanox/mlxsw/spectrum.c-1207-\t.ndo_hwtstamp_set\t= mlxsw_sp_port_hwtstamp_set,\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.c=559=static const struct net_device_ops fbnic_netdev_ops = {\n--\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.c-569-\t.ndo_bpf\t\t= fbnic_bpf,\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.c:570:\t.ndo_hwtstamp_get\t= fbnic_hwtstamp_get,\ndrivers/net/ethernet/meta/fbnic/fbnic_netdev.c-571-\t.ndo_hwtstamp_set\t= fbnic_hwtstamp_set,\n--\ndrivers/net/ethernet/microchip/lan743x_main.c=3496=static const struct net_device_ops lan743x_netdev_ops = {\n--\ndrivers/net/ethernet/microchip/lan743x_main.c-3504-\t.ndo_set_mac_address\t= lan743x_netdev_set_mac_address,\ndrivers/net/ethernet/microchip/lan743x_main.c:3505:\t.ndo_hwtstamp_get\t= lan743x_ptp_hwtstamp_get,\ndrivers/net/ethernet/microchip/lan743x_main.c-3506-\t.ndo_hwtstamp_set\t= lan743x_ptp_hwtstamp_set,\n--\ndrivers/net/ethernet/microchip/lan966x/lan966x_main.c=501=static const struct net_device_ops lan966x_port_netdev_ops = {\n--\ndrivers/net/ethernet/microchip/lan966x/lan966x_main.c-514-\t.ndo_xdp_xmit\t\t\t= lan966x_xdp_xmit,\ndrivers/net/ethernet/microchip/lan966x/lan966x_main.c:515:\t.ndo_hwtstamp_get\t\t= lan966x_port_hwtstamp_get,\ndrivers/net/ethernet/microchip/lan966x/lan966x_main.c-516-\t.ndo_hwtstamp_set\t\t= lan966x_port_hwtstamp_set,\n--\ndrivers/net/ethernet/microchip/sparx5/sparx5_netdev.c=248=static const struct net_device_ops sparx5_port_netdev_ops = {\n--\ndrivers/net/ethernet/microchip/sparx5/sparx5_netdev.c-259-\t.ndo_setup_tc           = sparx5_port_setup_tc,\ndrivers/net/ethernet/microchip/sparx5/sparx5_netdev.c:260:\t.ndo_hwtstamp_get       = sparx5_port_hwtstamp_get,\ndrivers/net/ethernet/microchip/sparx5/sparx5_netdev.c-261-\t.ndo_hwtstamp_set       = sparx5_port_hwtstamp_set,\n--\ndrivers/net/ethernet/mscc/ocelot_net.c=948=static const struct net_device_ops ocelot_port_netdev_ops = {\n--\ndrivers/net/ethernet/mscc/ocelot_net.c-963-\t.ndo_eth_ioctl\t\t\t= ocelot_ioctl,\ndrivers/net/ethernet/mscc/ocelot_net.c:964:\t.ndo_hwtstamp_get\t\t= ocelot_port_hwtstamp_get,\ndrivers/net/ethernet/mscc/ocelot_net.c-965-\t.ndo_hwtstamp_set\t\t= ocelot_port_hwtstamp_set,\n--\ndrivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c=2344=static const struct net_device_ops pch_gbe_netdev_ops = {\n--\ndrivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c-2356-#endif\ndrivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:2357:\t.ndo_hwtstamp_get = pch_gbe_hwtstamp_get,\ndrivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c-2358-\t.ndo_hwtstamp_set = pch_gbe_hwtstamp_set,\n--\ndrivers/net/ethernet/pensando/ionic/ionic_lif.c=2805=static const struct net_device_ops ionic_netdev_ops = {\n--\ndrivers/net/ethernet/pensando/ionic/ionic_lif.c-2827-\t.ndo_get_vf_stats       = ionic_get_vf_stats,\ndrivers/net/ethernet/pensando/ionic/ionic_lif.c:2828:\t.ndo_hwtstamp_get\t= ionic_hwstamp_get,\ndrivers/net/ethernet/pensando/ionic/ionic_lif.c-2829-\t.ndo_hwtstamp_set\t= ionic_hwstamp_set,\n--\ndrivers/net/ethernet/qlogic/qede/qede_main.c=692=static const struct net_device_ops qede_netdev_ops = {\n--\ndrivers/net/ethernet/qlogic/qede/qede_main.c-724-\t.ndo_setup_tc\t\t= qede_setup_tc_offload,\ndrivers/net/ethernet/qlogic/qede/qede_main.c:725:\t.ndo_hwtstamp_get\t= qede_hwtstamp_get,\ndrivers/net/ethernet/qlogic/qede/qede_main.c-726-\t.ndo_hwtstamp_set\t= qede_hwtstamp_set,\n--\ndrivers/net/ethernet/renesas/ravb_main.c=2605=static const struct net_device_ops ravb_netdev_ops = {\n--\ndrivers/net/ethernet/renesas/ravb_main.c-2617-\t.ndo_set_features\t= ravb_set_features,\ndrivers/net/ethernet/renesas/ravb_main.c:2618:\t.ndo_hwtstamp_get\t= ravb_hwtstamp_get,\ndrivers/net/ethernet/renesas/ravb_main.c-2619-\t.ndo_hwtstamp_set\t= ravb_hwtstamp_set,\n--\ndrivers/net/ethernet/renesas/rswitch_main.c=1871=static const struct net_device_ops rswitch_netdev_ops = {\n--\ndrivers/net/ethernet/renesas/rswitch_main.c-1880-\t.ndo_set_mac_address = eth_mac_addr,\ndrivers/net/ethernet/renesas/rswitch_main.c:1881:\t.ndo_hwtstamp_get = rswitch_hwstamp_get,\ndrivers/net/ethernet/renesas/rswitch_main.c-1882-\t.ndo_hwtstamp_set = rswitch_hwstamp_set,\n--\ndrivers/net/ethernet/renesas/rtsn.c=1173=static const struct net_device_ops rtsn_netdev_ops = {\n--\ndrivers/net/ethernet/renesas/rtsn.c-1181-\t.ndo_hwtstamp_set\t= rtsn_hwtstamp_set,\ndrivers/net/ethernet/renesas/rtsn.c:1182:\t.ndo_hwtstamp_get\t= rtsn_hwtstamp_get,\ndrivers/net/ethernet/renesas/rtsn.c-1183-};\n--\ndrivers/net/ethernet/sfc/efx.c=568=static const struct net_device_ops efx_netdev_ops = {\n--\ndrivers/net/ethernet/sfc/efx.c-582-\t.ndo_hwtstamp_set\t= efx_hwtstamp_set,\ndrivers/net/ethernet/sfc/efx.c:583:\t.ndo_hwtstamp_get\t= efx_hwtstamp_get,\ndrivers/net/ethernet/sfc/efx.c-584-#ifdef CONFIG_SFC_SRIOV\n--\ndrivers/net/ethernet/sfc/siena/efx.c=594=static const struct net_device_ops efx_netdev_ops = {\n--\ndrivers/net/ethernet/sfc/siena/efx.c-609-\t.ndo_hwtstamp_set\t= efx_siena_hwtstamp_set,\ndrivers/net/ethernet/sfc/siena/efx.c:610:\t.ndo_hwtstamp_get\t= efx_siena_hwtstamp_get,\ndrivers/net/ethernet/sfc/siena/efx.c-611-#ifdef CONFIG_SFC_SIENA_SRIOV\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=7304=static const struct net_device_ops stmmac_netdev_ops = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7323-\t.ndo_xsk_wakeup = stmmac_xsk_wakeup,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7324:\t.ndo_hwtstamp_get = stmmac_hwtstamp_get,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7325-\t.ndo_hwtstamp_set = stmmac_hwtstamp_set,\n--\ndrivers/net/ethernet/ti/am65-cpsw-nuss.c=1974=static const struct net_device_ops am65_cpsw_nuss_netdev_ops = {\n--\ndrivers/net/ethernet/ti/am65-cpsw-nuss.c-1989-\t.ndo_xdp_xmit\t\t= am65_cpsw_ndo_xdp_xmit,\ndrivers/net/ethernet/ti/am65-cpsw-nuss.c:1990:\t.ndo_hwtstamp_get       = am65_cpsw_nuss_hwtstamp_get,\ndrivers/net/ethernet/ti/am65-cpsw-nuss.c-1991-\t.ndo_hwtstamp_set       = am65_cpsw_nuss_hwtstamp_set,\n--\ndrivers/net/ethernet/ti/cpsw.c=1199=static const struct net_device_ops cpsw_netdev_ops = {\n--\ndrivers/net/ethernet/ti/cpsw.c-1216-\t.ndo_xdp_xmit\t\t= cpsw_ndo_xdp_xmit,\ndrivers/net/ethernet/ti/cpsw.c:1217:\t.ndo_hwtstamp_get\t= cpsw_hwtstamp_get,\ndrivers/net/ethernet/ti/cpsw.c-1218-\t.ndo_hwtstamp_set\t= cpsw_hwtstamp_set,\n--\ndrivers/net/ethernet/ti/cpsw_new.c=1148=static const struct net_device_ops cpsw_netdev_ops = {\n--\ndrivers/net/ethernet/ti/cpsw_new.c-1167-\t.ndo_get_port_parent_id\t= cpsw_get_port_parent_id,\ndrivers/net/ethernet/ti/cpsw_new.c:1168:\t.ndo_hwtstamp_get\t= cpsw_hwtstamp_get,\ndrivers/net/ethernet/ti/cpsw_new.c-1169-\t.ndo_hwtstamp_set\t= cpsw_hwtstamp_set,\n--\ndrivers/net/ethernet/ti/icssg/icssg_prueth.c=1636=static const struct net_device_ops emac_netdev_ops = {\n--\ndrivers/net/ethernet/ti/icssg/icssg_prueth.c-1651-\t.ndo_xdp_xmit = emac_xdp_xmit,\ndrivers/net/ethernet/ti/icssg/icssg_prueth.c:1652:\t.ndo_hwtstamp_get = icssg_ndo_get_ts_config,\ndrivers/net/ethernet/ti/icssg/icssg_prueth.c-1653-\t.ndo_hwtstamp_set = icssg_ndo_set_ts_config,\n--\ndrivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c=742=static const struct net_device_ops emac_netdev_ops = {\n--\ndrivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c-752-\t.ndo_get_phys_port_name = icssg_ndo_get_phys_port_name,\ndrivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c:753:\t.ndo_hwtstamp_get = icssg_ndo_get_ts_config,\ndrivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c-754-\t.ndo_hwtstamp_set = icssg_ndo_set_ts_config,\n--\ndrivers/net/ethernet/ti/netcp_core.c=1744=static int netcp_ndo_stop(struct net_device *ndev)\n--\ndrivers/net/ethernet/ti/netcp_core.c-1783-\ndrivers/net/ethernet/ti/netcp_core.c:1784:static int netcp_ndo_hwtstamp_get(struct net_device *ndev,\ndrivers/net/ethernet/ti/netcp_core.c-1785-\t\t\t\t  struct kernel_hwtstamp_config *config)\n--\ndrivers/net/ethernet/ti/netcp_core.c=1997=static const struct net_device_ops netcp_netdev_ops = {\n--\ndrivers/net/ethernet/ti/netcp_core.c-2010-\t.ndo_setup_tc\t\t= netcp_setup_tc,\ndrivers/net/ethernet/ti/netcp_core.c:2011:\t.ndo_hwtstamp_get\t= netcp_ndo_hwtstamp_get,\ndrivers/net/ethernet/ti/netcp_core.c-2012-\t.ndo_hwtstamp_set\t= netcp_ndo_hwtstamp_set,\n--\ndrivers/net/ethernet/wangxun/ngbe/ngbe_main.c=672=static const struct net_device_ops ngbe_netdev_ops = {\n--\ndrivers/net/ethernet/wangxun/ngbe/ngbe_main.c-687-\t.ndo_hwtstamp_set       = wx_hwtstamp_set,\ndrivers/net/ethernet/wangxun/ngbe/ngbe_main.c:688:\t.ndo_hwtstamp_get       = wx_hwtstamp_get,\ndrivers/net/ethernet/wangxun/ngbe/ngbe_main.c-689-};\n--\ndrivers/net/ethernet/wangxun/txgbe/txgbe_main.c=696=static const struct net_device_ops txgbe_netdev_ops = {\n--\ndrivers/net/ethernet/wangxun/txgbe/txgbe_main.c-711-\t.ndo_hwtstamp_set       = wx_hwtstamp_set,\ndrivers/net/ethernet/wangxun/txgbe/txgbe_main.c:712:\t.ndo_hwtstamp_get       = wx_hwtstamp_get,\ndrivers/net/ethernet/wangxun/txgbe/txgbe_main.c-713-};\n--\ndrivers/net/ethernet/xscale/ixp4xx_eth.c=1422=static const struct net_device_ops ixp4xx_netdev_ops = {\n--\ndrivers/net/ethernet/xscale/ixp4xx_eth.c-1430-\t.ndo_validate_addr = eth_validate_addr,\ndrivers/net/ethernet/xscale/ixp4xx_eth.c:1431:\t.ndo_hwtstamp_get = ixp4xx_hwtstamp_get,\ndrivers/net/ethernet/xscale/ixp4xx_eth.c-1432-\t.ndo_hwtstamp_set = ixp4xx_hwtstamp_set,\n--\ndrivers/net/macvlan.c=1193=static const struct net_device_ops macvlan_netdev_ops = {\n--\ndrivers/net/macvlan.c-1217-\t.ndo_features_check\t= passthru_features_check,\ndrivers/net/macvlan.c:1218:\t.ndo_hwtstamp_get\t= macvlan_hwtstamp_get,\ndrivers/net/macvlan.c-1219-\t.ndo_hwtstamp_set\t= macvlan_hwtstamp_set,\n--\ndrivers/net/netdevsim/netdev.c=729=static const struct net_device_ops nsim_netdev_ops = {\n--\ndrivers/net/netdevsim/netdev.c-751-\t.net_shaper_ops\t\t= \u0026nsim_shaper_ops,\ndrivers/net/netdevsim/netdev.c:752:\t.ndo_hwtstamp_get\t= nsim_get_ts_config,\ndrivers/net/netdevsim/netdev.c-753-\t.ndo_hwtstamp_set\t= nsim_set_ts_config,\n--\ninclude/linux/netdevice.h=1065=struct netdev_net_notifier {\n--\ninclude/linux/netdevice.h-1438- *\ninclude/linux/netdevice.h:1439: * int (*ndo_hwtstamp_get)(struct net_device *dev,\ninclude/linux/netdevice.h-1440- *\t\t\t   struct kernel_hwtstamp_config *kernel_config);\n--\ninclude/linux/netdevice.h=1449=struct net_device_ops {\n--\ninclude/linux/netdevice.h-1695-\t\t\t\t\t\t  bool cycles);\ninclude/linux/netdevice.h:1696:\tint\t\t\t(*ndo_hwtstamp_get)(struct net_device *dev,\ninclude/linux/netdevice.h-1697-\t\t\t\t\t\t    struct kernel_hwtstamp_config *kernel_config);\n--\nnet/8021q/vlan_dev.c=1078=static const struct net_device_ops vlan_netdev_ops = {\n--\nnet/8021q/vlan_dev.c-1110-\t.ndo_fill_forward_path\t= vlan_dev_fill_forward_path,\nnet/8021q/vlan_dev.c:1111:\t.ndo_hwtstamp_get\t= vlan_hwtstamp_get,\nnet/8021q/vlan_dev.c-1112-\t.ndo_hwtstamp_set\t= vlan_hwtstamp_set,\n--\nnet/core/dev_ioctl.c=258=int dev_get_hwtstamp_phylib(struct net_device *dev,\n--\nnet/core/dev_ioctl.c-270-\t\tif (hwprov-\u003esource == HWTSTAMP_SOURCE_NETDEV)\nnet/core/dev_ioctl.c:271:\t\t\treturn dev-\u003enetdev_ops-\u003endo_hwtstamp_get(dev, cfg);\n\n"
}

33/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 39574
							output: 37
							thoughts: 22
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into the Network Interface Control Path**

Okay, time to get my hands dirty. I'm going to zero in on `net/core/dev_ioctl.c`, specifically around line 271. That area's where the core device ioctl handling logic resides, and it's a good starting point for tracing how a user-space request interacts with the kernel's network interface configuration. I'm suspecting a problem related to a recent change and I'm sure that the specific call will be handled somewhere in that code, whether directly, or as a dispatch to another function. I'm expecting to see the initial sanity checks, the dispatch based on the `cmd` argument, and potentially some calls into netdevice-specific handlers. Knowing the overall structure is vital to understanding the control flow and potential points of failure, I'm expecting to either find the issue directly in that code, or to get some context which leads me to a more specific part of the networking stack.



34/3 2026/08/15 07:06 tool read-file
0m Args:
{
  "File": "net/core/dev_ioctl.c",
  "FirstLine": 250,
  "LineCount": 50
}

Results:
{
  "Contents": " 250:\t * Helper for calling the default hardware provider timestamping.\n 251:\t *\n 252:\t * Note: phy_mii_ioctl() only handles SIOCSHWTSTAMP (not SIOCGHWTSTAMP), but\n 253:\t * phydev-\u003emii_ts has both hwtstamp_get() and hwtstamp_set() methods. So this\n 254:\t * will return -EOPNOTSUPP for phylib only if hwtstamp_get() is not\n 255:\t * implemented for now, which is still more accurate than letting the netdev\n 256:\t * handle the GET request.\n 257:\t */\n 258:\tint dev_get_hwtstamp_phylib(struct net_device *dev,\n 259:\t\t\t\t    struct kernel_hwtstamp_config *cfg)\n 260:\t{\n 261:\t\tstruct hwtstamp_provider *hwprov;\n 262:\t\n 263:\t\thwprov = netdev_ops_lock_dereference(dev-\u003ehwprov, dev);\n 264:\t\tif (hwprov) {\n 265:\t\t\tcfg-\u003equalifier = hwprov-\u003edesc.qualifier;\n 266:\t\t\tif (hwprov-\u003esource == HWTSTAMP_SOURCE_PHYLIB \u0026\u0026\n 267:\t\t\t    hwprov-\u003ephydev)\n 268:\t\t\t\treturn phy_hwtstamp_get(hwprov-\u003ephydev, cfg);\n 269:\t\n 270:\t\t\tif (hwprov-\u003esource == HWTSTAMP_SOURCE_NETDEV)\n 271:\t\t\t\treturn dev-\u003enetdev_ops-\u003endo_hwtstamp_get(dev, cfg);\n 272:\t\n 273:\t\t\treturn -EOPNOTSUPP;\n 274:\t\t}\n 275:\t\n 276:\t\tif (phy_is_default_hwtstamp(dev-\u003ephydev))\n 277:\t\t\treturn phy_hwtstamp_get(dev-\u003ephydev, cfg);\n 278:\t\n 279:\t\treturn dev-\u003enetdev_ops-\u003endo_hwtstamp_get(dev, cfg);\n 280:\t}\n 281:\t\n 282:\tstatic int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr)\n 283:\t{\n 284:\t\tconst struct net_device_ops *ops = dev-\u003enetdev_ops;\n 285:\t\tstruct kernel_hwtstamp_config kernel_cfg = {};\n 286:\t\tstruct hwtstamp_config cfg;\n 287:\t\tint err;\n 288:\t\n 289:\t\tif (!ops-\u003endo_hwtstamp_get)\n 290:\t\t\treturn -EOPNOTSUPP;\n 291:\t\n 292:\t\tif (!netif_device_present(dev))\n 293:\t\t\treturn -ENODEV;\n 294:\t\n 295:\t\tkernel_cfg.ifr = ifr;\n 296:\t\tnetdev_lock_ops(dev);\n 297:\t\terr = dev_get_hwtstamp_phylib(dev, \u0026kernel_cfg);\n 298:\t\tnetdev_unlock_ops(dev);\n 299:\t\tif (err)\n"
}

35/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 40707
							output: 37
							thoughts: 208
						

Thoughts:
**Analyzing the Hardware Timestamping Configuration**

Okay, so `dev_get_hwtstamp` starts by initializing `kernel_cfg` to an empty structure. Makes sense, a clean slate. Then it hands that off to `dev_get_hwtstamp_phylib`, which eventually calls `ndo_hwtstamp_get`. Standard flow, so far.

Now, let's look at `nsim_get_ts_config`. Ah, here it is: `*config = ns->tstamp_config;`. Hold on a second! That's... concerning. This is *overwriting* the entire `config` structure. That means the `config->ifr` and `config->bpf` fields, which were likely set by the caller before getting passed here, are being wiped out. This is a potential bug or at least an unexpected behavior. It effectively loses any previously set configuration. I need to understand what happens *after* `dev_get_hwtstamp_phylib` to see if the overwritten data is important or not.



36/3 2026/08/15 07:06 tool read-file
0m Args:
{
  "File": "net/core/dev_ioctl.c",
  "FirstLine": 290,
  "LineCount": 50
}

Results:
{
  "Contents": " 290:\t\t\treturn -EOPNOTSUPP;\n 291:\t\n 292:\t\tif (!netif_device_present(dev))\n 293:\t\t\treturn -ENODEV;\n 294:\t\n 295:\t\tkernel_cfg.ifr = ifr;\n 296:\t\tnetdev_lock_ops(dev);\n 297:\t\terr = dev_get_hwtstamp_phylib(dev, \u0026kernel_cfg);\n 298:\t\tnetdev_unlock_ops(dev);\n 299:\t\tif (err)\n 300:\t\t\treturn err;\n 301:\t\n 302:\t\t/* If the request was resolved through an unconverted driver, omit\n 303:\t\t * the copy_to_user(), since the implementation has already done that\n 304:\t\t */\n 305:\t\tif (!kernel_cfg.copied_to_user) {\n 306:\t\t\thwtstamp_config_from_kernel(\u0026cfg, \u0026kernel_cfg);\n 307:\t\n 308:\t\t\tif (copy_to_user(ifr-\u003eifr_data, \u0026cfg, sizeof(cfg)))\n 309:\t\t\t\treturn -EFAULT;\n 310:\t\t}\n 311:\t\n 312:\t\treturn 0;\n 313:\t}\n 314:\t\n 315:\t/**\n 316:\t * dev_set_hwtstamp_phylib() - Change hardware timestamping of NIC\n 317:\t *\tor of attached phylib PHY\n 318:\t * @dev: Network device\n 319:\t * @cfg: Timestamping configuration structure\n 320:\t * @extack: Netlink extended ack message structure, for error reporting\n 321:\t *\n 322:\t * Helper for enforcing a common policy that phylib timestamping, if available,\n 323:\t * should take precedence in front of hardware timestamping provided by the\n 324:\t * netdev. If the netdev driver needs to perform specific actions even for PHY\n 325:\t * timestamping to work properly (a switch port must trap the timestamped\n 326:\t * frames and not forward them), it must set dev-\u003esee_all_hwtstamp_requests.\n 327:\t */\n 328:\tint dev_set_hwtstamp_phylib(struct net_device *dev,\n 329:\t\t\t\t    struct kernel_hwtstamp_config *cfg,\n 330:\t\t\t\t    struct netlink_ext_ack *extack)\n 331:\t{\n 332:\t\tconst struct net_device_ops *ops = dev-\u003enetdev_ops;\n 333:\t\tstruct kernel_hwtstamp_config old_cfg = {};\n 334:\t\tstruct hwtstamp_provider *hwprov;\n 335:\t\tstruct phy_device *phydev;\n 336:\t\tbool changed = false;\n 337:\t\tbool phy_ts;\n 338:\t\tint err;\n 339:\t\n"
}

37/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 41956
							output: 23
							thoughts: 669
						

Thoughts:
**Analyzing the Timestamp Configuration in Netdevsim**

Okay, let me break this down. First, `ns->tstamp_config` is essentially uninitialized beyond `tx_type` and `rx_filter`, as `nsim_set_ts_config` is the only function that sets these values. The `ns` structure, which contains `tstamp_config`, is allocated with `alloc_netdev`, which uses `kzalloc` or similar, thus zeroing the private data. So, initially `ns->tstamp_config` is all zeros.

Then, when `nsim_set_ts_config` is called, it seems it only updates `ns->tstamp_config.tx_type` and `ns->tstamp_config.rx_filter`. It *doesn't* touch any of the other fields like `flags`, `ifr`, `bpf`, or `copied_to_user`. This means those fields remain zeroed.

Now, looking at `nsim_get_ts_config`, it simply overwrites the provided `config` with the entire `ns->tstamp_config`. This effectively sets `config->ifr` to NULL and `config->copied_to_user` to zero.

Finally, `dev_get_hwtstamp` comes into play. It checks if `kernel_cfg.copied_to_user` is set, but it’s not, since it's zero! Therefore, `hwtstamp_config_from_kernel` is called to copy `flags`, `tx_type`, and `rx_filter` from `kernel_cfg` (which is now `ns->tstamp_config`, as explained earlier) to `cfg`. `cfg` is a `struct hwtstamp_config`, which is the structure we're interested in. Okay, let's take a closer look at `hwtstamp_config_from_kernel`.



38/3 2026/08/15 07:06 tool grepper
0m Args:
{
  "Expression": "hwtstamp_config_from_kernel"
}

Results:
{
  "Output": "drivers/net/phy/phy.c=310=int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)\n--\ndrivers/net/phy/phy.c-418-\ndrivers/net/phy/phy.c:419:\t\t\thwtstamp_config_from_kernel(\u0026cfg, \u0026kernel_cfg);\ndrivers/net/phy/phy.c-420-\t\t\tif (copy_to_user(ifr-\u003eifr_data, \u0026cfg, sizeof(cfg)))\n--\ninclude/linux/net_tstamp.h=72=static inline void hwtstamp_config_to_kernel(struct kernel_hwtstamp_config *kernel_cfg,\n--\ninclude/linux/net_tstamp.h-79-\ninclude/linux/net_tstamp.h:80:static inline void hwtstamp_config_from_kernel(struct hwtstamp_config *cfg,\ninclude/linux/net_tstamp.h-81-\t\t\t\t\t       const struct kernel_hwtstamp_config *kernel_cfg)\n--\nnet/core/dev_ioctl.c=282=static int dev_get_hwtstamp(struct net_device *dev, struct ifreq *ifr)\n--\nnet/core/dev_ioctl.c-305-\tif (!kernel_cfg.copied_to_user) {\nnet/core/dev_ioctl.c:306:\t\thwtstamp_config_from_kernel(\u0026cfg, \u0026kernel_cfg);\nnet/core/dev_ioctl.c-307-\n--\nnet/core/dev_ioctl.c=391=static int dev_set_hwtstamp(struct net_device *dev, struct ifreq *ifr)\n--\nnet/core/dev_ioctl.c-431-\tif (!kernel_cfg.copied_to_user) {\nnet/core/dev_ioctl.c:432:\t\thwtstamp_config_from_kernel(\u0026cfg, \u0026kernel_cfg);\nnet/core/dev_ioctl.c-433-\n"
}

39/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 43562
							output: 37
							thoughts: 28
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into the Timestamp Configuration**

Okay, so I'm digging into network timestamping, specifically looking at how the kernel handles the initial configuration. The first thing that jumps out is `hwtstamp_config_from_kernel`. I'm immediately interested in what this function is doing. I know it's defined in `include/linux/net_tstamp.h`, so let's crack that open and see how the hardware timestamp configuration is initialized from the kernel's perspective. I'm expecting to find details on how device capabilities are probed and how the initial settings are applied – the core interface between the hardware timestamping support and the rest of the network stack. I'm keen to understand how this function interfaces with the different hardware and how it handles the complexities of various timestamping methods (software vs. hardware, different clock sources, etc.). My guess is this is where the device-specific initial setup occurs, and I need to see how robustly it deals with error conditions and fallback mechanisms. Time to dive into the code!



40/3 2026/08/15 07:06 tool read-file
0m Args:
{
  "File": "include/linux/net_tstamp.h",
  "FirstLine": 70,
  "LineCount": 30
}

Results:
{
  "Contents": "  70:\t};\n  71:\t\n  72:\tstatic inline void hwtstamp_config_to_kernel(struct kernel_hwtstamp_config *kernel_cfg,\n  73:\t\t\t\t\t\t     const struct hwtstamp_config *cfg)\n  74:\t{\n  75:\t\tkernel_cfg-\u003eflags = cfg-\u003eflags;\n  76:\t\tkernel_cfg-\u003etx_type = cfg-\u003etx_type;\n  77:\t\tkernel_cfg-\u003erx_filter = cfg-\u003erx_filter;\n  78:\t}\n  79:\t\n  80:\tstatic inline void hwtstamp_config_from_kernel(struct hwtstamp_config *cfg,\n  81:\t\t\t\t\t\t       const struct kernel_hwtstamp_config *kernel_cfg)\n  82:\t{\n  83:\t\tcfg-\u003eflags = kernel_cfg-\u003eflags;\n  84:\t\tcfg-\u003etx_type = kernel_cfg-\u003etx_type;\n  85:\t\tcfg-\u003erx_filter = kernel_cfg-\u003erx_filter;\n  86:\t}\n  87:\t\n  88:\tstatic inline bool kernel_hwtstamp_config_changed(const struct kernel_hwtstamp_config *a,\n  89:\t\t\t\t\t\t\t  const struct kernel_hwtstamp_config *b)\n  90:\t{\n  91:\t\treturn a-\u003eflags != b-\u003eflags ||\n  92:\t\t       a-\u003etx_type != b-\u003etx_type ||\n  93:\t\t       a-\u003erx_filter != b-\u003erx_filter;\n  94:\t}\n  95:\t\n  96:\t#endif /* _LINUX_NET_TIMESTAMPING_H_ */\n"
}

41/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 44283
							output: 21
							thoughts: 220
						

Thoughts:
**Analyzing the `hwtstamp_config` Structure**

Okay, let's break this down. I'm looking at the `hwtstamp_config` structure, and it seems straightforward: `flags`, `tx_type`, and `rx_filter`. Each is an `int`, which means 4 bytes, right? So, 3 times 4, that's 12 bytes total. The question is, is there any padding within the structure? Padding could lead to uninitialized memory, which is always a concern. But hold on, the code I'm examining, specifically `hwtstamp_config_from_kernel`, *does* initialize all three fields.

Now, I see `cfg` is declared on the stack as `struct hwtstamp_config cfg;` within `dev_get_hwtstamp` and `dev_set_hwtstamp`. So, if `sizeof(struct hwtstamp_config)` actually comes out to 12 bytes, then we are good and no padding exists, which is the expected outcome. It's time to confirm that `struct hwtstamp_config` definition is as I'm thinking, I'll go check in `include/uapi/linux/net_tstamp.h`.



42/3 2026/08/15 07:06 tool grepper
0m Args:
{
  "Expression": "struct hwtstamp_config \\{"
}

Results:
{
  "Output": "Documentation/networking/timestamping.rst=541=include/uapi/linux/net_tstamp.h as::\nDocumentation/networking/timestamping.rst-542-\nDocumentation/networking/timestamping.rst:543:\tstruct hwtstamp_config {\nDocumentation/networking/timestamping.rst-544-\t\tint flags;\t/* no flags defined right now, must be zero */\n--\nDocumentation/translations/zh_CN/networking/timestamping.rst=427=scm_timestamping 中的三个字段含义隐式定义。ts[0] 在设置时包含软件\n--\nDocumentation/translations/zh_CN/networking/timestamping.rst-436-\nDocumentation/translations/zh_CN/networking/timestamping.rst:437:\tstruct hwtstamp_config {\nDocumentation/translations/zh_CN/networking/timestamping.rst-438-\t\tint flags;\t/* 目前没有定义的标志,必须为零 */\n--\ninclude/uapi/linux/net_tstamp.h=72=struct so_timestamping {\n--\ninclude/uapi/linux/net_tstamp.h-89- */\ninclude/uapi/linux/net_tstamp.h:90:struct hwtstamp_config {\ninclude/uapi/linux/net_tstamp.h-91-\tint flags;\n"
}

43/3 2026/08/15 07:06 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 45123
							output: 40
							thoughts: 25
						

Thoughts:
Here's my summary, as if I were thinking these thoughts:

**Examining net_tstamp.h's Core Structures**

Okay, time to dive in. I need to understand how the timestamping mechanisms work in the Linux kernel, so I'm going to start by looking at `include/uapi/linux/net_tstamp.h`. Specifically, I'll focus around line 90. I know this file defines the user-space interfaces for accessing hardware timestamping features, so this should give me a good handle on the fundamental data structures and ioctls involved. I'm especially interested in how the various timestamping options are configured and what the underlying data representation looks like. Let's dig in and see what's what.



44/3 2026/08/15 07:07 tool read-file
0m Args:
{
  "File": "include/uapi/linux/net_tstamp.h",
  "FirstLine": 85,
  "LineCount": 20
}

Results:
{
  "Contents": "  85:\t * ifr_data pointer to this structure.  For %SIOCSHWTSTAMP, if the\n  86:\t * driver or hardware does not support the requested @rx_filter value,\n  87:\t * the driver may use a more general filter mode.  In this case\n  88:\t * @rx_filter will indicate the actual mode on return.\n  89:\t */\n  90:\tstruct hwtstamp_config {\n  91:\t\tint flags;\n  92:\t\tint tx_type;\n  93:\t\tint rx_filter;\n  94:\t};\n  95:\t\n  96:\t/* possible values for hwtstamp_config-\u003eflags */\n  97:\tenum hwtstamp_flags {\n  98:\t\t/*\n  99:\t\t * With this flag, the user could get bond active interface's\n 100:\t\t * PHC index. Note this PHC index is not stable as when there\n 101:\t\t * is a failover, the bond active interface will be changed, so\n 102:\t\t * will be the PHC index.\n 103:\t\t */\n 104:\t\tHWTSTAMP_FLAG_BONDED_PHC_INDEX = (1\u003c\u003c0),\n"
}

45/3 2026/08/15 07:07 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 45669
							output: 25
							thoughts: 1540
						

Thoughts:
**Hardware Timestamping Analysis**

Okay, let's break this down systematically. First, `struct hwtstamp_config` is declared as 12 bytes - three integers. No padding is expected based on the alignment of `int` (4 bytes). Therefore, `copy_to_user` copies exactly 12 bytes of initialized data from `hwtstamp_config_from_kernel`, which means there shouldn't be any uninitialized memory leaks there.

Now, the `nsim_get_ts_config` function is a potential point of interest. It overwrites `config`, which is a pointer to `kernel_cfg` in `dev_get_hwtstamp`. Initially, `kernel_cfg` is zero-initialized and its `ifr` member is populated. However, `nsim_get_ts_config` then overwrites `*config` with data from `ns->tstamp_config`. This means the `kernel_cfg.ifr` pointer is overwritten with a NULL pointer and discarded. However, it seems the local `ifr` variable, `dev_get_hwtstamp`, does not depend on `kernel_cfg.ifr` at all, so this overwrite doesn't cause a crash or leak because the relevant data is still valid.

The `nsim_set_ts_config` function focuses on setting the `rx_filter` and `tx_type` fields of `ns->tstamp_config`. Importantly, it uses `WRITE_ONCE` for `tx_type`, ensuring proper memory ordering. Critically, it *doesn't* initialize `ns->tstamp_config.flags`, but this is fine. When `nsim_get_ts_config` is called later, this field from `ns->tstamp_config` will be copied to `config->flags`, which will be initialized as zero. So this doesn't present an issue.

Finally, the `nsim_start_xmit` function. It seems there are a couple of timestamp variables: `tx_ts`, `rx_ts`, and `shhwtstamps`. The `ptp_info_tx->gettime64` function, which calls `mock_phc_gettime64`, fully initializes `tx_ts`.  The same is true for `rx_ts`. The `shhwtstamps` struct is zeroed upon declaration, and then its `hwtstamp` member is set.  So this doesn't have any issues.



46/3 2026/08/15 07:07 tool grepper
0m Args:
{
  "Expression": "struct skb_shared_hwtstamps \\{"
}

Results:
{
  "Output": "Documentation/networking/timestamping.rst=636=set the time stamps in the structure::\nDocumentation/networking/timestamping.rst-637-\nDocumentation/networking/timestamping.rst:638:    struct skb_shared_hwtstamps {\nDocumentation/networking/timestamping.rst-639-\t    /* hardware time stamp transformed into duration\n--\nDocumentation/translations/zh_CN/networking/timestamping.rst=517=skb_hwtstamps()。然后设置结构中的时间戳::\nDocumentation/translations/zh_CN/networking/timestamping.rst-518-\nDocumentation/translations/zh_CN/networking/timestamping.rst:519:    struct skb_shared_hwtstamps {\nDocumentation/translations/zh_CN/networking/timestamping.rst-520-\t    /* 硬件时间戳转换为自任意时间点的持续时间\n--\ninclude/linux/skbuff.h=410=static inline bool skb_frag_must_loop(struct page *p)\n--\ninclude/linux/skbuff.h-461- */\ninclude/linux/skbuff.h:462:struct skb_shared_hwtstamps {\ninclude/linux/skbuff.h-463-\tunion {\n"
}

47/3 2026/08/15 07:07 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 48079
							output: 36
							thoughts: 21
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Diving into skbuff.h for a Deeper Look**

Okay, so I need to understand something about the `sk_buff` structure and how it's behaving. My gut tells me there's something specific I need to clarify around how data is being handled. Let's start with `include/linux/skbuff.h` and target around line 462. I'm hoping to refresh my memory on the layout of the structure and perhaps pinpoint where some of the key pointers and length fields that manage the packet buffer are defined, and specifically, how a certain flag, variable or function call that I am interested in, is related to the data in the skb. Time to get familiar with that section. Maybe some inline comments will jump out at me.



48/3 2026/08/15 07:07 tool read-file
0m Args:
{
  "File": "include/linux/skbuff.h",
  "FirstLine": 455,
  "LineCount": 20
}

Results:
{
  "Contents": " 455:\t *\n 456:\t * hwtstamps can only be compared against other hwtstamps from\n 457:\t * the same device.\n 458:\t *\n 459:\t * This structure is attached to packets as part of the\n 460:\t * \u0026skb_shared_info. Use skb_hwtstamps() to get a pointer.\n 461:\t */\n 462:\tstruct skb_shared_hwtstamps {\n 463:\t\tunion {\n 464:\t\t\tktime_t\thwtstamp;\n 465:\t\t\tvoid *netdev_data;\n 466:\t\t};\n 467:\t};\n 468:\t\n 469:\t/* Definitions for tx_flags in struct skb_shared_info */\n 470:\tenum {\n 471:\t\t/* generate hardware time stamp */\n 472:\t\tSKBTX_HW_TSTAMP_NOBPF = 1 \u003c\u003c 0,\n 473:\t\n 474:\t\t/* generate software time stamp when queueing packet to NIC */\n"
}

49/3 2026/08/15 07:07 llm kmsan-evaluator
0m Model:
gemini-3.1-pro-preview

Args:
null

Results:
null

Tokens:
							input: 48613
							output: 314
							thoughts: 2684
						

Thoughts:
**KMSAN Fuzzing Assessment for Netdevsim PTP Hardware Timestamping Support**

Okay, let's break this down. My initial thought was: It's pretty straightforward, a union of `ktime_t hwtstamp` and `void *netdev_data`. So, a simple `= {}` zero-initializes it, and setting `hwtstamp` sets the whole thing. The `skb_hwtstamps(skb)->hwtstamp = timespec64_to_ktime(rx_ts);` call is correct. Then I started to think about what could go wrong, so I started looking at the failure conditions.

First, I considered the scenario where `ptp_info_tx` is true but `ptp_info_tx->gettime64` fails. However, even if `ptp_info_tx->gettime64` has a failure, the mock function `mock_phc_gettime64` always returns 0, and because it initializes the `tx_ts`, there is no issue here. No uninitialized memory is leaked here.

Next, I looked at other potential areas of concern, beginning with `nsim_get_ts_info`, checking `ethtool_op_get_ts_info` initialization. It initializes `info`, then `nsim_get_ts_info` modifies some of the fields. This is perfectly standard and doesn't reveal any uninitialized memory issues.

I quickly checked the `mock_phc_adjfine`, `mock_phc_adjtime`, `mock_phc_settime64`, and `mock_phc_gettime64` functions and saw the only change there was the `spin_lock` to `spin_lock_irqsave` that was implemented and this was a fix for deadlocks, not related to uninitialized memory.

Next, I reviewed `mock_phc_get_ptp_info`, which just returns `&phc->info`. This looked fine.

Then I double-checked `nsim_set_ts_config`. I realized that `config->tx_type` is *not* updated in `config`! It only updates `ns->tstamp_config.tx_type`. But then I looked at the caller `dev_set_hwtstamp`, which does a `copy_to_user` *after* the `ndo_hwtstamp_set` call, and I realized that if `config->tx_type` wasn't updated, it would just retain its original value coming from userspace. The `config->rx_filter` is updated correctly. The `config->tx_type` comes from userspace via `hwtstamp_config_to_kernel`, meaning it's fully initialized. So no uninitialized memory leaks there, either.

I even confirmed that, if `config->tx_type` was uninitialized in `dev_set_hwtstamp`, it's initialized via `copy_from_user`.

Next I checked `nsim_start_xmit`. This reads `peer_ns->tstamp_config.rx_filter` and `ns->tstamp_config.tx_type`. Both were initialized to 0, which is `HWTSTAMP_FILTER_NONE` and `HWTSTAMP_TX_OFF`, respectively, upon the allocation of `ns`. No issues there.

Looking further, I saw the call to `skb_unshare`. `skb_unshare` creates a copy if needed, then `skb_hwtstamps(skb)->hwtstamp` is set. This looks standard.

I even checked the scenario where `skb_orig` was cloned, and we call `skb_tstamp_tx(skb_orig, &shhwtstamps)` - this is all fine as `shhwtstamps` is initialized.

Reviewing the entire patch, it adds PTP hardware timestamping and uses `mock_phc`, adding the selftest `ptp.py`. The changes use standard kernel APIs.

Overall, any bugs like NULL pointer dereferences (which are checked), out-of-bounds access, or locking issues (fixed with `spin_lock_irqsave`) are likely to be caught by KASAN and LOCKDEP. There are no obvious uninitialized memory issues.

Therefore, a dedicated KMSAN fuzzing session is not necessary. The patch correctly initializes its data, and potential issues would be detected via existing kernel sanitizers. So the reasoning is that the patch introduces hardware timestamping to netdevsim, and while it adds new structures, these are initialized, and any potential issues are covered by existing kernel checks. So, **NeedsKMSAN=false**.


50/3 2026/08/15 07:07 tool set-results
0m Args:
{
  "KMSANReasoning": "The patch introduces hardware timestamping support to the netdevsim driver. It adds `nsim_get_ts_config` and `nsim_set_ts_config` to configure timestamping, which read/write to a zero-initialized `tstamp_config` structure. It modifies `nsim_start_xmit` to capture TX and RX timestamps using `mock_phc_gettime64`. The `timespec64` variables `tx_ts` and `rx_ts` are fully initialized by `mock_phc_gettime64` before being converted to `ktime_t` and stored in the skb's `hwtstamps`. The `skb_shared_hwtstamps` structure is zero-initialized before use. The `hwtstamp_config` structure copied to userspace in `dev_get_hwtstamp` is fully initialized by `hwtstamp_config_from_kernel`, and it has no padding. There are no new structures copied to userspace with uninitialized padding or fields, and no conditional logic depending on uninitialized variables. Any potential bugs introduced by this patch (e.g., NULL pointer dereferences, use-after-free, or locking issues) would be caught by standard KASAN and LOCKDEP. Therefore, a dedicated KMSAN fuzzing session is not justified.",
  "NeedsKMSAN": false
}

Results:
{
  "KMSANReasoning": "The patch introduces hardware timestamping support to the netdevsim driver. It adds `nsim_get_ts_config` and `nsim_set_ts_config` to configure timestamping, which read/write to a zero-initialized `tstamp_config` structure. It modifies `nsim_start_xmit` to capture TX and RX timestamps using `mock_phc_gettime64`. The `timespec64` variables `tx_ts` and `rx_ts` are fully initialized by `mock_phc_gettime64` before being converted to `ktime_t` and stored in the skb's `hwtstamps`. The `skb_shared_hwtstamps` structure is zero-initialized before use. The `hwtstamp_config` structure copied to userspace in `dev_get_hwtstamp` is fully initialized by `hwtstamp_config_from_kernel`, and it has no padding. There are no new structures copied to userspace with uninitialized padding or fields, and no conditional logic depending on uninitialized variables. Any potential bugs introduced by this patch (e.g., NULL pointer dereferences, use-after-free, or locking issues) would be caught by standard KASAN and LOCKDEP. Therefore, a dedicated KMSAN fuzzing session is not justified.",
  "NeedsKMSAN": 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)