| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/06 14:10 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"TUN"
],
"FocusSymbols": [
"tun_force_wake_queue",
"tun_set_iff",
"tun_queue_resize",
"tun_attach"
],
"Reasoning": "The patch introduces a new flag `IFF_BACKPRESSURE` for TUN/TAP devices, modifying the queue wake/stop logic. The changes affect the control plane (e.g., `tun_set_iff`, `tun_attach`, `tun_queue_resize`) and the data plane. Fuzzing should focus on the control plane functions and the new `tun_force_wake_queue` helper to ensure the new queue state management doesn't introduce races or deadlocks, while avoiding the hot-path data plane functions.",
"WorthFuzzing": true
} |
| 1/1 | 2026/07/06 14:10 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 39f94ed8337fcacc53a9bdec66a94b1cfd26f047\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Jul 6 14:10:35 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/Documentation/networking/tuntap.rst b/Documentation/networking/tuntap.rst\nindex 4d7087f727be5e..599264825dd216 100644\n--- a/Documentation/networking/tuntap.rst\n+++ b/Documentation/networking/tuntap.rst\n@@ -206,6 +206,23 @@ enable is true we enable it, otherwise we disable it::\n return ioctl(fd, TUNSETQUEUE, (void *)\u0026ifr);\n }\n \n+3.4 qdisc backpressure\n+----------------------\n+\n+Starting with Linux 7.2, IFF_BACKPRESSURE can be set to enable qdisc\n+backpressure. Without it, TX drops occur when the internal ring buffer is\n+full. With it, the kernel stops the TX queue instead, letting the qdisc\n+hold packets. Drops only occur as a rare race. This can benefit protocols\n+like TCP that react to drops. Backpressure requires a qdisc to be\n+attached and has no effect with noqueue.\n+\n+The TUN/TAP ring buffer size can be reduced alongside this flag to\n+further shift buffering into the qdisc and reduce bufferbloat, but comes\n+at possible performance cost.\n+\n+When running multiple network streams in parallel, the flag may reduce\n+performance due to the extra overhead of the backpressure mechanism.\n+\n Universal TUN/TAP device driver Frequently Asked Question\n =========================================================\n \ndiff --git a/drivers/net/tun.c b/drivers/net/tun.c\nindex ffbe6f13fb1fa2..62e5eab4e3454d 100644\n--- a/drivers/net/tun.c\n+++ b/drivers/net/tun.c\n@@ -98,7 +98,8 @@ static void tun_default_link_ksettings(struct net_device *dev,\n #define TUN_FASYNC\tIFF_ATTACH_QUEUE\n \n #define TUN_FEATURES (IFF_NO_PI | IFF_ONE_QUEUE | IFF_VNET_HDR | \\\n-\t\t IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS)\n+\t\t IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS | \\\n+\t\t IFF_BACKPRESSURE)\n \n #define GOODCOPY_LEN 128\n \n@@ -694,6 +695,20 @@ static void tun_detach_all(struct net_device *dev)\n \t\tmodule_put(THIS_MODULE);\n }\n \n+static void tun_force_wake_queue(struct tun_struct *tun,\n+\t\t\t\t struct tun_file *tfile)\n+{\n+\t/* Ensure that the producer can not stop the\n+\t * queue concurrently by taking locks.\n+\t */\n+\tspin_lock_bh(\u0026tfile-\u003etx_ring.consumer_lock);\n+\tspin_lock(\u0026tfile-\u003etx_ring.producer_lock);\n+\tnetif_wake_subqueue(tun-\u003edev, tfile-\u003equeue_index);\n+\ttfile-\u003econs_cnt = 0;\n+\tspin_unlock(\u0026tfile-\u003etx_ring.producer_lock);\n+\tspin_unlock_bh(\u0026tfile-\u003etx_ring.consumer_lock);\n+}\n+\n static int tun_attach(struct tun_struct *tun, struct file *file,\n \t\t bool skip_filter, bool napi, bool napi_frags,\n \t\t bool publish_tun)\n@@ -737,11 +752,9 @@ static int tun_attach(struct tun_struct *tun, struct file *file,\n \t\tgoto out;\n \t}\n \n-\tspin_lock(\u0026tfile-\u003etx_ring.consumer_lock);\n-\ttfile-\u003econs_cnt = 0;\n-\tspin_unlock(\u0026tfile-\u003etx_ring.consumer_lock);\n \ttfile-\u003equeue_index = tun-\u003enumqueues;\n \ttfile-\u003esocket.sk-\u003esk_shutdown \u0026= ~RCV_SHUTDOWN;\n+\ttun_force_wake_queue(tun, tfile);\n \n \tif (tfile-\u003edetached) {\n \t\t/* Re-attach detached tfile, updating XDP queue_index */\n@@ -1077,7 +1090,8 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)\n \n \tspin_lock(\u0026tfile-\u003etx_ring.producer_lock);\n \tret = __ptr_ring_produce(\u0026tfile-\u003etx_ring, skb);\n-\tif (!qdisc_txq_has_no_queue(queue) \u0026\u0026\n+\tif ((tun-\u003eflags \u0026 IFF_BACKPRESSURE) \u0026\u0026\n+\t !qdisc_txq_has_no_queue(queue) \u0026\u0026\n \t __ptr_ring_check_produce(\u0026tfile-\u003etx_ring) == -ENOSPC) {\n \t\tnetif_tx_stop_queue(queue);\n \t\t/* Paired with smp_mb() in __tun_wake_queue() */\n@@ -2151,8 +2165,12 @@ static ssize_t tun_put_user(struct tun_struct *tun,\n static void __tun_wake_queue(struct tun_struct *tun,\n \t\t\t struct tun_file *tfile, int consumed)\n {\n-\tstruct netdev_queue *txq = netdev_get_tx_queue(tun-\u003edev,\n-\t\t\t\t\t\ttfile-\u003equeue_index);\n+\tstruct netdev_queue *txq;\n+\n+\tif (!(tun-\u003eflags \u0026 IFF_BACKPRESSURE))\n+\t\treturn;\n+\n+\ttxq = netdev_get_tx_queue(tun-\u003edev, tfile-\u003equeue_index);\n \n \t/* Paired with smp_mb__after_atomic() in tun_net_xmit() */\n \tsmp_mb();\n@@ -2764,7 +2782,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)\n \tstruct tun_struct *tun;\n \tstruct tun_file *tfile = file-\u003eprivate_data;\n \tstruct net_device *dev;\n-\tint err;\n+\tint err, i;\n \n \tif (tfile-\u003edetached)\n \t\treturn -EINVAL;\n@@ -2894,7 +2912,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)\n \t * xoff state.\n \t */\n \tif (netif_running(tun-\u003edev))\n-\t\tnetif_tx_wake_all_queues(tun-\u003edev);\n+\t\tfor (i = 0; i \u003c tun-\u003enumqueues; i++)\n+\t\t\ttun_force_wake_queue(tun, rtnl_dereference(tun-\u003etfiles[i]));\n \n \tstrscpy(ifr-\u003eifr_name, tun-\u003edev-\u003ename);\n \treturn 0;\n@@ -3690,15 +3709,9 @@ static int tun_queue_resize(struct tun_struct *tun)\n \t\t\t\t\t dev-\u003etx_queue_len, GFP_KERNEL,\n \t\t\t\t\t tun_ptr_free);\n \n-\tif (!ret) {\n-\t\tfor (i = 0; i \u003c tun-\u003enumqueues; i++) {\n-\t\t\ttfile = rtnl_dereference(tun-\u003etfiles[i]);\n-\t\t\tspin_lock(\u0026tfile-\u003etx_ring.consumer_lock);\n-\t\t\tnetif_wake_subqueue(tun-\u003edev, tfile-\u003equeue_index);\n-\t\t\ttfile-\u003econs_cnt = 0;\n-\t\t\tspin_unlock(\u0026tfile-\u003etx_ring.consumer_lock);\n-\t\t}\n-\t}\n+\tif (!ret)\n+\t\tfor (i = 0; i \u003c tun-\u003enumqueues; i++)\n+\t\t\ttun_force_wake_queue(tun, rtnl_dereference(tun-\u003etfiles[i]));\n \n \tkfree(rings);\n \treturn ret;\ndiff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h\nindex 79d53c7a1ebdc5..73a77141315c7f 100644\n--- a/include/uapi/linux/if_tun.h\n+++ b/include/uapi/linux/if_tun.h\n@@ -69,6 +69,7 @@\n #define IFF_NAPI_FRAGS\t0x0020\n /* Used in TUNSETIFF to bring up tun/tap without carrier */\n #define IFF_NO_CARRIER\t0x0040\n+#define IFF_BACKPRESSURE\t0x0080\n #define IFF_NO_PI\t0x1000\n /* This flag has no real effect */\n #define IFF_ONE_QUEUE\t0x2000\ndiff --git a/tools/include/uapi/linux/if_tun.h b/tools/include/uapi/linux/if_tun.h\nindex 2ec07de1d73be4..97b670f5bc0a35 100644\n--- a/tools/include/uapi/linux/if_tun.h\n+++ b/tools/include/uapi/linux/if_tun.h\n@@ -67,6 +67,7 @@\n #define IFF_TAP\t\t0x0002\n #define IFF_NAPI\t0x0010\n #define IFF_NAPI_FRAGS\t0x0020\n+#define IFF_BACKPRESSURE\t0x0080\n #define IFF_NO_PI\t0x1000\n /* This flag has no real effect */\n #define IFF_ONE_QUEUE\t0x2000\n"
} |
| 2/1 | 2026/07/06 14:10 | agent | patch-evaluator |
1mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": [
"TUN"
],
"FocusSymbols": [
"tun_force_wake_queue",
"tun_set_iff",
"tun_queue_resize",
"tun_attach"
],
"Reasoning": "The patch introduces a new flag `IFF_BACKPRESSURE` for TUN/TAP devices, modifying the queue wake/stop logic. The changes affect the control plane (e.g., `tun_set_iff`, `tun_attach`, `tun_queue_resize`) and the data plane. Fuzzing should focus on the control plane functions and the new `tun_force_wake_queue` helper to ensure the new queue state management doesn't introduce races or deadlocks, while avoiding the hot-path data plane functions.",
"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). 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. 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. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. 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 39f94ed8337fcacc53a9bdec66a94b1cfd26f047
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Jul 6 14:10:35 2026 +0000
syz-cluster: applied patch under review
diff --git a/Documentation/networking/tuntap.rst b/Documentation/networking/tuntap.rst
index 4d7087f727be5e..599264825dd216 100644
--- a/Documentation/networking/tuntap.rst
+++ b/Documentation/networking/tuntap.rst
@@ -206,6 +206,23 @@ enable is true we enable it, otherwise we disable it::
return ioctl(fd, TUNSETQUEUE, (void *)&ifr);
}
+3.4 qdisc backpressure
+----------------------
+
+Starting with Linux 7.2, IFF_BACKPRESSURE can be set to enable qdisc
+backpressure. Without it, TX drops occur when the internal ring buffer is
+full. With it, the kernel stops the TX queue instead, letting the qdisc
+hold packets. Drops only occur as a rare race. This can benefit protocols
+like TCP that react to drops. Backpressure requires a qdisc to be
+attached and has no effect with noqueue.
+
+The TUN/TAP ring buffer size can be reduced alongside this flag to
+further shift buffering into the qdisc and reduce bufferbloat, but comes
+at possible performance cost.
+
+When running multiple network streams in parallel, the flag may reduce
+performance due to the extra overhead of the backpressure mechanism.
+
Universal TUN/TAP device driver Frequently Asked Question
=========================================================
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index ffbe6f13fb1fa2..62e5eab4e3454d 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -98,7 +98,8 @@ static void tun_default_link_ksettings(struct net_device *dev,
#define TUN_FASYNC IFF_ATTACH_QUEUE
#define TUN_FEATURES (IFF_NO_PI | IFF_ONE_QUEUE | IFF_VNET_HDR | \
- IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS)
+ IFF_MULTI_QUEUE | IFF_NAPI | IFF_NAPI_FRAGS | \
+ IFF_BACKPRESSURE)
#define GOODCOPY_LEN 128
@@ -694,6 +695,20 @@ static void tun_detach_all(struct net_device *dev)
module_put(THIS_MODULE);
}
+static void tun_force_wake_queue(struct tun_struct *tun,
+ struct tun_file *tfile)
+{
+ /* Ensure that the producer can not stop the
+ * queue concurrently by taking locks.
+ */
+ spin_lock_bh(&tfile->tx_ring.consumer_lock);
+ spin_lock(&tfile->tx_ring.producer_lock);
+ netif_wake_subqueue(tun->dev, tfile->queue_index);
+ tfile->cons_cnt = 0;
+ spin_unlock(&tfile->tx_ring.producer_lock);
+ spin_unlock_bh(&tfile->tx_ring.consumer_lock);
+}
+
static int tun_attach(struct tun_struct *tun, struct file *file,
bool skip_filter, bool napi, bool napi_frags,
bool publish_tun)
@@ -737,11 +752,9 @@ static int tun_attach(struct tun_struct *tun, struct file *file,
goto out;
}
- spin_lock(&tfile->tx_ring.consumer_lock);
- tfile->cons_cnt = 0;
- spin_unlock(&tfile->tx_ring.consumer_lock);
tfile->queue_index = tun->numqueues;
tfile->socket.sk->sk_shutdown &= ~RCV_SHUTDOWN;
+ tun_force_wake_queue(tun, tfile);
if (tfile->detached) {
/* Re-attach detached tfile, updating XDP queue_index */
@@ -1077,7 +1090,8 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
spin_lock(&tfile->tx_ring.producer_lock);
ret = __ptr_ring_produce(&tfile->tx_ring, skb);
- if (!qdisc_txq_has_no_queue(queue) &&
+ if ((tun->flags & IFF_BACKPRESSURE) &&
+ !qdisc_txq_has_no_queue(queue) &&
__ptr_ring_check_produce(&tfile->tx_ring) == -ENOSPC) {
netif_tx_stop_queue(queue);
/* Paired with smp_mb() in __tun_wake_queue() */
@@ -2151,8 +2165,12 @@ static ssize_t tun_put_user(struct tun_struct *tun,
static void __tun_wake_queue(struct tun_struct *tun,
struct tun_file *tfile, int consumed)
{
- struct netdev_queue *txq = netdev_get_tx_queue(tun->dev,
- tfile->queue_index);
+ struct netdev_queue *txq;
+
+ if (!(tun->flags & IFF_BACKPRESSURE))
+ return;
+
+ txq = netdev_get_tx_queue(tun->dev, tfile->queue_index);
/* Paired with smp_mb__after_atomic() in tun_net_xmit() */
smp_mb();
@@ -2764,7 +2782,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
struct tun_struct *tun;
struct tun_file *tfile = file->private_data;
struct net_device *dev;
- int err;
+ int err, i;
if (tfile->detached)
return -EINVAL;
@@ -2894,7 +2912,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
* xoff state.
*/
if (netif_running(tun->dev))
- netif_tx_wake_all_queues(tun->dev);
+ for (i = 0; i < tun->numqueues; i++)
+ tun_force_wake_queue(tun, rtnl_dereference(tun->tfiles[i]));
strscpy(ifr->ifr_name, tun->dev->name);
return 0;
@@ -3690,15 +3709,9 @@ static int tun_queue_resize(struct tun_struct *tun)
dev->tx_queue_len, GFP_KERNEL,
tun_ptr_free);
- if (!ret) {
- for (i = 0; i < tun->numqueues; i++) {
- tfile = rtnl_dereference(tun->tfiles[i]);
- spin_lock(&tfile->tx_ring.consumer_lock);
- netif_wake_subqueue(tun->dev, tfile->queue_index);
- tfile->cons_cnt = 0;
- spin_unlock(&tfile->tx_ring.consumer_lock);
- }
- }
+ if (!ret)
+ for (i = 0; i < tun->numqueues; i++)
+ tun_force_wake_queue(tun, rtnl_dereference(tun->tfiles[i]));
kfree(rings);
return ret;
diff --git a/include/uapi/linux/if_tun.h b/include/uapi/linux/if_tun.h
index 79d53c7a1ebdc5..73a77141315c7f 100644
--- a/include/uapi/linux/if_tun.h
+++ b/include/uapi/linux/if_tun.h
@@ -69,6 +69,7 @@
#define IFF_NAPI_FRAGS 0x0020
/* Used in TUNSETIFF to bring up tun/tap without carrier */
#define IFF_NO_CARRIER 0x0040
+#define IFF_BACKPRESSURE 0x0080
#define IFF_NO_PI 0x1000
/* This flag has no real effect */
#define IFF_ONE_QUEUE 0x2000
diff --git a/tools/include/uapi/linux/if_tun.h b/tools/include/uapi/linux/if_tun.h
index 2ec07de1d73be4..97b670f5bc0a35 100644
--- a/tools/include/uapi/linux/if_tun.h
+++ b/tools/include/uapi/linux/if_tun.h
@@ -67,6 +67,7 @@
#define IFF_TAP 0x0002
#define IFF_NAPI 0x0010
#define IFF_NAPI_FRAGS 0x0020
+#define IFF_BACKPRESSURE 0x0080
#define IFF_NO_PI 0x1000
/* This flag has no real effect */
#define IFF_ONE_QUEUE 0x2000
|
| 3/2 | 2026/07/06 14:10 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4026 output: 32 thoughts: 413 Thoughts: **Analyzing the TUN/TAP Driver Patch for Fuzzing Potential** Okay, so I've got a patch here that adds this `IFF_BACKPRESSURE` flag (0x0080) to the TUN/TAP driver, specifically in `drivers/net/tun.c`. This is about enabling qdisc backpressure when the internal ring buffer for the TUN/TAP device is full. Since TUN/TAP is so commonly used in virtualized environments – think syzkaller, which hammers this driver – this is definitely a `WorthFuzzing=true` situation. This seems like a functional change to a critical piece of networking, so let's dig into the details. The patch touches a number of functions: `tun_force_wake_queue`, `tun_attach`, `tun_net_xmit`, `__tun_wake_queue`, `tun_set_iff`, and `tun_queue_resize`. Time to prioritize these for focused fuzzing. Let's see… `tun_net_xmit` is *the* transmit function for the TUN/TAP device. It's probably on a hot path, but it's *also* been modified, so it's a target. `tun_set_iff` is an ioctl handler – perfect for fuzzing. I can definitely target that. `tun_queue_resize`… Hmm, where's that called? I need to check the code, maybe `tun_device_event` or something similar? I'll look into it. `tun_force_wake_queue` is a new function, definitely a prime fuzzing target. And `__tun_wake_queue`… that’s called from, like, `tun_put_user` or something similar. I need to review the call chain on that, too. I'll specifically need to check `drivers/net/tun.c` for how `tun_queue_resize` is used. This looks like a promising set of targets for some focused fuzzing. |
| 4/2 | 2026/07/06 14:11 | tool | grepper |
0mArgs:{
"Expression": "tun_queue_resize",
"PathPrefix": "drivers/net/tun.c"
}Results: {
"Output": "drivers/net/tun.c=3675=static const struct ethtool_ops tun_ethtool_ops = {\n--\ndrivers/net/tun.c-3688-\ndrivers/net/tun.c:3689:static int tun_queue_resize(struct tun_struct *tun)\ndrivers/net/tun.c-3690-{\n--\ndrivers/net/tun.c=3720=static int tun_device_event(struct notifier_block *unused,\n--\ndrivers/net/tun.c-3731-\tcase NETDEV_CHANGE_TX_QUEUE_LEN:\ndrivers/net/tun.c:3732:\t\tif (tun_queue_resize(tun))\ndrivers/net/tun.c-3733-\t\t\treturn NOTIFY_BAD;\n"
} |
| 5/2 | 2026/07/06 14:11 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5116 output: 28 thoughts: 106 Thoughts: **My Analysis of TUN Device Queue Management** Okay, so I'm tracing the flow related to TUN device queue adjustments, and here's what's clicking in my mind. The `tun_queue_resize` function is a key player here, and I've got to understand when and why it's invoked. It seems that this function is triggered when a TX queue length change event is detected, specifically, `NETDEV_CHANGE_TX_QUEUE_LEN`, which makes perfect sense. Queue length changes are handled there. Then there's `tun_set_iff`. I can see it's called during `TUNSETIFF` ioctl operations, which is logical. This call comes from the character device ioctl handler, going through `__tun_chr_ioctl`, and then `tun_set_iff`. This makes a lot of sense, changing the interface flags often will affect the underlying device setup. Finally, I'm noticing `tun_force_wake_queue`. This one's interesting, because it appears in a few places. It's invoked from `tun_attach`, `tun_set_iff`, and `tun_queue_resize`. So, I suspect that it's related to some form of queue activation or potentially a notification mechanism, waking up the TX queue. That makes sense, because it needs to be set after attachment, or whenever the underlying TX queue is modified. Now, I'll need to check the relevant configuration options for TUN to understand which of these actions are configurable and what factors can influence them. |
| 6/2 | 2026/07/06 14:11 | tool | grepper |
0mArgs:{
"Expression": "config TUN",
"PathPrefix": "drivers/net/Kconfig"
}Results: {
"Output": "drivers/net/Kconfig=386=config RIONET_RX_SIZE\n--\ndrivers/net/Kconfig-390-\ndrivers/net/Kconfig:391:config TUN\ndrivers/net/Kconfig-392-\ttristate \"Universal TUN/TAP device driver support\"\n--\ndrivers/net/Kconfig=415=config TAP\n--\ndrivers/net/Kconfig-420-\ndrivers/net/Kconfig:421:config TUN_VNET_CROSS_LE\ndrivers/net/Kconfig-422-\tbool \"Support for cross-endian vnet headers on little-endian kernels\"\n"
} |
| 7/2 | 2026/07/06 14:11 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5743 output: 33 thoughts: 121 Thoughts: **Prioritizing TUN Functionality** Okay, so the configuration I'm dealing with here is `TUN`. My primary focus needs to be on these specific functions: `tun_force_wake_queue`, `tun_set_iff`, `tun_queue_resize`, `tun_attach`, and `__tun_wake_queue`. I'll want to dig into how they're used and interact. Let me quickly make sure I'm not missing any other relevant configurations, but it looks like `TUN` is the core here. Hold on a second, based on my experience, `tun_net_xmit` is likely a hot path, so I need to be extra cautious about anything that touches that. And is `__tun_wake_queue` called on a per-packet basis? I should probably check that, because if so, it's performance critical. |
| 8/2 | 2026/07/06 14:11 | tool | grepper |
0mArgs:{
"Expression": "__tun_wake_queue",
"PathPrefix": "drivers/net/tun.c"
}Results: {
"Output": "drivers/net/tun.c=1026=static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/tun.c-1096-\t\tnetif_tx_stop_queue(queue);\ndrivers/net/tun.c:1097:\t\t/* Paired with smp_mb() in __tun_wake_queue() */\ndrivers/net/tun.c-1098-\t\tsmp_mb__after_atomic();\n--\ndrivers/net/tun.c=2080=static ssize_t tun_put_user(struct tun_struct *tun,\n--\ndrivers/net/tun.c-2164-/* Callers must hold ring.consumer_lock */\ndrivers/net/tun.c:2165:static void __tun_wake_queue(struct tun_struct *tun,\ndrivers/net/tun.c-2166-\t\t\t struct tun_file *tfile, int consumed)\n--\ndrivers/net/tun.c=2187=static void *tun_ring_consume(struct tun_struct *tun, struct tun_file *tfile)\n--\ndrivers/net/tun.c-2193-\tif (ptr)\ndrivers/net/tun.c:2194:\t\t__tun_wake_queue(tun, tfile, 1);\ndrivers/net/tun.c-2195-\n--\ndrivers/net/tun.c=3825=void tun_wake_queue(struct file *file, int consumed)\n--\ndrivers/net/tun.c-3840-\tif (tun)\ndrivers/net/tun.c:3841:\t\t__tun_wake_queue(tun, tfile, consumed);\ndrivers/net/tun.c-3842-\n"
} |
| 9/2 | 2026/07/06 14:11 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6542 output: 175 thoughts: 298 Thoughts: **My Analysis of the TUN/TAP Backpressure Patch** Okay, so I'm looking at this patch and immediately, my brain's going into performance optimization mode. The critical areas are becoming clear. `__tun_wake_queue` is a potential bottleneck because it's called from both `tun_ring_consume` (data plane, hot path!) and, ironically, `__tun_wake_queue` itself. That's a red flag. We *definitely* want to minimize calls to `__tun_wake_queue` and the subsequent `tun_net_xmit` during packet processing. Therefore, my focus shifts to the functions touched by the patch that *aren't* in the direct data path: `tun_force_wake_queue`, `tun_set_iff`, `tun_queue_resize`, and `tun_attach`. The config is clearly set to `TUN`. My thinking is, let's verify `tun_force_wake_queue` isn't a hot path. It's called from those control plane functions, so the impact is probably limited to configuration changes or device setup. So the new flag `IFF_BACKPRESSURE` has been introduced and it changes the queue wake/stop logic. That tells me these aren't areas where we're going to see a lot of data, and the focus needs to be on ensuring the control plane functions, particularly the new `tun_force_wake_queue` helper, are robust. The whole point is to make sure this new queue state management, given the context of `IFF_BACKPRESSURE`, doesn't introduce races or deadlocks. Fuzzing should be the primary focus for these areas, to confirm the backpressure management works as advertised. |
| 10/2 | 2026/07/06 14:12 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"TUN"
],
"FocusSymbols": [
"tun_force_wake_queue",
"tun_set_iff",
"tun_queue_resize",
"tun_attach"
],
"Reasoning": "The patch introduces a new flag `IFF_BACKPRESSURE` for TUN/TAP devices, modifying the queue wake/stop logic. The changes affect the control plane (e.g., `tun_set_iff`, `tun_attach`, `tun_queue_resize`) and the data plane. Fuzzing should focus on the control plane functions and the new `tun_force_wake_queue` helper to ensure the new queue state management doesn't introduce races or deadlocks, while avoiding the hot-path data plane functions.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"TUN"
],
"FocusSymbols": [
"tun_force_wake_queue",
"tun_set_iff",
"tun_queue_resize",
"tun_attach"
],
"Reasoning": "The patch introduces a new flag `IFF_BACKPRESSURE` for TUN/TAP devices, modifying the queue wake/stop logic. The changes affect the control plane (e.g., `tun_set_iff`, `tun_attach`, `tun_queue_resize`) and the data plane. Fuzzing should focus on the control plane functions and the new `tun_force_wake_queue` helper to ensure the new queue state management doesn't introduce races or deadlocks, while avoiding the hot-path data plane functions.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|