| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/02 23:38 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": [
"NET_SCHED",
"NET_SCH_CAKE",
"NET_SCH_CODEL",
"NET_SCH_DUALPI2",
"NET_SCH_FIFO",
"NET_SCH_FQ_CODEL",
"NET_SCH_FQ_PIE",
"NET_SCH_PIE",
"NET_SCH_RED"
],
"FocusSymbols": [
"cake_enqueue",
"cake_hash_keys",
"cake_hash_resolve",
"cake_tcf_classify",
"codel_qdisc_enqueue",
"dualpi2_enqueue_skb",
"fq_codel_classify",
"fq_codel_enqueue",
"fq_pie_qdisc_enqueue",
"pfifo_enqueue",
"pfifo_tail_enqueue",
"pie_qdisc_enqueue",
"red_enqueue"
],
"KMSANReasoning": "The patch series addresses 32-bit integer overflow of the qdisc backlog counter (`sch-\u003eqstats.backlog`) across various packet schedulers (cake, codel, dualpi2, fifo, fq_codel, fq_pie, pie, red) by introducing `qdisc_backlog_at_max()` and enforcing packet drop at admission ceiling. In addition, it restructures packet hashing and TC filter classification in `sch_cake` and `sch_fq_codel` so that hashing occurs on the unsegmented packet and no qdisc state is mutated before packet admission is confirmed.\n\nRegarding memory sanitization:\n1. KMSAN applicability: There are no kernel-to-userspace info-leaks, padding leaks, or uninitialized memory reads introduced. All new local variables and structures (`struct cake_hash_keys keys`, `flow_override`, `host_override`, `do_hash`, `idx`) are explicitly initialized to zero or well-defined values immediately upon function entry and prior to being read or passed along. No data is copied to userspace via netlink, socket options, or ioctl.\n2. KASAN applicability: Any memory safety risks in this patch revolve around skb lifetime management and list traversal (e.g., GSO segmentation error paths, `consume_skb(skb)` vs `qdisc_drop_all(segs, ...)` handling fraglist GSO in `sch_cake`). These potential bugs (such as double-free, use-after-free, or skb leaks) are directly covered by KASAN and standard kernel debug facilities.\n\nTherefore, dedicated KMSAN fuzzing is not justified for these changes.",
"NeedsKMSAN": false,
"Reasoning": "The patch adds backlog overflow protection (qdisc_backlog_at_max) to multiple packet schedulers (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED) to prevent 32-bit backlog counter wrap-around. Furthermore, it substantially restructures CAKE's enqueue path—including packet classification, flow/host key hashing, and GSO segmentation and drop error handling—and refactors FQ-CoDel classifier integration. These networking qdiscs are directly reachable via standard TC netlink interfaces and packet transmission in virtual environments, making fuzzing critical to catch edge cases, skb lifetime issues, or regressions.",
"WorthFuzzing": true
} |
| 1/1 | 2026/10/02 23:38 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 24f246354077d8d58dbe95e7b5b0fd87fa36ba74\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Oct 2 23:38:33 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h\nindex 90d3e7943b19a..18a419cd9d949 100644\n--- a/include/net/pkt_sched.h\n+++ b/include/net/pkt_sched.h\n@@ -12,7 +12,6 @@\n \n #define DEFAULT_TX_QUEUE_LEN\t1000\n #define STAB_SIZE_LOG_MAX\t30\n-#define QDISC_PKT_LEN_MAX\t(1 \u003c\u003c 20)\t/* 1 MiB */\n \n struct qdisc_walker {\n \tint\tstop;\ndiff --git a/include/net/sch_generic.h b/include/net/sch_generic.h\nindex f35bd06a6bad6..b396a1606d626 100644\n--- a/include/net/sch_generic.h\n+++ b/include/net/sch_generic.h\n@@ -906,6 +906,21 @@ static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)\n \treturn qdisc_skb_cb(skb)-\u003epkt_len;\n }\n \n+#define QDISC_PKT_LEN_MAX\t(1 \u003c\u003c 20)\t/* 1 MiB */\n+\n+/* Largest accounted backlog one more maximum-size packet cannot wrap\n+ * the 32-bit sch-\u003eqstats.backlog past.\n+ */\n+#define QDISC_MAX_BACKLOG\t(U32_MAX - QDISC_PKT_LEN_MAX)\n+\n+/* Backlog close enough to U32_MAX that one more packet could wrap it.\n+ * A packet-limited qdisc must drop at enqueue when this holds.\n+ */\n+static inline bool qdisc_backlog_at_max(const struct Qdisc *sch)\n+{\n+\treturn sch-\u003eqstats.backlog \u003e QDISC_MAX_BACKLOG;\n+}\n+\n static inline unsigned int qdisc_pkt_segs(const struct sk_buff *skb)\n {\n \tu32 pkt_segs = qdisc_skb_cb(skb)-\u003epkt_segs;\ndiff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c\nindex dc93267029e70..d9779e8a5e1b7 100644\n--- a/net/sched/sch_cake.c\n+++ b/net/sched/sch_cake.c\n@@ -706,19 +706,33 @@ static u16 cake_get_flow_quantum(struct cake_tin_data *q,\n \t\tget_random_u16()) \u003e\u003e 16;\n }\n \n-static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,\n-\t\t int flow_mode, u16 flow_override, u16 host_override)\n+struct cake_hash_keys {\n+\tu32 srchost_hash;\n+\tu32 dsthost_hash;\n+\tu32 flow_hash;\n+};\n+\n+/* Compute the flow/host hash keys from the packet as received. Must run\n+ * before skb_gso_segment(), which rewrites an encapsulated GSO packet's\n+ * headers to the inner ones and would change the keys. Reads only the skb\n+ * and commits no qdisc state, so it may run before admission is known.\n+ */\n+static void cake_hash_keys(const struct sk_buff *skb, int flow_mode,\n+\t\t\t u16 flow_override, u16 host_override,\n+\t\t\t struct cake_hash_keys *out)\n {\n \tbool hash_flows = (!flow_override \u0026\u0026 !!(flow_mode \u0026 CAKE_FLOW_FLOWS));\n \tbool hash_hosts = (!host_override \u0026\u0026 !!(flow_mode \u0026 CAKE_FLOW_HOSTS));\n \tbool nat_enabled = !!(flow_mode \u0026 CAKE_FLOW_NAT_FLAG);\n-\tu32 flow_hash = 0, srchost_hash = 0, dsthost_hash = 0;\n-\tu16 reduced_hash, srchost_idx, dsthost_idx;\n \tstruct flow_keys keys, host_keys;\n \tbool use_skbhash = skb-\u003el4_hash;\n \n+\tout-\u003eflow_hash = 0;\n+\tout-\u003esrchost_hash = 0;\n+\tout-\u003edsthost_hash = 0;\n+\n \tif (unlikely(flow_mode == CAKE_FLOW_NONE))\n-\t\treturn 0;\n+\t\treturn;\n \n \t/* If both overrides are set, or we can use the SKB hash and nat mode is\n \t * disabled, we can skip packet dissection entirely. If nat mode is\n@@ -753,50 +767,62 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,\n \tswitch (host_keys.control.addr_type) {\n \tcase FLOW_DISSECTOR_KEY_IPV4_ADDRS:\n \t\thost_keys.addrs.v4addrs.src = 0;\n-\t\tdsthost_hash = flow_hash_from_keys(\u0026host_keys);\n+\t\tout-\u003edsthost_hash = flow_hash_from_keys(\u0026host_keys);\n \t\thost_keys.addrs.v4addrs.src = keys.addrs.v4addrs.src;\n \t\thost_keys.addrs.v4addrs.dst = 0;\n-\t\tsrchost_hash = flow_hash_from_keys(\u0026host_keys);\n+\t\tout-\u003esrchost_hash = flow_hash_from_keys(\u0026host_keys);\n \t\tbreak;\n \n \tcase FLOW_DISSECTOR_KEY_IPV6_ADDRS:\n \t\tmemset(\u0026host_keys.addrs.v6addrs.src, 0,\n \t\t sizeof(host_keys.addrs.v6addrs.src));\n-\t\tdsthost_hash = flow_hash_from_keys(\u0026host_keys);\n+\t\tout-\u003edsthost_hash = flow_hash_from_keys(\u0026host_keys);\n \t\thost_keys.addrs.v6addrs.src = keys.addrs.v6addrs.src;\n \t\tmemset(\u0026host_keys.addrs.v6addrs.dst, 0,\n \t\t sizeof(host_keys.addrs.v6addrs.dst));\n-\t\tsrchost_hash = flow_hash_from_keys(\u0026host_keys);\n+\t\tout-\u003esrchost_hash = flow_hash_from_keys(\u0026host_keys);\n \t\tbreak;\n \n \tdefault:\n-\t\tdsthost_hash = 0;\n-\t\tsrchost_hash = 0;\n+\t\tout-\u003edsthost_hash = 0;\n+\t\tout-\u003esrchost_hash = 0;\n \t}\n \n \t/* This *must* be after the above switch, since as a\n \t * side-effect it sorts the src and dst addresses.\n \t */\n \tif (hash_flows \u0026\u0026 !use_skbhash)\n-\t\tflow_hash = flow_hash_from_keys(\u0026keys);\n+\t\tout-\u003eflow_hash = flow_hash_from_keys(\u0026keys);\n \n skip_hash:\n \tif (flow_override)\n-\t\tflow_hash = flow_override - 1;\n+\t\tout-\u003eflow_hash = flow_override - 1;\n \telse if (use_skbhash \u0026\u0026 (flow_mode \u0026 CAKE_FLOW_FLOWS))\n-\t\tflow_hash = skb-\u003ehash;\n+\t\tout-\u003eflow_hash = skb-\u003ehash;\n \tif (host_override) {\n-\t\tdsthost_hash = host_override - 1;\n-\t\tsrchost_hash = host_override - 1;\n+\t\tout-\u003edsthost_hash = host_override - 1;\n+\t\tout-\u003esrchost_hash = host_override - 1;\n \t}\n \n \tif (!(flow_mode \u0026 CAKE_FLOW_FLOWS)) {\n \t\tif (flow_mode \u0026 CAKE_FLOW_SRC_IP)\n-\t\t\tflow_hash ^= srchost_hash;\n+\t\t\tout-\u003eflow_hash ^= out-\u003esrchost_hash;\n \n \t\tif (flow_mode \u0026 CAKE_FLOW_DST_IP)\n-\t\t\tflow_hash ^= dsthost_hash;\n+\t\t\tout-\u003eflow_hash ^= out-\u003edsthost_hash;\n \t}\n+}\n+\n+/* Resolve the keys from cake_hash_keys() into the set-associative flow\n+ * table. Mutates q-\u003etags[], the flow host indices, the way counters and\n+ * the host bulk-flow counts, so run only after admission.\n+ */\n+static u32 cake_hash_resolve(struct cake_tin_data *q,\n+\t\t\t const struct cake_hash_keys *keys, int flow_mode)\n+{\n+\tu32 flow_hash = keys-\u003eflow_hash, srchost_hash = keys-\u003esrchost_hash,\n+\t dsthost_hash = keys-\u003edsthost_hash;\n+\tu16 reduced_hash, srchost_idx, dsthost_idx;\n \n \treduced_hash = flow_hash % CAKE_QUEUES;\n \n@@ -1712,18 +1738,24 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch,\n \treturn \u0026qd-\u003etins[tin];\n }\n \n-static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,\n-\t\t\t struct sk_buff *skb, int flow_mode, int *qerr)\n+/* Run the optional external classifier. Returns true when the packet was\n+ * consumed by a terminal TC action (reason in *qerr); else *flow/*host\n+ * hold the filter's overrides (0 if none).\n+ */\n+static bool cake_tcf_classify(struct Qdisc *sch, struct sk_buff *skb,\n+\t\t\t u16 *flow, u16 *host, int *qerr)\n {\n \tstruct cake_sched_data *q = qdisc_priv(sch);\n \tstruct tcf_proto *filter;\n \tstruct tcf_result res;\n-\tu16 flow = 0, host = 0;\n \tint result;\n \n+\t*flow = 0;\n+\t*host = 0;\n+\n \tfilter = rcu_dereference_bh(q-\u003efilter_list);\n \tif (!filter)\n-\t\tgoto hash;\n+\t\treturn false;\n \n \t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;\n \tresult = tcf_classify_qdisc(skb, filter, \u0026res, false);\n@@ -1737,17 +1769,15 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,\n \t\t\t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;\n \t\t\tfallthrough;\n \t\tcase TC_ACT_SHOT:\n-\t\t\treturn 0;\n+\t\t\treturn true;\n \t\t}\n #endif\n \t\tif (TC_H_MIN(res.classid) \u003c= CAKE_QUEUES)\n-\t\t\tflow = TC_H_MIN(res.classid);\n+\t\t\t*flow = TC_H_MIN(res.classid);\n \t\tif (TC_H_MAJ(res.classid) \u003c= (CAKE_QUEUES \u003c\u003c 16))\n-\t\t\thost = TC_H_MAJ(res.classid) \u003e\u003e 16;\n+\t\t\t*host = TC_H_MAJ(res.classid) \u003e\u003e 16;\n \t}\n-hash:\n-\t*t = cake_select_tin(sch, skb);\n-\treturn cake_hash(*t, skb, flow_mode, flow, host) + 1;\n+\treturn false;\n }\n \n static void cake_reconfigure(struct Qdisc *sch);\n@@ -1758,22 +1788,86 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tu32 idx, tin, prev_qlen, prev_backlog, drop_id;\n \tstruct cake_sched_data *q = qdisc_priv(sch);\n \tint len = qdisc_pkt_len(skb), ret;\n+\tu16 flow_override, host_override;\n+\tstruct sk_buff *segs = NULL;\n+\tstruct cake_hash_keys keys;\n \tstruct sk_buff *ack = NULL;\n \tktime_t now = ktime_get();\n \tstruct cake_tin_data *b;\n \tstruct cake_flow *flow;\n \tbool same_flow = false;\n+\tu64 slen = 0;\n \n-\t/* choose flow to insert into */\n-\tidx = cake_classify(sch, \u0026b, skb, q-\u003econfig-\u003eflow_mode, \u0026ret);\n-\tif (idx == 0) {\n+\t/* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)\n+\t * keep working at the ceiling; carry the overrides to\n+\t * cake_hash_keys().\n+\t */\n+\tif (cake_tcf_classify(sch, skb, \u0026flow_override, \u0026host_override, \u0026ret)) {\n \t\tif (ret \u0026 __NET_XMIT_BYPASS)\n \t\t\tqdisc_qstats_drop(sch);\n \t\t__qdisc_drop(skb, to_free);\n \t\treturn ret;\n \t}\n+\n+\t/* Drop before hash/shaper state so a rejected packet disturbs\n+\t * neither; the QDISC_PKT_LEN_MAX headroom covers one unsplit packet.\n+\t */\n+\tif (unlikely(qdisc_backlog_at_max(sch))) {\n+\t\tqdisc_qstats_overlimit(sch);\n+\t\treturn qdisc_drop_reason(skb, sch, to_free,\n+\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n+\t}\n+\n+\t/* Tin selection and key extraction must run on the unsegmented skb:\n+\t * skb_gso_segment() rewrites an encapsulated GSO packet's headers to\n+\t * the inner ones, changing the keys. Neither commits state.\n+\t */\n+\tb = cake_select_tin(sch, skb);\n+\tcake_hash_keys(skb, q-\u003econfig-\u003eflow_mode, flow_override,\n+\t\t host_override, \u0026keys);\n+\n+\tif (qdisc_pkt_segs(skb) \u003e 1 \u0026\u0026 q-\u003econfig-\u003erate_flags \u0026 CAKE_FLAG_SPLIT_GSO) {\n+\t\tstruct sk_buff *nskb, *seg;\n+\t\tnetdev_features_t features = netif_skb_features(skb);\n+\n+\t\tsegs = skb_gso_segment(skb, features \u0026 ~NETIF_F_GSO_MASK);\n+\t\tif (IS_ERR_OR_NULL(segs))\n+\t\t\treturn qdisc_drop(skb, sch, to_free);\n+\n+\t\t/* The split path accounts the segment sum, not the\n+\t\t * stab-adjusted qdisc_pkt_len(), so the top check does not\n+\t\t * bound it. Sum the list and reject it whole.\n+\t\t */\n+\t\tskb_list_walk_safe(segs, seg, nskb)\n+\t\t\tslen += seg-\u003elen;\n+\n+\t\tif (unlikely((u64)sch-\u003eqstats.backlog + slen \u003e QDISC_MAX_BACKLOG)) {\n+\t\t\tqdisc_qstats_overlimit(sch);\n+\t\t\t/* skb_gso_segment() moved the sock_wfree destructor\n+\t\t\t * to the tail segment; defer the whole list to\n+\t\t\t * to_free, never free it under the qdisc lock.\n+\t\t\t *\n+\t\t\t * Fraglist GSO is the exception: skb_segment_list()\n+\t\t\t * returns the original skb as the head with an extra\n+\t\t\t * ref (segs == skb), so drop the caller's ref and\n+\t\t\t * queue the list once, or the two drops self-link it.\n+\t\t\t */\n+\t\t\tif (unlikely(segs == skb)) {\n+\t\t\t\ttcf_set_qdisc_drop_reason(skb,\n+\t\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n+\t\t\t\tconsume_skb(skb);\n+\t\t\t\treturn qdisc_drop_all(segs, sch, to_free);\n+\t\t\t}\n+\t\t\t__qdisc_drop_all(segs, to_free);\n+\t\t\treturn qdisc_drop_reason(skb, sch, to_free,\n+\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n+\t\t}\n+\t}\n+\n+\t/* Admitted: resolve the keys and commit flow/shaper state. */\n+\n+\tidx = cake_hash_resolve(b, \u0026keys, q-\u003econfig-\u003eflow_mode);\n \ttin = (u32)(b - q-\u003etins);\n-\tidx--;\n \tflow = \u0026b-\u003eflows[idx];\n \n \t/* ensure shaper state isn't stale */\n@@ -1800,28 +1894,22 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tif (unlikely(len \u003e b-\u003emax_skblen))\n \t\tWRITE_ONCE(b-\u003emax_skblen, len);\n \n-\tif (qdisc_pkt_segs(skb) \u003e 1 \u0026\u0026 q-\u003econfig-\u003erate_flags \u0026 CAKE_FLAG_SPLIT_GSO) {\n-\t\tstruct sk_buff *segs, *nskb;\n-\t\tnetdev_features_t features = netif_skb_features(skb);\n-\t\tunsigned int slen = 0, numsegs = 0;\n-\n-\t\tsegs = skb_gso_segment(skb, features \u0026 ~NETIF_F_GSO_MASK);\n-\t\tif (IS_ERR_OR_NULL(segs))\n-\t\t\treturn qdisc_drop(skb, sch, to_free);\n+\tif (segs) {\n+\t\tstruct sk_buff *nskb, *seg;\n+\t\tunsigned int numsegs = 0;\n \n-\t\tskb_list_walk_safe(segs, segs, nskb) {\n-\t\t\tskb_mark_not_on_list(segs);\n-\t\t\tqdisc_skb_cb(segs)-\u003epkt_len = segs-\u003elen;\n-\t\t\tqdisc_skb_cb(segs)-\u003epkt_segs = 1;\n-\t\t\tcobalt_set_enqueue_time(segs, now);\n-\t\t\tget_cobalt_cb(segs)-\u003eadjusted_len = cake_overhead(q,\n-\t\t\t\t\t\t\t\t\t segs);\n-\t\t\tflow_queue_add(flow, segs);\n+\t\tskb_list_walk_safe(segs, seg, nskb) {\n+\t\t\tskb_mark_not_on_list(seg);\n+\t\t\tqdisc_skb_cb(seg)-\u003epkt_len = seg-\u003elen;\n+\t\t\tqdisc_skb_cb(seg)-\u003epkt_segs = 1;\n+\t\t\tcobalt_set_enqueue_time(seg, now);\n+\t\t\tget_cobalt_cb(seg)-\u003eadjusted_len = cake_overhead(q,\n+\t\t\t\t\t\t\t\t\t seg);\n+\t\t\tflow_queue_add(flow, seg);\n \n \t\t\tqdisc_qlen_inc(sch);\n \t\t\tnumsegs++;\n-\t\t\tslen += segs-\u003elen;\n-\t\t\tq-\u003ebuffer_used += segs-\u003etruesize;\n+\t\t\tq-\u003ebuffer_used += seg-\u003etruesize;\n \t\t\tWRITE_ONCE(b-\u003epackets, b-\u003epackets + 1);\n \t\t}\n \ndiff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c\nindex 6aa5829d69612..9aa18438413ab 100644\n--- a/net/sched/sch_codel.c\n+++ b/net/sched/sch_codel.c\n@@ -116,15 +116,17 @@ static struct sk_buff *codel_peek(struct Qdisc *sch)\n static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \t\t\t struct sk_buff **to_free)\n {\n-\tstruct codel_sched_data *q;\n+\tstruct codel_sched_data *q = qdisc_priv(sch);\n \n-\tif (likely(qdisc_qlen(sch) \u003c sch-\u003elimit)) {\n-\t\tcodel_set_enqueue_time(skb);\n-\t\treturn qdisc_enqueue_tail(skb, sch);\n+\tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit) ||\n+\t unlikely(qdisc_backlog_at_max(sch))) {\n+\t\tWRITE_ONCE(q-\u003edrop_overlimit, q-\u003edrop_overlimit + 1);\n+\t\treturn qdisc_drop_reason(skb, sch, to_free,\n+\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n \t}\n-\tq = qdisc_priv(sch);\n-\tWRITE_ONCE(q-\u003edrop_overlimit, q-\u003edrop_overlimit + 1);\n-\treturn qdisc_drop_reason(skb, sch, to_free, QDISC_DROP_OVERLIMIT);\n+\n+\tcodel_set_enqueue_time(skb);\n+\treturn qdisc_enqueue_tail(skb, sch);\n }\n \n static const struct nla_policy codel_policy[TCA_CODEL_MAX + 1] = {\ndiff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c\nindex 4947def7c49ef..5c746e9b60cd7 100644\n--- a/net/sched/sch_dualpi2.c\n+++ b/net/sched/sch_dualpi2.c\n@@ -392,6 +392,7 @@ static int dualpi2_enqueue_skb(struct sk_buff *skb, struct Qdisc *sch,\n \tstruct dualpi2_skb_cb *cb;\n \n \tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit) ||\n+\t unlikely(qdisc_backlog_at_max(sch)) ||\n \t unlikely((u64)q-\u003ememory_used + skb-\u003etruesize \u003e q-\u003ememory_limit)) {\n \t\tqdisc_qstats_overlimit(sch);\n \t\tif (skb_in_l_queue(skb))\ndiff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c\nindex 1b6388d50967f..d5e5cd49377d8 100644\n--- a/net/sched/sch_fifo.c\n+++ b/net/sched/sch_fifo.c\n@@ -29,6 +29,9 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \t\t\t struct sk_buff **to_free)\n {\n+\tif (unlikely(qdisc_backlog_at_max(sch)))\n+\t\treturn qdisc_drop(skb, sch, to_free);\n+\n \tif (likely(sch-\u003eq.qlen \u003c READ_ONCE(sch-\u003elimit)))\n \t\treturn qdisc_enqueue_tail(skb, sch);\n \n@@ -43,6 +46,9 @@ static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tif (unlikely(READ_ONCE(sch-\u003elimit) == 0))\n \t\treturn qdisc_drop(skb, sch, to_free);\n \n+\tif (unlikely(qdisc_backlog_at_max(sch)))\n+\t\treturn qdisc_drop(skb, sch, to_free);\n+\n \tif (likely(sch-\u003eq.qlen \u003c READ_ONCE(sch-\u003elimit)))\n \t\treturn qdisc_enqueue_tail(skb, sch);\n \ndiff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c\nindex 969b2510b0b86..b07732c0d8cce 100644\n--- a/net/sched/sch_fq_codel.c\n+++ b/net/sched/sch_fq_codel.c\n@@ -73,22 +73,34 @@ static unsigned int fq_codel_hash(const struct fq_codel_sched_data *q,\n \treturn reciprocal_scale(skb_get_hash(skb), q-\u003eflows_cnt);\n }\n \n-static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,\n-\t\t\t\t int *qerr)\n+/* Run the optional external classifier. Returns true when the caller must\n+ * drop (a terminal TC action consumed the packet, or the result carried no\n+ * class ID); the reason is then in *qerr. Else *idx is the 1-based flow\n+ * index, or *do_hash asks the caller to use fq_codel_hash().\n+ */\n+static bool fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,\n+\t\t\t unsigned int *idx, bool *do_hash, int *qerr)\n {\n \tstruct fq_codel_sched_data *q = qdisc_priv(sch);\n \tstruct tcf_proto *filter;\n \tstruct tcf_result res;\n \tint result;\n \n+\t*idx = 0;\n+\t*do_hash = false;\n+\n \tif (TC_H_MAJ(skb-\u003epriority) == sch-\u003ehandle \u0026\u0026\n \t TC_H_MIN(skb-\u003epriority) \u003e 0 \u0026\u0026\n-\t TC_H_MIN(skb-\u003epriority) \u003c= q-\u003eflows_cnt)\n-\t\treturn TC_H_MIN(skb-\u003epriority);\n+\t TC_H_MIN(skb-\u003epriority) \u003c= q-\u003eflows_cnt) {\n+\t\t*idx = TC_H_MIN(skb-\u003epriority);\n+\t\treturn false;\n+\t}\n \n \tfilter = rcu_dereference_bh(q-\u003efilter_list);\n-\tif (!filter)\n-\t\treturn fq_codel_hash(q, skb) + 1;\n+\tif (!filter) {\n+\t\t*do_hash = true;\n+\t\treturn false;\n+\t}\n \n \t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;\n \tresult = tcf_classify_qdisc(skb, filter, \u0026res, false);\n@@ -101,13 +113,16 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,\n \t\t\t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;\n \t\t\tfallthrough;\n \t\tcase TC_ACT_SHOT:\n-\t\t\treturn 0;\n+\t\t\treturn true;\n \t\t}\n #endif\n-\t\tif (TC_H_MIN(res.classid) \u003c= q-\u003eflows_cnt)\n-\t\t\treturn TC_H_MIN(res.classid);\n+\t\tif (TC_H_MIN(res.classid) \u003e 0 \u0026\u0026\n+\t\t TC_H_MIN(res.classid) \u003c= q-\u003eflows_cnt) {\n+\t\t\t*idx = TC_H_MIN(res.classid);\n+\t\t\treturn false;\n+\t\t}\n \t}\n-\treturn 0;\n+\treturn true;\n }\n \n /* helper functions : might be changed when/if skb use a standard list_head */\n@@ -187,18 +202,33 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n {\n \tstruct fq_codel_sched_data *q = qdisc_priv(sch);\n \tunsigned int idx, prev_backlog, prev_qlen;\n+\tbool do_hash = false;\n \tstruct fq_codel_flow *flow;\n \tint ret;\n \tunsigned int pkt_len;\n \tbool memory_limited;\n \n-\tidx = fq_codel_classify(skb, sch, \u0026ret);\n-\tif (idx == 0) {\n+\t/* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)\n+\t * keep working at the ceiling; only hashing is deferred below.\n+\t */\n+\tif (fq_codel_classify(skb, sch, \u0026idx, \u0026do_hash, \u0026ret)) {\n \t\tif (ret \u0026 __NET_XMIT_BYPASS)\n \t\t\tqdisc_qstats_drop(sch);\n \t\t__qdisc_drop(skb, to_free);\n \t\treturn ret;\n \t}\n+\n+\t/* Drop before hashing so a rejected packet disturbs no flow hash;\n+\t * the QDISC_PKT_LEN_MAX headroom covers one packet.\n+\t */\n+\tif (unlikely(qdisc_backlog_at_max(sch))) {\n+\t\tq-\u003edrop_overlimit++;\n+\t\treturn qdisc_drop_reason(skb, sch, to_free,\n+\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n+\t}\n+\n+\tif (do_hash)\n+\t\tidx = fq_codel_hash(q, skb) + 1;\n \tidx--;\n \n \tcodel_set_enqueue_time(skb);\ndiff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c\nindex 5982847df8f85..394f015cec36d 100644\n--- a/net/sched/sch_fq_pie.c\n+++ b/net/sched/sch_fq_pie.c\n@@ -155,7 +155,8 @@ static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tmemory_limited = q-\u003ememory_usage \u003e q-\u003ememory_limit + skb-\u003etruesize;\n \n \t/* Checks if the qdisc is full */\n-\tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit)) {\n+\tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit) ||\n+\t unlikely(qdisc_backlog_at_max(sch))) {\n \t\tq-\u003estats.overlimit++;\n \t\tgoto out;\n \t} else if (unlikely(memory_limited)) {\ndiff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c\nindex 3b7863ffd284c..9e38f38ce923b 100644\n--- a/net/sched/sch_pie.c\n+++ b/net/sched/sch_pie.c\n@@ -89,7 +89,8 @@ static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tstruct pie_sched_data *q = qdisc_priv(sch);\n \tbool enqueue = false;\n \n-\tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit)) {\n+\tif (unlikely(qdisc_qlen(sch) \u003e= sch-\u003elimit) ||\n+\t unlikely(qdisc_backlog_at_max(sch))) {\n \t\tWRITE_ONCE(q-\u003estats.overlimit, q-\u003estats.overlimit + 1);\n \t\tgoto out;\n \t}\ndiff --git a/net/sched/sch_red.c b/net/sched/sch_red.c\nindex d7598214270b8..e3a254f9dbdf9 100644\n--- a/net/sched/sch_red.c\n+++ b/net/sched/sch_red.c\n@@ -76,6 +76,12 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n \tunsigned int len;\n \tint ret;\n \n+\tif (unlikely(qdisc_backlog_at_max(sch))) {\n+\t\tqdisc_qstats_overlimit(sch);\n+\t\treturn qdisc_drop_reason(skb, sch, to_free,\n+\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n+\t}\n+\n \tq-\u003evars.qavg = red_calc_qavg(\u0026q-\u003eparms,\n \t\t\t\t \u0026q-\u003evars,\n \t\t\t\t child-\u003eqstats.backlog);\n"
} |
| 2/1 | 2026/10/02 23:38 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"NET_SCHED",
"NET_SCH_CAKE",
"NET_SCH_CODEL",
"NET_SCH_DUALPI2",
"NET_SCH_FIFO",
"NET_SCH_FQ_CODEL",
"NET_SCH_FQ_PIE",
"NET_SCH_PIE",
"NET_SCH_RED"
],
"FocusSymbols": [
"cake_enqueue",
"cake_hash_keys",
"cake_hash_resolve",
"cake_tcf_classify",
"codel_qdisc_enqueue",
"dualpi2_enqueue_skb",
"fq_codel_classify",
"fq_codel_enqueue",
"fq_pie_qdisc_enqueue",
"pfifo_enqueue",
"pfifo_tail_enqueue",
"pie_qdisc_enqueue",
"red_enqueue"
],
"Reasoning": "The patch adds backlog overflow protection (qdisc_backlog_at_max) to multiple packet schedulers (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED) to prevent 32-bit backlog counter wrap-around. Furthermore, it substantially restructures CAKE's enqueue path—including packet classification, flow/host key hashing, and GSO segmentation and drop error handling—and refactors FQ-CoDel classifier integration. These networking qdiscs are directly reachable via standard TC netlink interfaces and packet transmission in virtual environments, making fuzzing critical to catch edge cases, skb lifetime issues, or regressions.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any '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: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 24f246354077d8d58dbe95e7b5b0fd87fa36ba74
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Oct 2 23:38:33 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 90d3e7943b19a..18a419cd9d949 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -12,7 +12,6 @@
#define DEFAULT_TX_QUEUE_LEN 1000
#define STAB_SIZE_LOG_MAX 30
-#define QDISC_PKT_LEN_MAX (1 << 20) /* 1 MiB */
struct qdisc_walker {
int stop;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index f35bd06a6bad6..b396a1606d626 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -906,6 +906,21 @@ static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)
return qdisc_skb_cb(skb)->pkt_len;
}
+#define QDISC_PKT_LEN_MAX (1 << 20) /* 1 MiB */
+
+/* Largest accounted backlog one more maximum-size packet cannot wrap
+ * the 32-bit sch->qstats.backlog past.
+ */
+#define QDISC_MAX_BACKLOG (U32_MAX - QDISC_PKT_LEN_MAX)
+
+/* Backlog close enough to U32_MAX that one more packet could wrap it.
+ * A packet-limited qdisc must drop at enqueue when this holds.
+ */
+static inline bool qdisc_backlog_at_max(const struct Qdisc *sch)
+{
+ return sch->qstats.backlog > QDISC_MAX_BACKLOG;
+}
+
static inline unsigned int qdisc_pkt_segs(const struct sk_buff *skb)
{
u32 pkt_segs = qdisc_skb_cb(skb)->pkt_segs;
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index dc93267029e70..d9779e8a5e1b7 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -706,19 +706,33 @@ static u16 cake_get_flow_quantum(struct cake_tin_data *q,
get_random_u16()) >> 16;
}
-static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
- int flow_mode, u16 flow_override, u16 host_override)
+struct cake_hash_keys {
+ u32 srchost_hash;
+ u32 dsthost_hash;
+ u32 flow_hash;
+};
+
+/* Compute the flow/host hash keys from the packet as received. Must run
+ * before skb_gso_segment(), which rewrites an encapsulated GSO packet's
+ * headers to the inner ones and would change the keys. Reads only the skb
+ * and commits no qdisc state, so it may run before admission is known.
+ */
+static void cake_hash_keys(const struct sk_buff *skb, int flow_mode,
+ u16 flow_override, u16 host_override,
+ struct cake_hash_keys *out)
{
bool hash_flows = (!flow_override && !!(flow_mode & CAKE_FLOW_FLOWS));
bool hash_hosts = (!host_override && !!(flow_mode & CAKE_FLOW_HOSTS));
bool nat_enabled = !!(flow_mode & CAKE_FLOW_NAT_FLAG);
- u32 flow_hash = 0, srchost_hash = 0, dsthost_hash = 0;
- u16 reduced_hash, srchost_idx, dsthost_idx;
struct flow_keys keys, host_keys;
bool use_skbhash = skb->l4_hash;
+ out->flow_hash = 0;
+ out->srchost_hash = 0;
+ out->dsthost_hash = 0;
+
if (unlikely(flow_mode == CAKE_FLOW_NONE))
- return 0;
+ return;
/* If both overrides are set, or we can use the SKB hash and nat mode is
* disabled, we can skip packet dissection entirely. If nat mode is
@@ -753,50 +767,62 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
switch (host_keys.control.addr_type) {
case FLOW_DISSECTOR_KEY_IPV4_ADDRS:
host_keys.addrs.v4addrs.src = 0;
- dsthost_hash = flow_hash_from_keys(&host_keys);
+ out->dsthost_hash = flow_hash_from_keys(&host_keys);
host_keys.addrs.v4addrs.src = keys.addrs.v4addrs.src;
host_keys.addrs.v4addrs.dst = 0;
- srchost_hash = flow_hash_from_keys(&host_keys);
+ out->srchost_hash = flow_hash_from_keys(&host_keys);
break;
case FLOW_DISSECTOR_KEY_IPV6_ADDRS:
memset(&host_keys.addrs.v6addrs.src, 0,
sizeof(host_keys.addrs.v6addrs.src));
- dsthost_hash = flow_hash_from_keys(&host_keys);
+ out->dsthost_hash = flow_hash_from_keys(&host_keys);
host_keys.addrs.v6addrs.src = keys.addrs.v6addrs.src;
memset(&host_keys.addrs.v6addrs.dst, 0,
sizeof(host_keys.addrs.v6addrs.dst));
- srchost_hash = flow_hash_from_keys(&host_keys);
+ out->srchost_hash = flow_hash_from_keys(&host_keys);
break;
default:
- dsthost_hash = 0;
- srchost_hash = 0;
+ out->dsthost_hash = 0;
+ out->srchost_hash = 0;
}
/* This *must* be after the above switch, since as a
* side-effect it sorts the src and dst addresses.
*/
if (hash_flows && !use_skbhash)
- flow_hash = flow_hash_from_keys(&keys);
+ out->flow_hash = flow_hash_from_keys(&keys);
skip_hash:
if (flow_override)
- flow_hash = flow_override - 1;
+ out->flow_hash = flow_override - 1;
else if (use_skbhash && (flow_mode & CAKE_FLOW_FLOWS))
- flow_hash = skb->hash;
+ out->flow_hash = skb->hash;
if (host_override) {
- dsthost_hash = host_override - 1;
- srchost_hash = host_override - 1;
+ out->dsthost_hash = host_override - 1;
+ out->srchost_hash = host_override - 1;
}
if (!(flow_mode & CAKE_FLOW_FLOWS)) {
if (flow_mode & CAKE_FLOW_SRC_IP)
- flow_hash ^= srchost_hash;
+ out->flow_hash ^= out->srchost_hash;
if (flow_mode & CAKE_FLOW_DST_IP)
- flow_hash ^= dsthost_hash;
+ out->flow_hash ^= out->dsthost_hash;
}
+}
+
+/* Resolve the keys from cake_hash_keys() into the set-associative flow
+ * table. Mutates q->tags[], the flow host indices, the way counters and
+ * the host bulk-flow counts, so run only after admission.
+ */
+static u32 cake_hash_resolve(struct cake_tin_data *q,
+ const struct cake_hash_keys *keys, int flow_mode)
+{
+ u32 flow_hash = keys->flow_hash, srchost_hash = keys->srchost_hash,
+ dsthost_hash = keys->dsthost_hash;
+ u16 reduced_hash, srchost_idx, dsthost_idx;
reduced_hash = flow_hash % CAKE_QUEUES;
@@ -1712,18 +1738,24 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch,
return &qd->tins[tin];
}
-static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
- struct sk_buff *skb, int flow_mode, int *qerr)
+/* Run the optional external classifier. Returns true when the packet was
+ * consumed by a terminal TC action (reason in *qerr); else *flow/*host
+ * hold the filter's overrides (0 if none).
+ */
+static bool cake_tcf_classify(struct Qdisc *sch, struct sk_buff *skb,
+ u16 *flow, u16 *host, int *qerr)
{
struct cake_sched_data *q = qdisc_priv(sch);
struct tcf_proto *filter;
struct tcf_result res;
- u16 flow = 0, host = 0;
int result;
+ *flow = 0;
+ *host = 0;
+
filter = rcu_dereference_bh(q->filter_list);
if (!filter)
- goto hash;
+ return false;
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
result = tcf_classify_qdisc(skb, filter, &res, false);
@@ -1737,17 +1769,15 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
fallthrough;
case TC_ACT_SHOT:
- return 0;
+ return true;
}
#endif
if (TC_H_MIN(res.classid) <= CAKE_QUEUES)
- flow = TC_H_MIN(res.classid);
+ *flow = TC_H_MIN(res.classid);
if (TC_H_MAJ(res.classid) <= (CAKE_QUEUES << 16))
- host = TC_H_MAJ(res.classid) >> 16;
+ *host = TC_H_MAJ(res.classid) >> 16;
}
-hash:
- *t = cake_select_tin(sch, skb);
- return cake_hash(*t, skb, flow_mode, flow, host) + 1;
+ return false;
}
static void cake_reconfigure(struct Qdisc *sch);
@@ -1758,22 +1788,86 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
u32 idx, tin, prev_qlen, prev_backlog, drop_id;
struct cake_sched_data *q = qdisc_priv(sch);
int len = qdisc_pkt_len(skb), ret;
+ u16 flow_override, host_override;
+ struct sk_buff *segs = NULL;
+ struct cake_hash_keys keys;
struct sk_buff *ack = NULL;
ktime_t now = ktime_get();
struct cake_tin_data *b;
struct cake_flow *flow;
bool same_flow = false;
+ u64 slen = 0;
- /* choose flow to insert into */
- idx = cake_classify(sch, &b, skb, q->config->flow_mode, &ret);
- if (idx == 0) {
+ /* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)
+ * keep working at the ceiling; carry the overrides to
+ * cake_hash_keys().
+ */
+ if (cake_tcf_classify(sch, skb, &flow_override, &host_override, &ret)) {
if (ret & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch);
__qdisc_drop(skb, to_free);
return ret;
}
+
+ /* Drop before hash/shaper state so a rejected packet disturbs
+ * neither; the QDISC_PKT_LEN_MAX headroom covers one unsplit packet.
+ */
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ qdisc_qstats_overlimit(sch);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
+ /* Tin selection and key extraction must run on the unsegmented skb:
+ * skb_gso_segment() rewrites an encapsulated GSO packet's headers to
+ * the inner ones, changing the keys. Neither commits state.
+ */
+ b = cake_select_tin(sch, skb);
+ cake_hash_keys(skb, q->config->flow_mode, flow_override,
+ host_override, &keys);
+
+ if (qdisc_pkt_segs(skb) > 1 && q->config->rate_flags & CAKE_FLAG_SPLIT_GSO) {
+ struct sk_buff *nskb, *seg;
+ netdev_features_t features = netif_skb_features(skb);
+
+ segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
+ if (IS_ERR_OR_NULL(segs))
+ return qdisc_drop(skb, sch, to_free);
+
+ /* The split path accounts the segment sum, not the
+ * stab-adjusted qdisc_pkt_len(), so the top check does not
+ * bound it. Sum the list and reject it whole.
+ */
+ skb_list_walk_safe(segs, seg, nskb)
+ slen += seg->len;
+
+ if (unlikely((u64)sch->qstats.backlog + slen > QDISC_MAX_BACKLOG)) {
+ qdisc_qstats_overlimit(sch);
+ /* skb_gso_segment() moved the sock_wfree destructor
+ * to the tail segment; defer the whole list to
+ * to_free, never free it under the qdisc lock.
+ *
+ * Fraglist GSO is the exception: skb_segment_list()
+ * returns the original skb as the head with an extra
+ * ref (segs == skb), so drop the caller's ref and
+ * queue the list once, or the two drops self-link it.
+ */
+ if (unlikely(segs == skb)) {
+ tcf_set_qdisc_drop_reason(skb,
+ QDISC_DROP_OVERLIMIT);
+ consume_skb(skb);
+ return qdisc_drop_all(segs, sch, to_free);
+ }
+ __qdisc_drop_all(segs, to_free);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+ }
+
+ /* Admitted: resolve the keys and commit flow/shaper state. */
+
+ idx = cake_hash_resolve(b, &keys, q->config->flow_mode);
tin = (u32)(b - q->tins);
- idx--;
flow = &b->flows[idx];
/* ensure shaper state isn't stale */
@@ -1800,28 +1894,22 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (unlikely(len > b->max_skblen))
WRITE_ONCE(b->max_skblen, len);
- if (qdisc_pkt_segs(skb) > 1 && q->config->rate_flags & CAKE_FLAG_SPLIT_GSO) {
- struct sk_buff *segs, *nskb;
- netdev_features_t features = netif_skb_features(skb);
- unsigned int slen = 0, numsegs = 0;
-
- segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
- if (IS_ERR_OR_NULL(segs))
- return qdisc_drop(skb, sch, to_free);
+ if (segs) {
+ struct sk_buff *nskb, *seg;
+ unsigned int numsegs = 0;
- skb_list_walk_safe(segs, segs, nskb) {
- skb_mark_not_on_list(segs);
- qdisc_skb_cb(segs)->pkt_len = segs->len;
- qdisc_skb_cb(segs)->pkt_segs = 1;
- cobalt_set_enqueue_time(segs, now);
- get_cobalt_cb(segs)->adjusted_len = cake_overhead(q,
- segs);
- flow_queue_add(flow, segs);
+ skb_list_walk_safe(segs, seg, nskb) {
+ skb_mark_not_on_list(seg);
+ qdisc_skb_cb(seg)->pkt_len = seg->len;
+ qdisc_skb_cb(seg)->pkt_segs = 1;
+ cobalt_set_enqueue_time(seg, now);
+ get_cobalt_cb(seg)->adjusted_len = cake_overhead(q,
+ seg);
+ flow_queue_add(flow, seg);
qdisc_qlen_inc(sch);
numsegs++;
- slen += segs->len;
- q->buffer_used += segs->truesize;
+ q->buffer_used += seg->truesize;
WRITE_ONCE(b->packets, b->packets + 1);
}
diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
index 6aa5829d69612..9aa18438413ab 100644
--- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c
@@ -116,15 +116,17 @@ static struct sk_buff *codel_peek(struct Qdisc *sch)
static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{
- struct codel_sched_data *q;
+ struct codel_sched_data *q = qdisc_priv(sch);
- if (likely(qdisc_qlen(sch) < sch->limit)) {
- codel_set_enqueue_time(skb);
- return qdisc_enqueue_tail(skb, sch);
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
+ WRITE_ONCE(q->drop_overlimit, q->drop_overlimit + 1);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
}
- q = qdisc_priv(sch);
- WRITE_ONCE(q->drop_overlimit, q->drop_overlimit + 1);
- return qdisc_drop_reason(skb, sch, to_free, QDISC_DROP_OVERLIMIT);
+
+ codel_set_enqueue_time(skb);
+ return qdisc_enqueue_tail(skb, sch);
}
static const struct nla_policy codel_policy[TCA_CODEL_MAX + 1] = {
diff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c
index 4947def7c49ef..5c746e9b60cd7 100644
--- a/net/sched/sch_dualpi2.c
+++ b/net/sched/sch_dualpi2.c
@@ -392,6 +392,7 @@ static int dualpi2_enqueue_skb(struct sk_buff *skb, struct Qdisc *sch,
struct dualpi2_skb_cb *cb;
if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch)) ||
unlikely((u64)q->memory_used + skb->truesize > q->memory_limit)) {
qdisc_qstats_overlimit(sch);
if (skb_in_l_queue(skb))
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 1b6388d50967f..d5e5cd49377d8 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -29,6 +29,9 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{
+ if (unlikely(qdisc_backlog_at_max(sch)))
+ return qdisc_drop(skb, sch, to_free);
+
if (likely(sch->q.qlen < READ_ONCE(sch->limit)))
return qdisc_enqueue_tail(skb, sch);
@@ -43,6 +46,9 @@ static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (unlikely(READ_ONCE(sch->limit) == 0))
return qdisc_drop(skb, sch, to_free);
+ if (unlikely(qdisc_backlog_at_max(sch)))
+ return qdisc_drop(skb, sch, to_free);
+
if (likely(sch->q.qlen < READ_ONCE(sch->limit)))
return qdisc_enqueue_tail(skb, sch);
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 969b2510b0b86..b07732c0d8cce 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -73,22 +73,34 @@ static unsigned int fq_codel_hash(const struct fq_codel_sched_data *q,
return reciprocal_scale(skb_get_hash(skb), q->flows_cnt);
}
-static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
- int *qerr)
+/* Run the optional external classifier. Returns true when the caller must
+ * drop (a terminal TC action consumed the packet, or the result carried no
+ * class ID); the reason is then in *qerr. Else *idx is the 1-based flow
+ * index, or *do_hash asks the caller to use fq_codel_hash().
+ */
+static bool fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
+ unsigned int *idx, bool *do_hash, int *qerr)
{
struct fq_codel_sched_data *q = qdisc_priv(sch);
struct tcf_proto *filter;
struct tcf_result res;
int result;
+ *idx = 0;
+ *do_hash = false;
+
if (TC_H_MAJ(skb->priority) == sch->handle &&
TC_H_MIN(skb->priority) > 0 &&
- TC_H_MIN(skb->priority) <= q->flows_cnt)
- return TC_H_MIN(skb->priority);
+ TC_H_MIN(skb->priority) <= q->flows_cnt) {
+ *idx = TC_H_MIN(skb->priority);
+ return false;
+ }
filter = rcu_dereference_bh(q->filter_list);
- if (!filter)
- return fq_codel_hash(q, skb) + 1;
+ if (!filter) {
+ *do_hash = true;
+ return false;
+ }
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
result = tcf_classify_qdisc(skb, filter, &res, false);
@@ -101,13 +113,16 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
fallthrough;
case TC_ACT_SHOT:
- return 0;
+ return true;
}
#endif
- if (TC_H_MIN(res.classid) <= q->flows_cnt)
- return TC_H_MIN(res.classid);
+ if (TC_H_MIN(res.classid) > 0 &&
+ TC_H_MIN(res.classid) <= q->flows_cnt) {
+ *idx = TC_H_MIN(res.classid);
+ return false;
+ }
}
- return 0;
+ return true;
}
/* helper functions : might be changed when/if skb use a standard list_head */
@@ -187,18 +202,33 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,
{
struct fq_codel_sched_data *q = qdisc_priv(sch);
unsigned int idx, prev_backlog, prev_qlen;
+ bool do_hash = false;
struct fq_codel_flow *flow;
int ret;
unsigned int pkt_len;
bool memory_limited;
- idx = fq_codel_classify(skb, sch, &ret);
- if (idx == 0) {
+ /* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)
+ * keep working at the ceiling; only hashing is deferred below.
+ */
+ if (fq_codel_classify(skb, sch, &idx, &do_hash, &ret)) {
if (ret & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch);
__qdisc_drop(skb, to_free);
return ret;
}
+
+ /* Drop before hashing so a rejected packet disturbs no flow hash;
+ * the QDISC_PKT_LEN_MAX headroom covers one packet.
+ */
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ q->drop_overlimit++;
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
+ if (do_hash)
+ idx = fq_codel_hash(q, skb) + 1;
idx--;
codel_set_enqueue_time(skb);
diff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c
index 5982847df8f85..394f015cec36d 100644
--- a/net/sched/sch_fq_pie.c
+++ b/net/sched/sch_fq_pie.c
@@ -155,7 +155,8 @@ static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
memory_limited = q->memory_usage > q->memory_limit + skb->truesize;
/* Checks if the qdisc is full */
- if (unlikely(qdisc_qlen(sch) >= sch->limit)) {
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
q->stats.overlimit++;
goto out;
} else if (unlikely(memory_limited)) {
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
index 3b7863ffd284c..9e38f38ce923b 100644
--- a/net/sched/sch_pie.c
+++ b/net/sched/sch_pie.c
@@ -89,7 +89,8 @@ static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct pie_sched_data *q = qdisc_priv(sch);
bool enqueue = false;
- if (unlikely(qdisc_qlen(sch) >= sch->limit)) {
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
WRITE_ONCE(q->stats.overlimit, q->stats.overlimit + 1);
goto out;
}
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index d7598214270b8..e3a254f9dbdf9 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -76,6 +76,12 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,
unsigned int len;
int ret;
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ qdisc_qstats_overlimit(sch);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
q->vars.qavg = red_calc_qavg(&q->parms,
&q->vars,
child->qstats.backlog);
|
| 3/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10851 output: 38 thoughts: 417 Thoughts: **Analyzing a Git Commit for Syzkaller Fuzzing Potential** Okay, so I need to assess this git commit with an eye towards its implications for syzkaller fuzzing. My immediate focus is on understanding the scope of the change and identifying potential areas of interest for fuzzing. First, I'm going to carefully dissect the diff. It looks like we're dealing with modifications scattered across several core networking files: `include/net/pkt_sched.h`, `include/net/sch_generic.h`, and then a slew of scheduler implementations (`sch_cake.c`, `sch_codel.c`, `sch_dualpi2.c`, `sch_fifo.c`, `sch_fq_codel.c`, `sch_fq_pie.c`, `sch_pie.c`, `sch_red.c`). This instantly tells me we're looking at changes related to packet scheduling and queue management, a common target for finding interesting bugs. Specifically, I'm noting modifications to `QDISC_MAX_BACKLOG` and `qdisc_backlog_at_max`, along with backlog checks in the enqueue functions of various schedulers. This suggests that the commit is likely attempting to refine or optimize backlog handling, possibly to prevent buffer overflows or improve performance under heavy load. I'm especially interested in `sch_cake.c` as it has many functions modified, as well as the functions of the other schedulers that check `qdisc_backlog_at_max`. This is where the core logic usually lies. Before I go further, I need more context. I'm going to check the commit log messages for an explanation. If that's not informative enough, I'll use `git log` or `git grep` to search for related discussions or bug reports. Getting a clearer picture of the original intent is vital. |
| 4/2 | 2026/10/02 23:38 | tool | grepper |
0mArgs:{
"Expression": "qdisc_backlog_at_max",
"PathPrefix": "include/net/sch_generic.h"
}Results: {
"Output": "include/net/sch_generic.h=904=static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)\n--\ninclude/net/sch_generic.h-918- */\ninclude/net/sch_generic.h:919:static inline bool qdisc_backlog_at_max(const struct Qdisc *sch)\ninclude/net/sch_generic.h-920-{\n"
} |
| 5/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11818 output: 39 thoughts: 138 Thoughts: Okay, here's my understanding, based on the information provided: **Analyzing a CAKE Scheduler Patch** Right, let's dive into this. The context seems to be a kernel patch related to the CAKE (Common Applications Kept Enhanced) traffic scheduler. First, I need to check the commit message to get a feel for what this is all about. Hmm, okay, I can't just `git log` here, but I *do* have the commit details. It's from the syz-cluster, and it's a "applied patch under review". Good start! I see it's from 2026 – so it’s likely something I haven’t come across before. Now, my next step is clear. To understand the impact of this applied patch, I'll focus on the `net/sched/sch_cake.c` file, specifically examining the code around lines 700-800 and lines 1700-1920. That line range is the best place to understand any code changes. This should provide insights into the nature of the modifications. Let's see what we've got. |
| 6/2 | 2026/10/02 23:38 | tool | read-file |
0mArgs:{
"File": "net/sched/sch_cake.c",
"FirstLine": 1785,
"LineCount": 100
}Results: {
"Contents": "1785:\tstatic s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n1786:\t\t\t\tstruct sk_buff **to_free)\n1787:\t{\n1788:\t\tu32 idx, tin, prev_qlen, prev_backlog, drop_id;\n1789:\t\tstruct cake_sched_data *q = qdisc_priv(sch);\n1790:\t\tint len = qdisc_pkt_len(skb), ret;\n1791:\t\tu16 flow_override, host_override;\n1792:\t\tstruct sk_buff *segs = NULL;\n1793:\t\tstruct cake_hash_keys keys;\n1794:\t\tstruct sk_buff *ack = NULL;\n1795:\t\tktime_t now = ktime_get();\n1796:\t\tstruct cake_tin_data *b;\n1797:\t\tstruct cake_flow *flow;\n1798:\t\tbool same_flow = false;\n1799:\t\tu64 slen = 0;\n1800:\t\n1801:\t\t/* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)\n1802:\t\t * keep working at the ceiling; carry the overrides to\n1803:\t\t * cake_hash_keys().\n1804:\t\t */\n1805:\t\tif (cake_tcf_classify(sch, skb, \u0026flow_override, \u0026host_override, \u0026ret)) {\n1806:\t\t\tif (ret \u0026 __NET_XMIT_BYPASS)\n1807:\t\t\t\tqdisc_qstats_drop(sch);\n1808:\t\t\t__qdisc_drop(skb, to_free);\n1809:\t\t\treturn ret;\n1810:\t\t}\n1811:\t\n1812:\t\t/* Drop before hash/shaper state so a rejected packet disturbs\n1813:\t\t * neither; the QDISC_PKT_LEN_MAX headroom covers one unsplit packet.\n1814:\t\t */\n1815:\t\tif (unlikely(qdisc_backlog_at_max(sch))) {\n1816:\t\t\tqdisc_qstats_overlimit(sch);\n1817:\t\t\treturn qdisc_drop_reason(skb, sch, to_free,\n1818:\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n1819:\t\t}\n1820:\t\n1821:\t\t/* Tin selection and key extraction must run on the unsegmented skb:\n1822:\t\t * skb_gso_segment() rewrites an encapsulated GSO packet's headers to\n1823:\t\t * the inner ones, changing the keys. Neither commits state.\n1824:\t\t */\n1825:\t\tb = cake_select_tin(sch, skb);\n1826:\t\tcake_hash_keys(skb, q-\u003econfig-\u003eflow_mode, flow_override,\n1827:\t\t\t host_override, \u0026keys);\n1828:\t\n1829:\t\tif (qdisc_pkt_segs(skb) \u003e 1 \u0026\u0026 q-\u003econfig-\u003erate_flags \u0026 CAKE_FLAG_SPLIT_GSO) {\n1830:\t\t\tstruct sk_buff *nskb, *seg;\n1831:\t\t\tnetdev_features_t features = netif_skb_features(skb);\n1832:\t\n1833:\t\t\tsegs = skb_gso_segment(skb, features \u0026 ~NETIF_F_GSO_MASK);\n1834:\t\t\tif (IS_ERR_OR_NULL(segs))\n1835:\t\t\t\treturn qdisc_drop(skb, sch, to_free);\n1836:\t\n1837:\t\t\t/* The split path accounts the segment sum, not the\n1838:\t\t\t * stab-adjusted qdisc_pkt_len(), so the top check does not\n1839:\t\t\t * bound it. Sum the list and reject it whole.\n1840:\t\t\t */\n1841:\t\t\tskb_list_walk_safe(segs, seg, nskb)\n1842:\t\t\t\tslen += seg-\u003elen;\n1843:\t\n1844:\t\t\tif (unlikely((u64)sch-\u003eqstats.backlog + slen \u003e QDISC_MAX_BACKLOG)) {\n1845:\t\t\t\tqdisc_qstats_overlimit(sch);\n1846:\t\t\t\t/* skb_gso_segment() moved the sock_wfree destructor\n1847:\t\t\t\t * to the tail segment; defer the whole list to\n1848:\t\t\t\t * to_free, never free it under the qdisc lock.\n1849:\t\t\t\t *\n1850:\t\t\t\t * Fraglist GSO is the exception: skb_segment_list()\n1851:\t\t\t\t * returns the original skb as the head with an extra\n1852:\t\t\t\t * ref (segs == skb), so drop the caller's ref and\n1853:\t\t\t\t * queue the list once, or the two drops self-link it.\n1854:\t\t\t\t */\n1855:\t\t\t\tif (unlikely(segs == skb)) {\n1856:\t\t\t\t\ttcf_set_qdisc_drop_reason(skb,\n1857:\t\t\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n1858:\t\t\t\t\tconsume_skb(skb);\n1859:\t\t\t\t\treturn qdisc_drop_all(segs, sch, to_free);\n1860:\t\t\t\t}\n1861:\t\t\t\t__qdisc_drop_all(segs, to_free);\n1862:\t\t\t\treturn qdisc_drop_reason(skb, sch, to_free,\n1863:\t\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n1864:\t\t\t}\n1865:\t\t}\n1866:\t\n1867:\t\t/* Admitted: resolve the keys and commit flow/shaper state. */\n1868:\t\n1869:\t\tidx = cake_hash_resolve(b, \u0026keys, q-\u003econfig-\u003eflow_mode);\n1870:\t\ttin = (u32)(b - q-\u003etins);\n1871:\t\tflow = \u0026b-\u003eflows[idx];\n1872:\t\n1873:\t\t/* ensure shaper state isn't stale */\n1874:\t\tif (!b-\u003etin_backlog) {\n1875:\t\t\tif (ktime_before(b-\u003etime_next_packet, now))\n1876:\t\t\t\tb-\u003etime_next_packet = now;\n1877:\t\n1878:\t\t\tif (!sch-\u003eq.qlen) {\n1879:\t\t\t\tif (ktime_before(q-\u003etime_next_packet, now)) {\n1880:\t\t\t\t\tq-\u003efailsafe_next_packet = now;\n1881:\t\t\t\t\tq-\u003etime_next_packet = now;\n1882:\t\t\t\t} else if (ktime_after(q-\u003etime_next_packet, now) \u0026\u0026\n1883:\t\t\t\t\t ktime_after(q-\u003efailsafe_next_packet, now)) {\n1884:\t\t\t\t\tu64 next = \\\n"
} |
| 7/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 14051 output: 64 thoughts: 754 Thoughts: **Analysis of Network Packet Scheduler Changes** Okay, this is a juicy one. I'm seeing a significant set of modifications related to packet schedulers (qdiscs), and my expert instincts are tingling. Let's break this down: First, they've introduced this `QDISC_MAX_BACKLOG` constant defined as `(U32_MAX - QDISC_PKT_LEN_MAX)`. The function `qdisc_backlog_at_max(sch)` is now used extensively to check if the backlog exceeds this new limit. This is the common thread, and it's being woven into a *lot* of places. Now, for the really interesting part: these backlog checks are showing up *everywhere*. * `sch_cake` has undergone some serious refactoring: `cake_hash` split into `cake_hash_keys` and `cake_hash_resolve`, `cake_classify` into `cake_tcf_classify`, and `cake_enqueue` has been rearranged to check the backlog early, then handle the rest of the classification and segmentation with some critical changes with the GSO skb and the fraglist. * `sch_codel`, `sch_dualpi2`, `sch_fifo`, `sch_fq_codel`, `sch_fq_pie`, `sch_pie`, and `sch_red` all have `qdisc_backlog_at_max(sch)` checks added to their respective `enqueue` functions or similar spots. My immediate question is, is this reachable? YES! These are core networking components, easily configurable via netlink, which means this code path is absolutely accessible through syzkaller, normal network namespaces, and just about any standard system that uses traffic control. This is a very high-value target. `sch_cake`, `sch_fq_codel`, `sch_codel`, and others are all standard qdiscs. The `sch_cake` changes in particular look substantial with the changes to flow dissection, GSO splitting, error handling, skb freeing. So, am I thinking this is WorthFuzzing? Absolutely! It's time to dig into the Kconfig entries for these modules and see how they are configured and what dependencies are in play. I need to grep for the Kconfig entries associated with `sch_cake.c`, `sch_codel.c`, `sch_dualpi2.c`, `sch_fifo.c`, `sch_fq_codel.c`, `sch_fq_pie.c`, `sch_pie.c`, and `sch_red.c` to understand the conditions under which these modules are compiled and linked. Then, I can focus on the specific symbols to maximize the effectiveness of my fuzzing efforts. |
| 8/2 | 2026/10/02 23:38 | tool | grepper |
0mArgs:{
"Expression": "sch_cake|sch_codel|sch_dualpi2|sch_fifo|sch_fq_codel|sch_fq_pie|sch_pie|sch_red",
"PathPrefix": "net/sched/Makefile"
}Results: {
"Output": "net/sched/Makefile=33=obj-$(CONFIG_NET_ACT_GATE)\t+= act_gate.o\nnet/sched/Makefile:34:obj-$(CONFIG_NET_SCH_FIFO)\t+= sch_fifo.o\nnet/sched/Makefile-35-obj-$(CONFIG_NET_SCH_HTB)\t+= sch_htb.o\nnet/sched/Makefile=36=obj-$(CONFIG_NET_SCH_HFSC)\t+= sch_hfsc.o\nnet/sched/Makefile:37:obj-$(CONFIG_NET_SCH_RED)\t+= sch_red.o\nnet/sched/Makefile-38-obj-$(CONFIG_NET_SCH_GRED)\t+= sch_gred.o\n--\nnet/sched/Makefile=54=obj-$(CONFIG_NET_SCH_QFQ)\t+= sch_qfq.o\nnet/sched/Makefile:55:obj-$(CONFIG_NET_SCH_CODEL)\t+= sch_codel.o\nnet/sched/Makefile:56:obj-$(CONFIG_NET_SCH_FQ_CODEL)\t+= sch_fq_codel.o\nnet/sched/Makefile:57:obj-$(CONFIG_NET_SCH_CAKE)\t+= sch_cake.o\nnet/sched/Makefile-58-obj-$(CONFIG_NET_SCH_FQ)\t+= sch_fq.o\nnet/sched/Makefile=59=obj-$(CONFIG_NET_SCH_HHF)\t+= sch_hhf.o\nnet/sched/Makefile:60:obj-$(CONFIG_NET_SCH_PIE)\t+= sch_pie.o\nnet/sched/Makefile:61:obj-$(CONFIG_NET_SCH_FQ_PIE)\t+= sch_fq_pie.o\nnet/sched/Makefile-62-obj-$(CONFIG_NET_SCH_CBS)\t+= sch_cbs.o\n--\nnet/sched/Makefile=65=obj-$(CONFIG_NET_SCH_BPF)\t+= bpf_qdisc.o\nnet/sched/Makefile:66:obj-$(CONFIG_NET_SCH_DUALPI2)\t+= sch_dualpi2.o\nnet/sched/Makefile-67-\n"
} |
| 9/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15997 output: 59 thoughts: 114 Thoughts: **Examining Network Scheduler Dependencies** Okay, let's dive into this. I need to understand the dependencies for these network scheduler options – `NET_SCH_CAKE`, `NET_SCH_CODEL`, `NET_SCH_DUALPI2`, `NET_SCH_FIFO`, `NET_SCH_FQ_CODEL`, `NET_SCH_FQ_PIE`, `NET_SCH_PIE`, and `NET_SCH_RED`. Clearly, the place to start is the `net/sched/Kconfig` file. That should be my central source of truth for these configuration options. I'll need to meticulously go through each entry, noting any prerequisites or conflicting options. Time to get to work! |
| 10/2 | 2026/10/02 23:38 | tool | grepper |
0mArgs:{
"Expression": "config NET_SCH_(CAKE|CODEL|DUALPI2|FIFO|FQ_CODEL|FQ_PIE|PIE|RED)",
"PathPrefix": "net/sched/Kconfig"
}Results: {
"Output": "net/sched/Kconfig=80=config NET_SCH_MULTIQ\n--\nnet/sched/Kconfig-88-\nnet/sched/Kconfig:89:config NET_SCH_RED\nnet/sched/Kconfig-90-\ttristate \"Random Early Detection (RED)\"\n--\nnet/sched/Kconfig=255=config NET_SCH_QFQ\n--\nnet/sched/Kconfig-265-\nnet/sched/Kconfig:266:config NET_SCH_CODEL\nnet/sched/Kconfig-267-\ttristate \"Controlled Delay AQM (CODEL)\"\n--\nnet/sched/Kconfig-276-\nnet/sched/Kconfig:277:config NET_SCH_FQ_CODEL\nnet/sched/Kconfig-278-\ttristate \"Fair Queue Controlled Delay AQM (FQ_CODEL)\"\n--\nnet/sched/Kconfig-287-\nnet/sched/Kconfig:288:config NET_SCH_CAKE\nnet/sched/Kconfig-289-\ttristate \"Common Applications Kept Enhanced (CAKE)\"\n--\nnet/sched/Kconfig=313=config NET_SCH_HHF\n--\nnet/sched/Kconfig-321-\nnet/sched/Kconfig:322:config NET_SCH_PIE\nnet/sched/Kconfig-323-\ttristate \"Proportional Integral controller Enhanced (PIE) scheduler\"\n--\nnet/sched/Kconfig-333-\nnet/sched/Kconfig:334:config NET_SCH_FQ_PIE\nnet/sched/Kconfig-335-\tdepends on NET_SCH_PIE\n--\nnet/sched/Kconfig=406=config NET_SCH_BPF\n--\nnet/sched/Kconfig-417-\nnet/sched/Kconfig:418:config NET_SCH_DUALPI2\nnet/sched/Kconfig-419-\ttristate \"Dual Queue PI Square (DUALPI2) scheduler\"\n--\nnet/sched/Kconfig=966=endif # NET_SCHED\nnet/sched/Kconfig-967-\nnet/sched/Kconfig:968:config NET_SCH_FIFO\nnet/sched/Kconfig-969-\tbool\n"
} |
| 11/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16895 output: 32 thoughts: 18 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing `net/sched/Kconfig` Dependencies** Alright, let's dive in. I need to get a grip on the dependencies surrounding these specific configurations in `net/sched/Kconfig`. I already have a pretty good idea of the major players, but a thorough review is always warranted, especially when dealing with the network scheduler. I'm going to start by tracing the cross-references and examining the implications of enabling or disabling any of these particular options. I expect there might be a few gotchas related to other scheduling algorithms or hardware support. Understanding the relationships will be key to avoiding any unexpected conflicts or regressions. The goal is to fully grasp how these configs fit into the bigger picture and, of course, to ensure that any proposed modifications are both sound and maintainable. I'm thinking I might need to cross-reference with related files too, to confirm my understanding is sound. |
| 12/2 | 2026/10/02 23:38 | tool | read-file |
0mArgs:{
"File": "net/sched/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# Traffic control configuration.\n 4:\t#\n 5:\t\n 6:\tmenuconfig NET_SCHED\n 7:\t\tbool \"QoS and/or fair queueing\"\n 8:\t\tselect NET_SCH_FIFO\n 9:\t\thelp\n 10:\t\t When the kernel has several packets to send out over a network\n 11:\t\t device, it has to decide which ones to send first, which ones to\n 12:\t\t delay, and which ones to drop. This is the job of the queueing\n 13:\t\t disciplines, several different algorithms for how to do this\n 14:\t\t \"fairly\" have been proposed.\n 15:\t\n 16:\t\t If you say N here, you will get the standard packet scheduler, which\n 17:\t\t is a FIFO (first come, first served). If you say Y here, you will be\n 18:\t\t able to choose from among several alternative algorithms which can\n 19:\t\t then be attached to different network devices. This is useful for\n 20:\t\t example if some of your network devices are real time devices that\n 21:\t\t need a certain minimum data flow rate, or if you need to limit the\n 22:\t\t maximum data flow rate for traffic which matches specified criteria.\n 23:\t\t This code is considered to be experimental.\n 24:\t\n 25:\t\t To administer these schedulers, you'll need the user-level utilities\n 26:\t\t from the package iproute2+tc at\n 27:\t\t \u003chttps://www.kernel.org/pub/linux/utils/net/iproute2/\u003e. That package\n 28:\t\t also contains some documentation; for more, check out\n 29:\t\t \u003chttp://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2\u003e.\n 30:\t\n 31:\t\t This Quality of Service (QoS) support will enable you to use\n 32:\t\t Differentiated Services (diffserv) and Resource Reservation Protocol\n 33:\t\t (RSVP) on your Linux router if you also say Y to the corresponding\n 34:\t\t classifiers below. Documentation and software is at\n 35:\t\t \u003chttp://diffserv.sourceforge.net/\u003e.\n 36:\t\n 37:\t\t If you say Y here and to \"/proc file system\" below, you will be able\n 38:\t\t to read status information about packet schedulers from the file\n 39:\t\t /proc/net/psched.\n 40:\t\n"
} |
| 13/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17806 output: 34 thoughts: 25 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing Network Scheduler Configuration** Right, let's dive in. My immediate thought is to zero in on the lines surrounding those specific network scheduler keywords: `NET_SCH_CAKE`, `NET_SCH_FQ_CODEL`, and the like. My experience tells me that these are highly likely related to traffic shaping and Quality of Service (QoS) configurations. Understanding their context within the configuration file, or wherever they're defined, is crucial. I'm already mentally running through the implications: what interfaces are they applied to? What are the specific parameters and their values? Are they being used in conjunction with other mechanisms like rate limiting or packet marking? I need to quickly grasp the overall traffic management strategy that's in place. Context is key, so I'm expecting to see things like bandwidth allocations, priority settings, and perhaps even firewall rules that are interacting with these schedulers. It is important to know if it is a singular configuration or a combination. The impact on latency, jitter, and throughput, for specific types of traffic is what I will be expecting, so I will start by seeing what kind of parameters are included. |
| 14/2 | 2026/10/02 23:38 | tool | read-file |
0mArgs:{
"File": "net/sched/Kconfig",
"FirstLine": 275,
"LineCount": 70
}Results: {
"Contents": " 275:\t\t If unsure, say N.\n 276:\t\n 277:\tconfig NET_SCH_FQ_CODEL\n 278:\t\ttristate \"Fair Queue Controlled Delay AQM (FQ_CODEL)\"\n 279:\t\thelp\n 280:\t\t Say Y here if you want to use the FQ Controlled Delay (FQ_CODEL)\n 281:\t\t packet scheduling algorithm.\n 282:\t\n 283:\t\t To compile this driver as a module, choose M here: the module\n 284:\t\t will be called sch_fq_codel.\n 285:\t\n 286:\t\t If unsure, say N.\n 287:\t\n 288:\tconfig NET_SCH_CAKE\n 289:\t\ttristate \"Common Applications Kept Enhanced (CAKE)\"\n 290:\t\thelp\n 291:\t\t Say Y here if you want to use the Common Applications Kept Enhanced\n 292:\t\t (CAKE) queue management algorithm.\n 293:\t\n 294:\t\t To compile this driver as a module, choose M here: the module\n 295:\t\t will be called sch_cake.\n 296:\t\n 297:\t\t If unsure, say N.\n 298:\t\n 299:\tconfig NET_SCH_FQ\n 300:\t\ttristate \"Fair Queue\"\n 301:\t\thelp\n 302:\t\t Say Y here if you want to use the FQ packet scheduling algorithm.\n 303:\t\n 304:\t\t FQ does flow separation, and is able to respect pacing requirements\n 305:\t\t set by TCP stack into sk-\u003esk_pacing_rate (for locally generated\n 306:\t\t traffic)\n 307:\t\n 308:\t\t To compile this driver as a module, choose M here: the module\n 309:\t\t will be called sch_fq.\n 310:\t\n 311:\t\t If unsure, say N.\n 312:\t\n 313:\tconfig NET_SCH_HHF\n 314:\t\ttristate \"Heavy-Hitter Filter (HHF)\"\n 315:\t\thelp\n 316:\t\t Say Y here if you want to use the Heavy-Hitter Filter (HHF)\n 317:\t\t packet scheduling algorithm.\n 318:\t\n 319:\t\t To compile this driver as a module, choose M here: the module\n 320:\t\t will be called sch_hhf.\n 321:\t\n 322:\tconfig NET_SCH_PIE\n 323:\t\ttristate \"Proportional Integral controller Enhanced (PIE) scheduler\"\n 324:\t\thelp\n 325:\t\t Say Y here if you want to use the Proportional Integral controller\n 326:\t\t Enhanced scheduler packet scheduling algorithm.\n 327:\t\t For more information, please see https://tools.ietf.org/html/rfc8033\n 328:\t\n 329:\t\t To compile this driver as a module, choose M here: the module\n 330:\t\t will be called sch_pie.\n 331:\t\n 332:\t\t If unsure, say N.\n 333:\t\n 334:\tconfig NET_SCH_FQ_PIE\n 335:\t\tdepends on NET_SCH_PIE\n 336:\t\ttristate \"Flow Queue Proportional Integral controller Enhanced (FQ-PIE)\"\n 337:\t\thelp\n 338:\t\t Say Y here if you want to use the Flow Queue Proportional Integral\n 339:\t\t controller Enhanced (FQ-PIE) packet scheduling algorithm.\n 340:\t\t For more information, please see https://tools.ietf.org/html/rfc8033\n 341:\t\n 342:\t\t To compile this driver as a module, choose M here: the module\n 343:\t\t will be called sch_fq_pie.\n 344:\t\n"
} |
| 15/2 | 2026/10/02 23:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19159 output: 34 thoughts: 15 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Considering Another Perspective** Alright, I've been focusing on [presumably a related topic, based on the user's expertise], but I'm sensing a need to step back and widen the lens just a bit. While the current approach seems sound, and I've dissected the nuances of [mention a relevant technical concept], I need to ensure I haven't overlooked any crucial interactions or dependencies. Specifically, I should delve into NET_SCH_DUALPI2. It's a key piece, and its behavior could be impacting the overall system in an unexpected way. I have a feeling there might be some interplay there that demands a closer look. Let's see if this dual processing strategy is affecting things in a way I haven't fully considered yet. It's time to refine my assumptions. |
| 16/2 | 2026/10/02 23:39 | tool | read-file |
0mArgs:{
"File": "net/sched/Kconfig",
"FirstLine": 415,
"LineCount": 20
}Results: {
"Contents": " 415:\t\n 416:\t\t If unsure, say N.\n 417:\t\n 418:\tconfig NET_SCH_DUALPI2\n 419:\t\ttristate \"Dual Queue PI Square (DUALPI2) scheduler\"\n 420:\t\thelp\n 421:\t\t Say Y here if you want to use the Dual Queue Proportional Integral\n 422:\t\t Controller Improved with a Square scheduling algorithm.\n 423:\t\t For more information, please see https://tools.ietf.org/html/rfc9332\n 424:\t\n 425:\t\t To compile this driver as a module, choose M here: the module\n 426:\t\t will be called sch_dualpi2.\n 427:\t\n 428:\t\t If unsure, say N.\n 429:\t\n 430:\tmenuconfig NET_SCH_DEFAULT\n 431:\t\tbool \"Allow override default queue discipline\"\n 432:\t\thelp\n 433:\t\t Support for selection of default queuing discipline.\n 434:\t\n"
} |
| 17/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19684 output: 32 thoughts: 1135 Thoughts: **Analyzing Network Scheduler Enqueue Functions for Coverage** Okay, so I'm looking at these network scheduler configurations under `menuconfig NET_SCHED`, specifically focusing on `NET_SCH_CAKE`, `NET_SCH_CODEL`, and all the other queueing disciplines listed. The `NET_SCH_FQ_PIE` dependence on `NET_SCH_PIE` is noted; I need to keep that in mind during analysis. My goal is to figure out if these queueing disciplines and their associated functions are testable via coverage tools like kcov/syzkaller. I'm focusing on the enqueue functions, as those are the entry points for packet processing. First, I'm checking the modifications in `net/sched/sch_cake.c`. I see `cake_hash_keys`, `cake_hash_resolve`, `cake_tcf_classify`, and `cake_enqueue`. I need to figure out how `cake_enqueue` is used. I see it's assigned to `cake_qdisc_ops.enqueue`, which means it’s a callback. Now, my immediate thought is whether that's static or not. Ah, I remember the trick with static functions in the kernel. `nm vmlinux` and `/proc/kallsyms` *do* list static functions, with type `t`, and they *are* local text. The instructions I'm following say something about how they can’t be targeted directly via symbol coverage filters and that the compiler will inline them. Wait, the instructions are about `static inline` functions *in headers* (.h)! It's specifically about those compiler-inlined static functions in `.h` files that lack distinct symbol addresses. But `cake_hash_keys`, `cake_hash_resolve`, `cake_tcf_classify`, and `cake_enqueue` are defined within the `.c` file itself, not in the `.h`. That means they should be visible. Could the compiler inline the other functions *into* `cake_enqueue`? Likely, and `cake_enqueue` being the `qdisc_ops.enqueue` entrypoint, is the right place to start. I'm making a note to check each of these: `cake_enqueue`, `cake_hash_resolve`, `cake_hash_keys`, `cake_tcf_classify`. They should all be visible. Now I'm systematically examining other similar enqueue functions in different `.c` files, just to get a broader view: `codel_qdisc_enqueue` in `sch_codel.c`, `dualpi2_enqueue_skb` in `sch_dualpi2.c`, `pfifo_enqueue` and `pfifo_tail_enqueue` in `sch_fifo.c`, `fq_codel_classify` and `fq_codel_enqueue` in `sch_fq_codel.c`, `fq_pie_qdisc_enqueue` in `sch_fq_pie.c`, `pie_qdisc_enqueue` in `sch_pie.c`, and finally `red_enqueue` in `sch_red.c`. All are static and are used as qdisc enqueue callbacks. Oh, and here’s the critical link: `qdisc_backlog_at_max(const struct Qdisc *sch)` is a `static inline` function! It's in `include/net/sch_generic.h`. The critical thing is that this is in a *header file*, and now I can identify the *caller functions* that exercise `qdisc_backlog_at_max`. And those caller functions are the *enqueue* functions I just listed! I’ve identified `cake_enqueue`, `codel_qdisc_enqueue`, `dualpi2_enqueue_skb`, `pfifo_enqueue`, `pfifo_tail_enqueue`, `fq_codel_enqueue`, `fq_pie_qdisc_enqueue`, `pie_qdisc_enqueue`, and `red_enqueue`. Also, `cake_hash_resolve`, `cake_tcf_classify`, and `fq_codel_classify` should all be checked. So, the next step is to definitively check whether functions like `cake_enqueue` are actual symbols in `kallsyms` or if the compiler is inlining them. I need to understand exactly how `cake_enqueue` and others are defined and used. I'll need to check the assembly or generated code. |
| 18/2 | 2026/10/02 23:39 | tool | grepper |
0mArgs:{
"Expression": "cake_enqueue",
"PathPrefix": "net/sched/sch_cake.c"
}Results: {
"Output": "net/sched/sch_cake.c=1783=static void cake_reconfigure(struct Qdisc *sch);\nnet/sched/sch_cake.c-1784-\nnet/sched/sch_cake.c:1785:static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,\nnet/sched/sch_cake.c-1786-\t\t\tstruct sk_buff **to_free)\n--\nnet/sched/sch_cake.c=3330=static struct Qdisc_ops cake_qdisc_ops __read_mostly = {\n--\nnet/sched/sch_cake.c-3333-\t.priv_size\t=\tsizeof(struct cake_sched_data),\nnet/sched/sch_cake.c:3334:\t.enqueue\t=\tcake_enqueue,\nnet/sched/sch_cake.c-3335-\t.dequeue\t=\tcake_dequeue,\n"
} |
| 19/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22056 output: 28 thoughts: 1820 Thoughts: **Focus Symbol Determination: A Deep Dive into Qdisc Enqueue Functions** Alright, let's nail down these focus symbols for our work. I need to make sure we're targeting the right functions to get comprehensive coverage. First, let's take an inventory of those enqueue functions across the various qdisc implementations. It's a bit of a sanity check; make sure I haven't missed anything. I've got: * `codel_qdisc_enqueue` in `sch_codel.c`. * `dualpi2_enqueue_skb` in `sch_dualpi2.c`. * `pfifo_enqueue` and `pfifo_tail_enqueue` in `sch_fifo.c`. * `fq_codel_enqueue` in `sch_fq_codel.c`. * `fq_pie_qdisc_enqueue` in `sch_fq_pie.c`. * `pie_qdisc_enqueue` in `sch_pie.c`. * `red_enqueue` in `sch_red.c`. Okay, that's the main group, but I need to go deeper than just the enqueue functions. I remember we have to be *careful* with static inline functions. We should also investigate if any other functions in `sch_cake.c` are relevant: `cake_hash_keys`, `cake_hash_resolve`, `cake_tcf_classify`, and `cake_enqueue`, and the `fq_codel_classify`. Now, wait a minute... aren't `cake_hash_resolve`, `cake_tcf_classify`, and `cake_hash_keys` static functions called only from `cake_enqueue`? Ah, that's right. GCC will likely inline them, right? But *`cake_enqueue` itself* can't be inlined away because its address is taken (`.enqueue = cake_enqueue`). So if a tool like syzkaller checks if the symbol exists via `/proc/kallsyms` or `nm`, it won't see inlined static functions, correct? I must remember this! The same is true for all of the other enqueue functions I listed above. I think it's still worth including the static functions as focus symbols. So, the question is: should we focus on the non-inlined enqueue functions (and possibly classify helpers) or include *all* of the helper functions? Okay, let's re-read the documentation: "HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h): Compiler-inlined static functions... lack distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters. If the changes are primarily in static inline helpers, identify non-static, feature-specific caller functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers)." So, in this case, focus on the caller functions, not the helpers. So, let's get the list: In `net/sched/sch_cake.c`: * `cake_enqueue` * `cake_hash_keys` * `cake_hash_resolve` * `cake_tcf_classify` In `net/sched/sch_codel.c`: * `codel_qdisc_enqueue` In `net/sched/sch_dualpi2.c`: * `dualpi2_enqueue_skb` In `net/sched/sch_fifo.c`: * `pfifo_enqueue` * `pfifo_tail_enqueue` In `net/sched/sch_fq_codel.c`: * `fq_codel_enqueue` * `fq_codel_classify` In `net/sched/sch_fq_pie.c`: * `fq_pie_qdisc_enqueue` In `net/sched/sch_pie.c`: * `pie_qdisc_enqueue` In `net/sched/sch_red.c`: * `red_enqueue` Now, are any of these ubiquitous? None of them are *general* allocators, page faults, or core locks. They're all specific packet enqueue routines for different traffic control qdiscs. To be sure, let's verify if `pfifo_enqueue` or `pfifo_tail_enqueue` are ubiquitous. When syzkaller runs without TC, what's the default qdisc? Usually `fq_codel`, `noqueue`, or `pfifo_fast`. `pfifo_fast` is in `sch_generic.c`, so `pfifo` isn't ubiquitous. `pfifo` and |
| 20/2 | 2026/10/02 23:39 | tool | grepper |
0mArgs:{
"Expression": "menuconfig NET_SCHED",
"PathPrefix": "net/"
}Results: {
"Output": "net/sched/Kconfig-5-\nnet/sched/Kconfig:6:menuconfig NET_SCHED\nnet/sched/Kconfig-7-\tbool \"QoS and/or fair queueing\"\n"
} |
| 21/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24989 output: 31 thoughts: 16 Thoughts: Okay, here's my attempt at summarizing that thought process, tailored for an expert audience: **Tracing the Inclusion of net/sched/Kconfig** Alright, so I need to understand where `net/sched/Kconfig` gets pulled in within the kernel build system. I'm going to start by figuring out the dependencies. It's time to trace the inclusion paths. I need to quickly identify the modules or other Kconfig files that source or `source` this specific file. I'll need to figure out how this is used within the overall configuration process. Let's dig in and figure this out! |
| 22/2 | 2026/10/02 23:39 | tool | grepper |
0mArgs:{
"Expression": "source \"net/sched/Kconfig\"",
"PathPrefix": "net/"
}Results: {
"Output": "net/Kconfig=269=source \"net/mac802154/Kconfig\"\nnet/Kconfig:270:source \"net/sched/Kconfig\"\nnet/Kconfig-271-source \"net/dcb/Kconfig\"\n"
} |
| 23/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25242 output: 32 thoughts: 17 Thoughts: Okay, let's dive into this. Here's my thought process on what I'd be doing: **Investigating a Kernel Configuration Issue** Right, so something's not quite right. I need to get to the heart of this. My first instinct, given the context (whatever it might be, which I'm inferring is some kind of kernel configuration issue), is to check `net/Kconfig`. It's a key file, especially around the 270-line mark (given whatever hint or error message lead me to this investigation). I'm assuming that area is relevant for a specific feature I'm either trying to enable, disable, or troubleshoot. My immediate thought is, "What's defined around that line that could be causing this?" I need to understand the dependencies, the conditionals, and any potential conflicting settings. I’ll start by examining the surrounding code. Perhaps there is a symbol I do not understand or a misconfiguration that is preventing my desired outcome. My expert knowledge will help me identify the pertinent areas. This is where the detective work begins. |
| 24/2 | 2026/10/02 23:39 | tool | read-file |
0mArgs:{
"File": "net/Kconfig",
"FirstLine": 260,
"LineCount": 20
}Results: {
"Contents": " 260:\tsource \"net/bridge/Kconfig\"\n 261:\tsource \"net/dsa/Kconfig\"\n 262:\tsource \"net/8021q/Kconfig\"\n 263:\tsource \"net/llc/Kconfig\"\n 264:\tsource \"net/x25/Kconfig\"\n 265:\tsource \"net/lapb/Kconfig\"\n 266:\tsource \"net/phonet/Kconfig\"\n 267:\tsource \"net/6lowpan/Kconfig\"\n 268:\tsource \"net/ieee802154/Kconfig\"\n 269:\tsource \"net/mac802154/Kconfig\"\n 270:\tsource \"net/sched/Kconfig\"\n 271:\tsource \"net/dcb/Kconfig\"\n 272:\tsource \"net/dns_resolver/Kconfig\"\n 273:\tsource \"net/batman-adv/Kconfig\"\n 274:\tsource \"net/openvswitch/Kconfig\"\n 275:\tsource \"net/vmw_vsock/Kconfig\"\n 276:\tsource \"net/netlink/Kconfig\"\n 277:\tsource \"net/mpls/Kconfig\"\n 278:\tsource \"net/nsh/Kconfig\"\n 279:\tsource \"net/hsr/Kconfig\"\n"
} |
| 25/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25894 output: 34 thoughts: 215 Thoughts: **Kernel Configuration - Network Scheduler Modules** Okay, so I'm diving into the kernel configuration for the network scheduler. I see that `NET_SCHED` is defined within `net/sched/Kconfig`, which is, in turn, included directly by `net/Kconfig`, specifically under the `if NET` condition. That makes sense, keeps things organized. Looking inside `net/sched/Kconfig`, I can see the hierarchical structure. First, there's `NET_SCHED` – that's the main `menuconfig` option, so it's the top-level control, the gatekeeper for enabling other scheduler features. Then, there's a set of individual scheduler algorithms: `NET_SCH_CAKE`, `NET_SCH_CODEL`, `NET_SCH_DUALPI2`, `NET_SCH_FQ_CODEL`, `NET_SCH_PIE`, `NET_SCH_FQ_PIE`, and `NET_SCH_RED`. These are all set up as `tristate` options, allowing them to be built as modules, built-in, or disabled. `NET_SCH_FIFO` is a boolean option, and interestingly, it's selected by `NET_SCHED` which is a good choice for a basic default queue. I need to confirm whether `NET_SCH_DUALPI2` has any dependencies. I can't assume that it doesn't. Time to double-check. |
| 26/2 | 2026/10/02 23:39 | tool | read-file |
0mArgs:{
"File": "net/sched/Kconfig",
"FirstLine": 410,
"LineCount": 20
}Results: {
"Contents": " 410:\t\t This option allows BPF-based queueing disiplines. With BPF struct_ops,\n 411:\t\t users can implement supported operators in Qdisc_ops using BPF programs.\n 412:\t\t The queue holding skb can be built with BPF maps or graphs.\n 413:\t\n 414:\t\t Say Y here if you want to use BPF-based Qdisc.\n 415:\t\n 416:\t\t If unsure, say N.\n 417:\t\n 418:\tconfig NET_SCH_DUALPI2\n 419:\t\ttristate \"Dual Queue PI Square (DUALPI2) scheduler\"\n 420:\t\thelp\n 421:\t\t Say Y here if you want to use the Dual Queue Proportional Integral\n 422:\t\t Controller Improved with a Square scheduling algorithm.\n 423:\t\t For more information, please see https://tools.ietf.org/html/rfc9332\n 424:\t\n 425:\t\t To compile this driver as a module, choose M here: the module\n 426:\t\t will be called sch_dualpi2.\n 427:\t\n 428:\t\t If unsure, say N.\n 429:\t\n"
} |
| 27/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26790 output: 33 thoughts: 38 Thoughts: Okay, here's my take on those seemingly simple thoughts, rendered from an expert's perspective: **Digging into the Kernel Network Scheduler Configuration** Well, that was straightforward, wasn't it? Just navigating the `menuconfig` options for the kernel's network scheduler. No complex algorithms to dissect this time, just a direct hit: `NET_SCH_DUALPI2` nested within `NET_SCHED`. Essentially, this is a flag within the kernel's configuration options. Nothing overly exciting, just a specific scheduler algorithm being enabled or selected. Now, though, my focus needs to shift. I see that the next item to investigate is `NET_SCH_RED`. Time to dig deeper and understand that particular scheduler's behavior and potential applications. Let's see what interesting configurations and parameters it offers. |
| 28/2 | 2026/10/02 23:39 | tool | read-file |
0mArgs:{
"File": "net/sched/Kconfig",
"FirstLine": 85,
"LineCount": 20
}Results: {
"Contents": " 85:\t\n 86:\t\t To compile this code as a module, choose M here: the\n 87:\t\t module will be called sch_multiq.\n 88:\t\n 89:\tconfig NET_SCH_RED\n 90:\t\ttristate \"Random Early Detection (RED)\"\n 91:\t\thelp\n 92:\t\t Say Y here if you want to use the Random Early Detection (RED)\n 93:\t\t packet scheduling algorithm.\n 94:\t\n 95:\t\t See the top of \u003cfile:net/sched/sch_red.c\u003e for more details.\n 96:\t\n 97:\t\t To compile this code as a module, choose M here: the\n 98:\t\t module will be called sch_red.\n 99:\t\n 100:\tconfig NET_SCH_SFB\n 101:\t\ttristate \"Stochastic Fair Blue (SFB)\"\n 102:\t\thelp\n 103:\t\t Say Y here if you want to use the Stochastic Fair Blue (SFB)\n 104:\t\t packet scheduling algorithm.\n"
} |
| 29/2 | 2026/10/02 23:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27323 output: 370 thoughts: 866 Thoughts: **Analysis of Traffic Control Queue Discipline Patch** Okay, let's break this down. First, `NET_SCH_RED` has no other dependencies besides `NET_SCHED` which is straightforward. Now, looking at `NET_SCH_FIFO`, line 8 of `menuconfig` indicates it's selected under `NET_SCHED`, and line 968 confirms that it's a `bool` config. So, enabling `NET_SCH_FIFO` seems automatic when `NET_SCHED` is enabled, but we can configure `NET_SCH_FIFO` specifically as well. I see a list of relevant configurations: "NET_SCHED", "NET_SCH_CAKE", "NET_SCH_CODEL", "NET_SCH_DUALPI2", "NET_SCH_FIFO", "NET_SCH_FQ_CODEL", "NET_SCH_FQ_PIE", "NET_SCH_PIE", and "NET_SCH_RED". I need to confirm the scope of this change. The patch diff modifies: `include/net/pkt_sched.h`, `include/net/sch_generic.h`, and these `.c` files: `net/sched/sch_cake.c`, `net/sched/sch_codel.c`, `net/sched/sch_dualpi2.c`, `net/sched/sch_fifo.c`, `net/sched/sch_fq_codel.c`, `net/sched/sch_fq_pie.c`, `net/sched/sch_pie.c`, and `net/sched/sch_red.c`. Bingo! Eight `.c` files correspond perfectly to the eight `NET_SCH_*` configs. Alright, let's analyze the symbols in each modified file: * `net/sched/sch_cake.c`: `cake_hash_keys`, `cake_hash_resolve`, `cake_tcf_classify`, `cake_enqueue`. * `net/sched/sch_codel.c`: `codel_qdisc_enqueue`. * `net/sched/sch_dualpi2.c`: `dualpi2_enqueue_skb`. * `net/sched/sch_fifo.c`: `pfifo_enqueue`, `pfifo_tail_enqueue`. * `net/sched/sch_fq_codel.c`: `fq_codel_classify`, `fq_codel_enqueue`. * `net/sched/sch_fq_pie.c`: `fq_pie_qdisc_enqueue`. * `net/sched/sch_pie.c`: `pie_qdisc_enqueue`. * `net/sched/sch_red.c`: `red_enqueue`. Okay, now to the heart of it: the reasoning. The patch introduces a new backlog upper-bound check (`qdisc_backlog_at_max`) to prevent 32-bit `sch->qstats.backlog` overflow across several qdiscs (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED). It also significantly refactors aspects of `sch_cake` (hashing, classification, GSO handling, fragmentation). And, in `sch_fq_codel`, there are improvements to classifier processing. These enqueue routines and packet processing paths are easily reachable, especially in virtualized environments via Netlink TC interfaces and sockets. That's a solid reason to fuzz. We have to look for potential regressions, packet leaks, double-frees, and specifically the backlog boundary conditions. Everything is logically consistent and thoroughly vetted. Now it's time to invoke `set-results`. |
| 30/2 | 2026/10/02 23:39 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"NET_SCHED",
"NET_SCH_CAKE",
"NET_SCH_CODEL",
"NET_SCH_DUALPI2",
"NET_SCH_FIFO",
"NET_SCH_FQ_CODEL",
"NET_SCH_FQ_PIE",
"NET_SCH_PIE",
"NET_SCH_RED"
],
"FocusSymbols": [
"cake_enqueue",
"cake_hash_keys",
"cake_hash_resolve",
"cake_tcf_classify",
"codel_qdisc_enqueue",
"dualpi2_enqueue_skb",
"fq_codel_classify",
"fq_codel_enqueue",
"fq_pie_qdisc_enqueue",
"pfifo_enqueue",
"pfifo_tail_enqueue",
"pie_qdisc_enqueue",
"red_enqueue"
],
"Reasoning": "The patch adds backlog overflow protection (qdisc_backlog_at_max) to multiple packet schedulers (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED) to prevent 32-bit backlog counter wrap-around. Furthermore, it substantially restructures CAKE's enqueue path—including packet classification, flow/host key hashing, and GSO segmentation and drop error handling—and refactors FQ-CoDel classifier integration. These networking qdiscs are directly reachable via standard TC netlink interfaces and packet transmission in virtual environments, making fuzzing critical to catch edge cases, skb lifetime issues, or regressions.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"NET_SCHED",
"NET_SCH_CAKE",
"NET_SCH_CODEL",
"NET_SCH_DUALPI2",
"NET_SCH_FIFO",
"NET_SCH_FQ_CODEL",
"NET_SCH_FQ_PIE",
"NET_SCH_PIE",
"NET_SCH_RED"
],
"FocusSymbols": [
"cake_enqueue",
"cake_hash_keys",
"cake_hash_resolve",
"cake_tcf_classify",
"codel_qdisc_enqueue",
"dualpi2_enqueue_skb",
"fq_codel_classify",
"fq_codel_enqueue",
"fq_pie_qdisc_enqueue",
"pfifo_enqueue",
"pfifo_tail_enqueue",
"pie_qdisc_enqueue",
"red_enqueue"
],
"Reasoning": "The patch adds backlog overflow protection (qdisc_backlog_at_max) to multiple packet schedulers (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED) to prevent 32-bit backlog counter wrap-around. Furthermore, it substantially restructures CAKE's enqueue path—including packet classification, flow/host key hashing, and GSO segmentation and drop error handling—and refactors FQ-CoDel classifier integration. These networking qdiscs are directly reachable via standard TC netlink interfaces and packet transmission in virtual environments, making fuzzing critical to catch edge cases, skb lifetime issues, or regressions.",
"WorthFuzzing": true
} |
| 31/1 | 2026/10/02 23:39 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 32/2 | 2026/10/02 23:39 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch series addresses 32-bit integer overflow of the qdisc backlog counter (`sch-\u003eqstats.backlog`) across various packet schedulers (cake, codel, dualpi2, fifo, fq_codel, fq_pie, pie, red) by introducing `qdisc_backlog_at_max()` and enforcing packet drop at admission ceiling. In addition, it restructures packet hashing and TC filter classification in `sch_cake` and `sch_fq_codel` so that hashing occurs on the unsegmented packet and no qdisc state is mutated before packet admission is confirmed.\n\nRegarding memory sanitization:\n1. KMSAN applicability: There are no kernel-to-userspace info-leaks, padding leaks, or uninitialized memory reads introduced. All new local variables and structures (`struct cake_hash_keys keys`, `flow_override`, `host_override`, `do_hash`, `idx`) are explicitly initialized to zero or well-defined values immediately upon function entry and prior to being read or passed along. No data is copied to userspace via netlink, socket options, or ioctl.\n2. KASAN applicability: Any memory safety risks in this patch revolve around skb lifetime management and list traversal (e.g., GSO segmentation error paths, `consume_skb(skb)` vs `qdisc_drop_all(segs, ...)` handling fraglist GSO in `sch_cake`). These potential bugs (such as double-free, use-after-free, or skb leaks) are directly covered by KASAN and standard kernel debug facilities.\n\nTherefore, dedicated KMSAN fuzzing is not justified for these changes.",
"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: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 24f246354077d8d58dbe95e7b5b0fd87fa36ba74
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Oct 2 23:38:33 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 90d3e7943b19a..18a419cd9d949 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -12,7 +12,6 @@
#define DEFAULT_TX_QUEUE_LEN 1000
#define STAB_SIZE_LOG_MAX 30
-#define QDISC_PKT_LEN_MAX (1 << 20) /* 1 MiB */
struct qdisc_walker {
int stop;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index f35bd06a6bad6..b396a1606d626 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -906,6 +906,21 @@ static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)
return qdisc_skb_cb(skb)->pkt_len;
}
+#define QDISC_PKT_LEN_MAX (1 << 20) /* 1 MiB */
+
+/* Largest accounted backlog one more maximum-size packet cannot wrap
+ * the 32-bit sch->qstats.backlog past.
+ */
+#define QDISC_MAX_BACKLOG (U32_MAX - QDISC_PKT_LEN_MAX)
+
+/* Backlog close enough to U32_MAX that one more packet could wrap it.
+ * A packet-limited qdisc must drop at enqueue when this holds.
+ */
+static inline bool qdisc_backlog_at_max(const struct Qdisc *sch)
+{
+ return sch->qstats.backlog > QDISC_MAX_BACKLOG;
+}
+
static inline unsigned int qdisc_pkt_segs(const struct sk_buff *skb)
{
u32 pkt_segs = qdisc_skb_cb(skb)->pkt_segs;
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index dc93267029e70..d9779e8a5e1b7 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -706,19 +706,33 @@ static u16 cake_get_flow_quantum(struct cake_tin_data *q,
get_random_u16()) >> 16;
}
-static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
- int flow_mode, u16 flow_override, u16 host_override)
+struct cake_hash_keys {
+ u32 srchost_hash;
+ u32 dsthost_hash;
+ u32 flow_hash;
+};
+
+/* Compute the flow/host hash keys from the packet as received. Must run
+ * before skb_gso_segment(), which rewrites an encapsulated GSO packet's
+ * headers to the inner ones and would change the keys. Reads only the skb
+ * and commits no qdisc state, so it may run before admission is known.
+ */
+static void cake_hash_keys(const struct sk_buff *skb, int flow_mode,
+ u16 flow_override, u16 host_override,
+ struct cake_hash_keys *out)
{
bool hash_flows = (!flow_override && !!(flow_mode & CAKE_FLOW_FLOWS));
bool hash_hosts = (!host_override && !!(flow_mode & CAKE_FLOW_HOSTS));
bool nat_enabled = !!(flow_mode & CAKE_FLOW_NAT_FLAG);
- u32 flow_hash = 0, srchost_hash = 0, dsthost_hash = 0;
- u16 reduced_hash, srchost_idx, dsthost_idx;
struct flow_keys keys, host_keys;
bool use_skbhash = skb->l4_hash;
+ out->flow_hash = 0;
+ out->srchost_hash = 0;
+ out->dsthost_hash = 0;
+
if (unlikely(flow_mode == CAKE_FLOW_NONE))
- return 0;
+ return;
/* If both overrides are set, or we can use the SKB hash and nat mode is
* disabled, we can skip packet dissection entirely. If nat mode is
@@ -753,50 +767,62 @@ static u32 cake_hash(struct cake_tin_data *q, const struct sk_buff *skb,
switch (host_keys.control.addr_type) {
case FLOW_DISSECTOR_KEY_IPV4_ADDRS:
host_keys.addrs.v4addrs.src = 0;
- dsthost_hash = flow_hash_from_keys(&host_keys);
+ out->dsthost_hash = flow_hash_from_keys(&host_keys);
host_keys.addrs.v4addrs.src = keys.addrs.v4addrs.src;
host_keys.addrs.v4addrs.dst = 0;
- srchost_hash = flow_hash_from_keys(&host_keys);
+ out->srchost_hash = flow_hash_from_keys(&host_keys);
break;
case FLOW_DISSECTOR_KEY_IPV6_ADDRS:
memset(&host_keys.addrs.v6addrs.src, 0,
sizeof(host_keys.addrs.v6addrs.src));
- dsthost_hash = flow_hash_from_keys(&host_keys);
+ out->dsthost_hash = flow_hash_from_keys(&host_keys);
host_keys.addrs.v6addrs.src = keys.addrs.v6addrs.src;
memset(&host_keys.addrs.v6addrs.dst, 0,
sizeof(host_keys.addrs.v6addrs.dst));
- srchost_hash = flow_hash_from_keys(&host_keys);
+ out->srchost_hash = flow_hash_from_keys(&host_keys);
break;
default:
- dsthost_hash = 0;
- srchost_hash = 0;
+ out->dsthost_hash = 0;
+ out->srchost_hash = 0;
}
/* This *must* be after the above switch, since as a
* side-effect it sorts the src and dst addresses.
*/
if (hash_flows && !use_skbhash)
- flow_hash = flow_hash_from_keys(&keys);
+ out->flow_hash = flow_hash_from_keys(&keys);
skip_hash:
if (flow_override)
- flow_hash = flow_override - 1;
+ out->flow_hash = flow_override - 1;
else if (use_skbhash && (flow_mode & CAKE_FLOW_FLOWS))
- flow_hash = skb->hash;
+ out->flow_hash = skb->hash;
if (host_override) {
- dsthost_hash = host_override - 1;
- srchost_hash = host_override - 1;
+ out->dsthost_hash = host_override - 1;
+ out->srchost_hash = host_override - 1;
}
if (!(flow_mode & CAKE_FLOW_FLOWS)) {
if (flow_mode & CAKE_FLOW_SRC_IP)
- flow_hash ^= srchost_hash;
+ out->flow_hash ^= out->srchost_hash;
if (flow_mode & CAKE_FLOW_DST_IP)
- flow_hash ^= dsthost_hash;
+ out->flow_hash ^= out->dsthost_hash;
}
+}
+
+/* Resolve the keys from cake_hash_keys() into the set-associative flow
+ * table. Mutates q->tags[], the flow host indices, the way counters and
+ * the host bulk-flow counts, so run only after admission.
+ */
+static u32 cake_hash_resolve(struct cake_tin_data *q,
+ const struct cake_hash_keys *keys, int flow_mode)
+{
+ u32 flow_hash = keys->flow_hash, srchost_hash = keys->srchost_hash,
+ dsthost_hash = keys->dsthost_hash;
+ u16 reduced_hash, srchost_idx, dsthost_idx;
reduced_hash = flow_hash % CAKE_QUEUES;
@@ -1712,18 +1738,24 @@ static struct cake_tin_data *cake_select_tin(struct Qdisc *sch,
return &qd->tins[tin];
}
-static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
- struct sk_buff *skb, int flow_mode, int *qerr)
+/* Run the optional external classifier. Returns true when the packet was
+ * consumed by a terminal TC action (reason in *qerr); else *flow/*host
+ * hold the filter's overrides (0 if none).
+ */
+static bool cake_tcf_classify(struct Qdisc *sch, struct sk_buff *skb,
+ u16 *flow, u16 *host, int *qerr)
{
struct cake_sched_data *q = qdisc_priv(sch);
struct tcf_proto *filter;
struct tcf_result res;
- u16 flow = 0, host = 0;
int result;
+ *flow = 0;
+ *host = 0;
+
filter = rcu_dereference_bh(q->filter_list);
if (!filter)
- goto hash;
+ return false;
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
result = tcf_classify_qdisc(skb, filter, &res, false);
@@ -1737,17 +1769,15 @@ static u32 cake_classify(struct Qdisc *sch, struct cake_tin_data **t,
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
fallthrough;
case TC_ACT_SHOT:
- return 0;
+ return true;
}
#endif
if (TC_H_MIN(res.classid) <= CAKE_QUEUES)
- flow = TC_H_MIN(res.classid);
+ *flow = TC_H_MIN(res.classid);
if (TC_H_MAJ(res.classid) <= (CAKE_QUEUES << 16))
- host = TC_H_MAJ(res.classid) >> 16;
+ *host = TC_H_MAJ(res.classid) >> 16;
}
-hash:
- *t = cake_select_tin(sch, skb);
- return cake_hash(*t, skb, flow_mode, flow, host) + 1;
+ return false;
}
static void cake_reconfigure(struct Qdisc *sch);
@@ -1758,22 +1788,86 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
u32 idx, tin, prev_qlen, prev_backlog, drop_id;
struct cake_sched_data *q = qdisc_priv(sch);
int len = qdisc_pkt_len(skb), ret;
+ u16 flow_override, host_override;
+ struct sk_buff *segs = NULL;
+ struct cake_hash_keys keys;
struct sk_buff *ack = NULL;
ktime_t now = ktime_get();
struct cake_tin_data *b;
struct cake_flow *flow;
bool same_flow = false;
+ u64 slen = 0;
- /* choose flow to insert into */
- idx = cake_classify(sch, &b, skb, q->config->flow_mode, &ret);
- if (idx == 0) {
+ /* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)
+ * keep working at the ceiling; carry the overrides to
+ * cake_hash_keys().
+ */
+ if (cake_tcf_classify(sch, skb, &flow_override, &host_override, &ret)) {
if (ret & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch);
__qdisc_drop(skb, to_free);
return ret;
}
+
+ /* Drop before hash/shaper state so a rejected packet disturbs
+ * neither; the QDISC_PKT_LEN_MAX headroom covers one unsplit packet.
+ */
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ qdisc_qstats_overlimit(sch);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
+ /* Tin selection and key extraction must run on the unsegmented skb:
+ * skb_gso_segment() rewrites an encapsulated GSO packet's headers to
+ * the inner ones, changing the keys. Neither commits state.
+ */
+ b = cake_select_tin(sch, skb);
+ cake_hash_keys(skb, q->config->flow_mode, flow_override,
+ host_override, &keys);
+
+ if (qdisc_pkt_segs(skb) > 1 && q->config->rate_flags & CAKE_FLAG_SPLIT_GSO) {
+ struct sk_buff *nskb, *seg;
+ netdev_features_t features = netif_skb_features(skb);
+
+ segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
+ if (IS_ERR_OR_NULL(segs))
+ return qdisc_drop(skb, sch, to_free);
+
+ /* The split path accounts the segment sum, not the
+ * stab-adjusted qdisc_pkt_len(), so the top check does not
+ * bound it. Sum the list and reject it whole.
+ */
+ skb_list_walk_safe(segs, seg, nskb)
+ slen += seg->len;
+
+ if (unlikely((u64)sch->qstats.backlog + slen > QDISC_MAX_BACKLOG)) {
+ qdisc_qstats_overlimit(sch);
+ /* skb_gso_segment() moved the sock_wfree destructor
+ * to the tail segment; defer the whole list to
+ * to_free, never free it under the qdisc lock.
+ *
+ * Fraglist GSO is the exception: skb_segment_list()
+ * returns the original skb as the head with an extra
+ * ref (segs == skb), so drop the caller's ref and
+ * queue the list once, or the two drops self-link it.
+ */
+ if (unlikely(segs == skb)) {
+ tcf_set_qdisc_drop_reason(skb,
+ QDISC_DROP_OVERLIMIT);
+ consume_skb(skb);
+ return qdisc_drop_all(segs, sch, to_free);
+ }
+ __qdisc_drop_all(segs, to_free);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+ }
+
+ /* Admitted: resolve the keys and commit flow/shaper state. */
+
+ idx = cake_hash_resolve(b, &keys, q->config->flow_mode);
tin = (u32)(b - q->tins);
- idx--;
flow = &b->flows[idx];
/* ensure shaper state isn't stale */
@@ -1800,28 +1894,22 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (unlikely(len > b->max_skblen))
WRITE_ONCE(b->max_skblen, len);
- if (qdisc_pkt_segs(skb) > 1 && q->config->rate_flags & CAKE_FLAG_SPLIT_GSO) {
- struct sk_buff *segs, *nskb;
- netdev_features_t features = netif_skb_features(skb);
- unsigned int slen = 0, numsegs = 0;
-
- segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
- if (IS_ERR_OR_NULL(segs))
- return qdisc_drop(skb, sch, to_free);
+ if (segs) {
+ struct sk_buff *nskb, *seg;
+ unsigned int numsegs = 0;
- skb_list_walk_safe(segs, segs, nskb) {
- skb_mark_not_on_list(segs);
- qdisc_skb_cb(segs)->pkt_len = segs->len;
- qdisc_skb_cb(segs)->pkt_segs = 1;
- cobalt_set_enqueue_time(segs, now);
- get_cobalt_cb(segs)->adjusted_len = cake_overhead(q,
- segs);
- flow_queue_add(flow, segs);
+ skb_list_walk_safe(segs, seg, nskb) {
+ skb_mark_not_on_list(seg);
+ qdisc_skb_cb(seg)->pkt_len = seg->len;
+ qdisc_skb_cb(seg)->pkt_segs = 1;
+ cobalt_set_enqueue_time(seg, now);
+ get_cobalt_cb(seg)->adjusted_len = cake_overhead(q,
+ seg);
+ flow_queue_add(flow, seg);
qdisc_qlen_inc(sch);
numsegs++;
- slen += segs->len;
- q->buffer_used += segs->truesize;
+ q->buffer_used += seg->truesize;
WRITE_ONCE(b->packets, b->packets + 1);
}
diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
index 6aa5829d69612..9aa18438413ab 100644
--- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c
@@ -116,15 +116,17 @@ static struct sk_buff *codel_peek(struct Qdisc *sch)
static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{
- struct codel_sched_data *q;
+ struct codel_sched_data *q = qdisc_priv(sch);
- if (likely(qdisc_qlen(sch) < sch->limit)) {
- codel_set_enqueue_time(skb);
- return qdisc_enqueue_tail(skb, sch);
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
+ WRITE_ONCE(q->drop_overlimit, q->drop_overlimit + 1);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
}
- q = qdisc_priv(sch);
- WRITE_ONCE(q->drop_overlimit, q->drop_overlimit + 1);
- return qdisc_drop_reason(skb, sch, to_free, QDISC_DROP_OVERLIMIT);
+
+ codel_set_enqueue_time(skb);
+ return qdisc_enqueue_tail(skb, sch);
}
static const struct nla_policy codel_policy[TCA_CODEL_MAX + 1] = {
diff --git a/net/sched/sch_dualpi2.c b/net/sched/sch_dualpi2.c
index 4947def7c49ef..5c746e9b60cd7 100644
--- a/net/sched/sch_dualpi2.c
+++ b/net/sched/sch_dualpi2.c
@@ -392,6 +392,7 @@ static int dualpi2_enqueue_skb(struct sk_buff *skb, struct Qdisc *sch,
struct dualpi2_skb_cb *cb;
if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch)) ||
unlikely((u64)q->memory_used + skb->truesize > q->memory_limit)) {
qdisc_qstats_overlimit(sch);
if (skb_in_l_queue(skb))
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 1b6388d50967f..d5e5cd49377d8 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -29,6 +29,9 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct sk_buff **to_free)
{
+ if (unlikely(qdisc_backlog_at_max(sch)))
+ return qdisc_drop(skb, sch, to_free);
+
if (likely(sch->q.qlen < READ_ONCE(sch->limit)))
return qdisc_enqueue_tail(skb, sch);
@@ -43,6 +46,9 @@ static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch,
if (unlikely(READ_ONCE(sch->limit) == 0))
return qdisc_drop(skb, sch, to_free);
+ if (unlikely(qdisc_backlog_at_max(sch)))
+ return qdisc_drop(skb, sch, to_free);
+
if (likely(sch->q.qlen < READ_ONCE(sch->limit)))
return qdisc_enqueue_tail(skb, sch);
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 969b2510b0b86..b07732c0d8cce 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -73,22 +73,34 @@ static unsigned int fq_codel_hash(const struct fq_codel_sched_data *q,
return reciprocal_scale(skb_get_hash(skb), q->flows_cnt);
}
-static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
- int *qerr)
+/* Run the optional external classifier. Returns true when the caller must
+ * drop (a terminal TC action consumed the packet, or the result carried no
+ * class ID); the reason is then in *qerr. Else *idx is the 1-based flow
+ * index, or *do_hash asks the caller to use fq_codel_hash().
+ */
+static bool fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
+ unsigned int *idx, bool *do_hash, int *qerr)
{
struct fq_codel_sched_data *q = qdisc_priv(sch);
struct tcf_proto *filter;
struct tcf_result res;
int result;
+ *idx = 0;
+ *do_hash = false;
+
if (TC_H_MAJ(skb->priority) == sch->handle &&
TC_H_MIN(skb->priority) > 0 &&
- TC_H_MIN(skb->priority) <= q->flows_cnt)
- return TC_H_MIN(skb->priority);
+ TC_H_MIN(skb->priority) <= q->flows_cnt) {
+ *idx = TC_H_MIN(skb->priority);
+ return false;
+ }
filter = rcu_dereference_bh(q->filter_list);
- if (!filter)
- return fq_codel_hash(q, skb) + 1;
+ if (!filter) {
+ *do_hash = true;
+ return false;
+ }
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;
result = tcf_classify_qdisc(skb, filter, &res, false);
@@ -101,13 +113,16 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;
fallthrough;
case TC_ACT_SHOT:
- return 0;
+ return true;
}
#endif
- if (TC_H_MIN(res.classid) <= q->flows_cnt)
- return TC_H_MIN(res.classid);
+ if (TC_H_MIN(res.classid) > 0 &&
+ TC_H_MIN(res.classid) <= q->flows_cnt) {
+ *idx = TC_H_MIN(res.classid);
+ return false;
+ }
}
- return 0;
+ return true;
}
/* helper functions : might be changed when/if skb use a standard list_head */
@@ -187,18 +202,33 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,
{
struct fq_codel_sched_data *q = qdisc_priv(sch);
unsigned int idx, prev_backlog, prev_qlen;
+ bool do_hash = false;
struct fq_codel_flow *flow;
int ret;
unsigned int pkt_len;
bool memory_limited;
- idx = fq_codel_classify(skb, sch, &ret);
- if (idx == 0) {
+ /* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)
+ * keep working at the ceiling; only hashing is deferred below.
+ */
+ if (fq_codel_classify(skb, sch, &idx, &do_hash, &ret)) {
if (ret & __NET_XMIT_BYPASS)
qdisc_qstats_drop(sch);
__qdisc_drop(skb, to_free);
return ret;
}
+
+ /* Drop before hashing so a rejected packet disturbs no flow hash;
+ * the QDISC_PKT_LEN_MAX headroom covers one packet.
+ */
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ q->drop_overlimit++;
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
+ if (do_hash)
+ idx = fq_codel_hash(q, skb) + 1;
idx--;
codel_set_enqueue_time(skb);
diff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c
index 5982847df8f85..394f015cec36d 100644
--- a/net/sched/sch_fq_pie.c
+++ b/net/sched/sch_fq_pie.c
@@ -155,7 +155,8 @@ static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
memory_limited = q->memory_usage > q->memory_limit + skb->truesize;
/* Checks if the qdisc is full */
- if (unlikely(qdisc_qlen(sch) >= sch->limit)) {
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
q->stats.overlimit++;
goto out;
} else if (unlikely(memory_limited)) {
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
index 3b7863ffd284c..9e38f38ce923b 100644
--- a/net/sched/sch_pie.c
+++ b/net/sched/sch_pie.c
@@ -89,7 +89,8 @@ static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct pie_sched_data *q = qdisc_priv(sch);
bool enqueue = false;
- if (unlikely(qdisc_qlen(sch) >= sch->limit)) {
+ if (unlikely(qdisc_qlen(sch) >= sch->limit) ||
+ unlikely(qdisc_backlog_at_max(sch))) {
WRITE_ONCE(q->stats.overlimit, q->stats.overlimit + 1);
goto out;
}
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index d7598214270b8..e3a254f9dbdf9 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -76,6 +76,12 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,
unsigned int len;
int ret;
+ if (unlikely(qdisc_backlog_at_max(sch))) {
+ qdisc_qstats_overlimit(sch);
+ return qdisc_drop_reason(skb, sch, to_free,
+ QDISC_DROP_OVERLIMIT);
+ }
+
q->vars.qavg = red_calc_qavg(&q->parms,
&q->vars,
child->qstats.backlog);
|
| 33/3 | 2026/10/02 23:39 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10063 output: 34 thoughts: 2676 Thoughts: **KMSAN Fuzzing Evaluation for Patch Series** Okay, let's break this down. The primary goal here is to determine whether this patch series warrants KMSAN fuzzing. My initial analysis indicates that it likely doesn't *directly* need it, but let's be thorough. First, I've got a grasp of what's happening. We're looking at changes across multiple Qdisc implementations (CAKE, CoDel, DualPI2, FIFO, FQ-CoDel, FQ-PIE, PIE, RED). These patches primarily deal with backlog management, specifically integer overflow prevention, refactoring of key scheduling structures and control flow, and fixing a subtle bug in GSO processing within `sch_cake.c`. I've meticulously examined the code for potential uninitialized memory reads. `sch_cake.c`, and `sch_fq_codel.c` are the main areas of interest. In `sch_cake.c`, I've verified that all fields within `cake_hash_keys` (`flow_hash`, `srchost_hash`, and `dsthost_hash`) are either explicitly initialized to zero or consistently assigned values within each code branch. Similarly, I've confirmed that the outputs of the `cake_tcf_classify` method are also properly initialized. For `sch_fq_codel.c`, I've tracked the propagation of `idx` and `do_hash` through `fq_codel_classify` and `fq_codel_enqueue` and concluded that they are also all initialized before use. Crucially, I've checked for any data that could be leaked, or copies to user space or netlink messages that might be modified; there's nothing here that looks risky in that regard. The patch doesn't involve any operations like `nla_put`, `copy_to_user`, `put_user`, socket options, ioctls, or netlink attributes. The types of bugs this patch aims to mitigate are more about queue management issues (backlog overflow), potential memory corruption through GSO header rewriting, and ensuring proper data structure initialization and usage, particularly regarding the list walk within GSO processing. These are all critical but the underlying bugs are memory corruption, logic bugs, or potentially packet drops, which are normally caught by KASAN or standard kernel checks. Integer overflows are not uninitialized memory issues. I'll quickly double-check surrounding code with `grepper` or `read-file` to make sure nothing was missed, but my initial assessment is that KMSAN fuzzing isn't strictly necessary here. This is a low-risk patch in terms of uninitialized memory reads. |
| 34/3 | 2026/10/02 23:40 | tool | grepper |
0mArgs:{
"Expression": "cake_hash_keys",
"PathPrefix": "net/sched/sch_cake.c"
}Results: {
"Output": "net/sched/sch_cake.c=688=static u16 cake_get_flow_quantum(struct cake_tin_data *q,\n--\nnet/sched/sch_cake.c-708-\nnet/sched/sch_cake.c:709:struct cake_hash_keys {\nnet/sched/sch_cake.c-710-\tu32 srchost_hash;\n--\nnet/sched/sch_cake.c-719- */\nnet/sched/sch_cake.c:720:static void cake_hash_keys(const struct sk_buff *skb, int flow_mode,\nnet/sched/sch_cake.c-721-\t\t\t u16 flow_override, u16 host_override,\nnet/sched/sch_cake.c:722:\t\t\t struct cake_hash_keys *out)\nnet/sched/sch_cake.c-723-{\n--\nnet/sched/sch_cake.c-815-\nnet/sched/sch_cake.c:816:/* Resolve the keys from cake_hash_keys() into the set-associative flow\nnet/sched/sch_cake.c-817- * table. Mutates q-\u003etags[], the flow host indices, the way counters and\n--\nnet/sched/sch_cake.c=820=static u32 cake_hash_resolve(struct cake_tin_data *q,\nnet/sched/sch_cake.c:821:\t\t\t const struct cake_hash_keys *keys, int flow_mode)\nnet/sched/sch_cake.c-822-{\n--\nnet/sched/sch_cake.c=1785=static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n--\nnet/sched/sch_cake.c-1792-\tstruct sk_buff *segs = NULL;\nnet/sched/sch_cake.c:1793:\tstruct cake_hash_keys keys;\nnet/sched/sch_cake.c-1794-\tstruct sk_buff *ack = NULL;\n--\nnet/sched/sch_cake.c-1802-\t * keep working at the ceiling; carry the overrides to\nnet/sched/sch_cake.c:1803:\t * cake_hash_keys().\nnet/sched/sch_cake.c-1804-\t */\n--\nnet/sched/sch_cake.c-1825-\tb = cake_select_tin(sch, skb);\nnet/sched/sch_cake.c:1826:\tcake_hash_keys(skb, q-\u003econfig-\u003eflow_mode, flow_override,\nnet/sched/sch_cake.c-1827-\t\t host_override, \u0026keys);\n"
} |
| 35/3 | 2026/10/02 23:40 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 14034 output: 37 thoughts: 52 Thoughts: Okay, let's dive into this. **Examining `cake_hash_keys` in `net/sched/sch_cake.c`** Alright, I need to get crystal clear on how the `out` variable is handled within `cake_hash_keys`. No room for ambiguity here, especially given the potential performance implications. To be absolutely certain, I'm going to carefully scrutinize the `read-file` implementation, specifically focusing on the code around lines 720 to 805 of `net/sched/sch_cake.c`. I need to understand the nuances of how `out` is manipulated within that function. This requires a precise understanding of the data flow and potential race conditions, if any. I'm looking for any edge cases or unusual behavior that could impact the scheduling decisions. A thorough review of this section will give me the confidence I need. |
| 36/3 | 2026/10/02 23:40 | tool | read-file |
0mArgs:{
"File": "net/sched/sch_cake.c",
"FirstLine": 720,
"LineCount": 80
}Results: {
"Contents": " 720:\tstatic void cake_hash_keys(const struct sk_buff *skb, int flow_mode,\n 721:\t\t\t\t u16 flow_override, u16 host_override,\n 722:\t\t\t\t struct cake_hash_keys *out)\n 723:\t{\n 724:\t\tbool hash_flows = (!flow_override \u0026\u0026 !!(flow_mode \u0026 CAKE_FLOW_FLOWS));\n 725:\t\tbool hash_hosts = (!host_override \u0026\u0026 !!(flow_mode \u0026 CAKE_FLOW_HOSTS));\n 726:\t\tbool nat_enabled = !!(flow_mode \u0026 CAKE_FLOW_NAT_FLAG);\n 727:\t\tstruct flow_keys keys, host_keys;\n 728:\t\tbool use_skbhash = skb-\u003el4_hash;\n 729:\t\n 730:\t\tout-\u003eflow_hash = 0;\n 731:\t\tout-\u003esrchost_hash = 0;\n 732:\t\tout-\u003edsthost_hash = 0;\n 733:\t\n 734:\t\tif (unlikely(flow_mode == CAKE_FLOW_NONE))\n 735:\t\t\treturn;\n 736:\t\n 737:\t\t/* If both overrides are set, or we can use the SKB hash and nat mode is\n 738:\t\t * disabled, we can skip packet dissection entirely. If nat mode is\n 739:\t\t * enabled there's another check below after doing the conntrack lookup.\n 740:\t\t */\n 741:\t\tif ((!hash_flows || (use_skbhash \u0026\u0026 !nat_enabled)) \u0026\u0026 !hash_hosts)\n 742:\t\t\tgoto skip_hash;\n 743:\t\n 744:\t\tskb_flow_dissect_flow_keys(skb, \u0026keys,\n 745:\t\t\t\t\t FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL);\n 746:\t\n 747:\t\t/* Don't use the SKB hash if we change the lookup keys from conntrack */\n 748:\t\tif (nat_enabled \u0026\u0026 cake_update_flowkeys(\u0026keys, skb))\n 749:\t\t\tuse_skbhash = false;\n 750:\t\n 751:\t\t/* If we can still use the SKB hash and don't need the host hash, we can\n 752:\t\t * skip the rest of the hashing procedure\n 753:\t\t */\n 754:\t\tif (use_skbhash \u0026\u0026 !hash_hosts)\n 755:\t\t\tgoto skip_hash;\n 756:\t\n 757:\t\t/* flow_hash_from_keys() sorts the addresses by value, so we have\n 758:\t\t * to preserve their order in a separate data structure to treat\n 759:\t\t * src and dst host addresses as independently selectable.\n 760:\t\t */\n 761:\t\thost_keys = keys;\n 762:\t\thost_keys.ports.ports = 0;\n 763:\t\thost_keys.basic.ip_proto = 0;\n 764:\t\thost_keys.keyid.keyid = 0;\n 765:\t\thost_keys.tags.flow_label = 0;\n 766:\t\n 767:\t\tswitch (host_keys.control.addr_type) {\n 768:\t\tcase FLOW_DISSECTOR_KEY_IPV4_ADDRS:\n 769:\t\t\thost_keys.addrs.v4addrs.src = 0;\n 770:\t\t\tout-\u003edsthost_hash = flow_hash_from_keys(\u0026host_keys);\n 771:\t\t\thost_keys.addrs.v4addrs.src = keys.addrs.v4addrs.src;\n 772:\t\t\thost_keys.addrs.v4addrs.dst = 0;\n 773:\t\t\tout-\u003esrchost_hash = flow_hash_from_keys(\u0026host_keys);\n 774:\t\t\tbreak;\n 775:\t\n 776:\t\tcase FLOW_DISSECTOR_KEY_IPV6_ADDRS:\n 777:\t\t\tmemset(\u0026host_keys.addrs.v6addrs.src, 0,\n 778:\t\t\t sizeof(host_keys.addrs.v6addrs.src));\n 779:\t\t\tout-\u003edsthost_hash = flow_hash_from_keys(\u0026host_keys);\n 780:\t\t\thost_keys.addrs.v6addrs.src = keys.addrs.v6addrs.src;\n 781:\t\t\tmemset(\u0026host_keys.addrs.v6addrs.dst, 0,\n 782:\t\t\t sizeof(host_keys.addrs.v6addrs.dst));\n 783:\t\t\tout-\u003esrchost_hash = flow_hash_from_keys(\u0026host_keys);\n 784:\t\t\tbreak;\n 785:\t\n 786:\t\tdefault:\n 787:\t\t\tout-\u003edsthost_hash = 0;\n 788:\t\t\tout-\u003esrchost_hash = 0;\n 789:\t\t}\n 790:\t\n 791:\t\t/* This *must* be after the above switch, since as a\n 792:\t\t * side-effect it sorts the src and dst addresses.\n 793:\t\t */\n 794:\t\tif (hash_flows \u0026\u0026 !use_skbhash)\n 795:\t\t\tout-\u003eflow_hash = flow_hash_from_keys(\u0026keys);\n 796:\t\n 797:\tskip_hash:\n 798:\t\tif (flow_override)\n 799:\t\t\tout-\u003eflow_hash = flow_override - 1;\n"
} |
| 37/3 | 2026/10/02 23:40 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15768 output: 37 thoughts: 16 Thoughts: Okay, here's the summary, assuming I'm an expert in the relevant field: **Digging Deeper: Focusing on Lines 799-825** Alright, I'm going back to the text, and I need to hone in on lines 799-825. I need to understand the nuances of this specific section. Let's see what critical information can be gleaned from these lines. I am ready to identify the patterns, contradictions, and areas for potential refinement. It's time to analyze the key arguments within this section and consider how they fit within the larger scope of the work. |
| 38/3 | 2026/10/02 23:40 | tool | read-file |
0mArgs:{
"File": "net/sched/sch_cake.c",
"FirstLine": 798,
"LineCount": 40
}Results: {
"Contents": " 798:\t\tif (flow_override)\n 799:\t\t\tout-\u003eflow_hash = flow_override - 1;\n 800:\t\telse if (use_skbhash \u0026\u0026 (flow_mode \u0026 CAKE_FLOW_FLOWS))\n 801:\t\t\tout-\u003eflow_hash = skb-\u003ehash;\n 802:\t\tif (host_override) {\n 803:\t\t\tout-\u003edsthost_hash = host_override - 1;\n 804:\t\t\tout-\u003esrchost_hash = host_override - 1;\n 805:\t\t}\n 806:\t\n 807:\t\tif (!(flow_mode \u0026 CAKE_FLOW_FLOWS)) {\n 808:\t\t\tif (flow_mode \u0026 CAKE_FLOW_SRC_IP)\n 809:\t\t\t\tout-\u003eflow_hash ^= out-\u003esrchost_hash;\n 810:\t\n 811:\t\t\tif (flow_mode \u0026 CAKE_FLOW_DST_IP)\n 812:\t\t\t\tout-\u003eflow_hash ^= out-\u003edsthost_hash;\n 813:\t\t}\n 814:\t}\n 815:\t\n 816:\t/* Resolve the keys from cake_hash_keys() into the set-associative flow\n 817:\t * table. Mutates q-\u003etags[], the flow host indices, the way counters and\n 818:\t * the host bulk-flow counts, so run only after admission.\n 819:\t */\n 820:\tstatic u32 cake_hash_resolve(struct cake_tin_data *q,\n 821:\t\t\t\t const struct cake_hash_keys *keys, int flow_mode)\n 822:\t{\n 823:\t\tu32 flow_hash = keys-\u003eflow_hash, srchost_hash = keys-\u003esrchost_hash,\n 824:\t\t dsthost_hash = keys-\u003edsthost_hash;\n 825:\t\tu16 reduced_hash, srchost_idx, dsthost_idx;\n 826:\t\n 827:\t\treduced_hash = flow_hash % CAKE_QUEUES;\n 828:\t\n 829:\t\t/* set-associative hashing */\n 830:\t\t/* fast path if no hash collision (direct lookup succeeds) */\n 831:\t\tif (likely(q-\u003etags[reduced_hash] == flow_hash \u0026\u0026\n 832:\t\t\t q-\u003eflows[reduced_hash].set)) {\n 833:\t\t\tq-\u003eway_directs++;\n 834:\t\t} else {\n 835:\t\t\tu32 inner_hash = reduced_hash % CAKE_SET_WAYS;\n 836:\t\t\tu32 outer_hash = reduced_hash - inner_hash;\n 837:\t\t\tbool allocate_src = false;\n"
} |
| 39/3 | 2026/10/02 23:40 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16669 output: 40 thoughts: 43 Thoughts: Okay, let's break this down. **Initial Assessment of Cake_hash_keys and FQ_Codel Implementation** Right, so `cake_hash_keys` seems to be initializing all the `out->*` variables right at the beginning. That's a good starting point, keeps things predictable. Now, I need to understand how those values are then being used in the context of the larger FQ-Codel implementation, specifically, around lines 200-240. That region should reveal how the hashing is actually interacting with the queuing mechanism. Let me dig into that section now. I'm expecting to see the actual enqueue/dequeue operations and the impact of the hash keys on those. |
| 40/3 | 2026/10/02 23:40 | tool | read-file |
0mArgs:{
"File": "net/sched/sch_fq_codel.c",
"FirstLine": 200,
"LineCount": 50
}Results: {
"Contents": " 200:\tstatic int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,\n 201:\t\t\t\t struct sk_buff **to_free)\n 202:\t{\n 203:\t\tstruct fq_codel_sched_data *q = qdisc_priv(sch);\n 204:\t\tunsigned int idx, prev_backlog, prev_qlen;\n 205:\t\tbool do_hash = false;\n 206:\t\tstruct fq_codel_flow *flow;\n 207:\t\tint ret;\n 208:\t\tunsigned int pkt_len;\n 209:\t\tbool memory_limited;\n 210:\t\n 211:\t\t/* Classify first so terminal TC actions (STOLEN/QUEUED/TRAP/SHOT)\n 212:\t\t * keep working at the ceiling; only hashing is deferred below.\n 213:\t\t */\n 214:\t\tif (fq_codel_classify(skb, sch, \u0026idx, \u0026do_hash, \u0026ret)) {\n 215:\t\t\tif (ret \u0026 __NET_XMIT_BYPASS)\n 216:\t\t\t\tqdisc_qstats_drop(sch);\n 217:\t\t\t__qdisc_drop(skb, to_free);\n 218:\t\t\treturn ret;\n 219:\t\t}\n 220:\t\n 221:\t\t/* Drop before hashing so a rejected packet disturbs no flow hash;\n 222:\t\t * the QDISC_PKT_LEN_MAX headroom covers one packet.\n 223:\t\t */\n 224:\t\tif (unlikely(qdisc_backlog_at_max(sch))) {\n 225:\t\t\tq-\u003edrop_overlimit++;\n 226:\t\t\treturn qdisc_drop_reason(skb, sch, to_free,\n 227:\t\t\t\t\t\t QDISC_DROP_OVERLIMIT);\n 228:\t\t}\n 229:\t\n 230:\t\tif (do_hash)\n 231:\t\t\tidx = fq_codel_hash(q, skb) + 1;\n 232:\t\tidx--;\n 233:\t\n 234:\t\tcodel_set_enqueue_time(skb);\n 235:\t\tflow = \u0026q-\u003eflows[idx];\n 236:\t\tflow_queue_add(flow, skb);\n 237:\t\tWRITE_ONCE(q-\u003ebacklogs[idx], q-\u003ebacklogs[idx] + qdisc_pkt_len(skb));\n 238:\t\tqdisc_qstats_backlog_inc(sch, skb);\n 239:\t\n 240:\t\tif (list_empty(\u0026flow-\u003eflowchain)) {\n 241:\t\t\tlist_add_tail(\u0026flow-\u003eflowchain, \u0026q-\u003enew_flows);\n 242:\t\t\tq-\u003enew_flow_count++;\n 243:\t\t\tWRITE_ONCE(flow-\u003edeficit, q-\u003equantum);\n 244:\t\t}\n 245:\t\tget_codel_cb(skb)-\u003emem_usage = is_skb_wmem(skb) ? 0 : skb-\u003etruesize;\n 246:\t\tq-\u003ememory_usage += get_codel_cb(skb)-\u003emem_usage;\n 247:\t\tmemory_limited = q-\u003ememory_usage \u003e q-\u003ememory_limit;\n 248:\t\tqdisc_qlen_inc(sch);\n 249:\t\tif (sch-\u003eq.qlen \u003c= sch-\u003elimit \u0026\u0026 !memory_limited)\n"
} |
| 41/3 | 2026/10/02 23:40 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17809 output: 39 thoughts: 15 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience and presented in the first person: **Re-Examining `fq_codel_classify`** Alright, I'm circling back to `fq_codel_classify`. I need to revisit the functionality and internal logic of this key component. Let me make sure I'm still grasping all the nuances, especially any recent modifications or potential areas for improvement that I might have overlooked. It's time to analyze the current status of the `fq_codel_classify` operation. I'm going to carefully consider the logic, ensuring that it still aligns with the performance goals. |
| 42/3 | 2026/10/02 23:40 | tool | read-file |
0mArgs:{
"File": "net/sched/sch_fq_codel.c",
"FirstLine": 80,
"LineCount": 50
}Results: {
"Contents": " 80:\t */\n 81:\tstatic bool fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,\n 82:\t\t\t\t unsigned int *idx, bool *do_hash, int *qerr)\n 83:\t{\n 84:\t\tstruct fq_codel_sched_data *q = qdisc_priv(sch);\n 85:\t\tstruct tcf_proto *filter;\n 86:\t\tstruct tcf_result res;\n 87:\t\tint result;\n 88:\t\n 89:\t\t*idx = 0;\n 90:\t\t*do_hash = false;\n 91:\t\n 92:\t\tif (TC_H_MAJ(skb-\u003epriority) == sch-\u003ehandle \u0026\u0026\n 93:\t\t TC_H_MIN(skb-\u003epriority) \u003e 0 \u0026\u0026\n 94:\t\t TC_H_MIN(skb-\u003epriority) \u003c= q-\u003eflows_cnt) {\n 95:\t\t\t*idx = TC_H_MIN(skb-\u003epriority);\n 96:\t\t\treturn false;\n 97:\t\t}\n 98:\t\n 99:\t\tfilter = rcu_dereference_bh(q-\u003efilter_list);\n 100:\t\tif (!filter) {\n 101:\t\t\t*do_hash = true;\n 102:\t\t\treturn false;\n 103:\t\t}\n 104:\t\n 105:\t\t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_BYPASS;\n 106:\t\tresult = tcf_classify_qdisc(skb, filter, \u0026res, false);\n 107:\t\tif (result \u003e= 0) {\n 108:\t#ifdef CONFIG_NET_CLS_ACT\n 109:\t\t\tswitch (result) {\n 110:\t\t\tcase TC_ACT_STOLEN:\n 111:\t\t\tcase TC_ACT_QUEUED:\n 112:\t\t\tcase TC_ACT_TRAP:\n 113:\t\t\t\t*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;\n 114:\t\t\t\tfallthrough;\n 115:\t\t\tcase TC_ACT_SHOT:\n 116:\t\t\t\treturn true;\n 117:\t\t\t}\n 118:\t#endif\n 119:\t\t\tif (TC_H_MIN(res.classid) \u003e 0 \u0026\u0026\n 120:\t\t\t TC_H_MIN(res.classid) \u003c= q-\u003eflows_cnt) {\n 121:\t\t\t\t*idx = TC_H_MIN(res.classid);\n 122:\t\t\t\treturn false;\n 123:\t\t\t}\n 124:\t\t}\n 125:\t\treturn true;\n 126:\t}\n 127:\t\n 128:\t/* helper functions : might be changed when/if skb use a standard list_head */\n 129:\t\n"
} |
| 43/3 | 2026/10/02 23:40 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18747 output: 383 thoughts: 1038 Thoughts: **KMSAN Assessment: A Quick Review** Okay, let's step through this. First, I need to verify what parts of the kernel are touched. It looks like we're primarily dealing with changes in various packet scheduler (qdisc) code. I see modifications in `include/net/pkt_sched.h`, `include/net/sch_generic.h`, and then a slew of scheduler-specific files: `sch_cake.c`, `sch_codel.c`, `sch_dualpi2.c`, `sch_fifo.c`, `sch_fq_codel.c`, `sch_fq_pie.c`, `sch_pie.c`, and `sch_red.c`. The core of the patch seems to be several related changes: First, a global safeguard against integer overflow in the `sch->qstats.backlog` counter, implemented as `qdisc_backlog_at_max()`. This check is being added across a range of qdiscs. Second, there's some refactoring in `sch_cake.c` and `sch_fq_codel.c` related to packet hashing and classification to handle GSO segmentation and drop conditions more robustly. Lastly, there is correction for skb list iteration in `cake_enqueue`. Now, the important part: KMSAN. I need to establish whether this patch introduces any risks related to uninitialized memory reads or information leaks to user space. Looking closely, I can confirm that there's no data being copied to user space, no reading of uninitialized memory, no modifications to struct padding or uninitialized fields, and no expansion of buffer read boundaries into uninitialized regions. All the new local variables (`struct cake_hash_keys keys`, `idx`, `do_hash`, `flow_override`, `host_override`) are fully initialized before any read. The potential issues would be logic bugs, memory errors like reference leaks or double frees, or out-of-bounds accesses on `skb` segments. This is where KASAN (Kernel Address Sanitizer) comes in. It would easily detect any memory issues. Debug configurations are standard, so KASAN is already enabled. So, let's go through the four `NeedsKMSAN` criteria to be thorough. 1. **Kernel structures sent to user space where fields or structure padding might not be fully initialized/zeroed:** No. 2. **Conditional logic or branching that depends on potentially uninitialized variables or struct fields:** No. All output parameters and structs are explicitly initialized prior to reads or branches. 3. **Allocation or initialization of complex data structures where uninitialized fields could be read later in reachable code paths:** No, nothing new here. 4. **Bounds checks, lengths, or logic in a way that allows surrounding code to access uninitialized bytes of existing buffers:** No. We're checking the backlog bytes, not buffer offsets. Therefore, `NeedsKMSAN` must be `false` here. To summarize the patch again: it adds the backlog check and does some refactoring in flow hash/classification code to deal with drops and GSO, but the changes do not introduce any KMSAN concerns. This patch does not have any risk of uninitialized memory usage. I'm ready to invoke `set-results`. |
| 44/3 | 2026/10/02 23:40 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch series addresses 32-bit integer overflow of the qdisc backlog counter (`sch-\u003eqstats.backlog`) across various packet schedulers (cake, codel, dualpi2, fifo, fq_codel, fq_pie, pie, red) by introducing `qdisc_backlog_at_max()` and enforcing packet drop at admission ceiling. In addition, it restructures packet hashing and TC filter classification in `sch_cake` and `sch_fq_codel` so that hashing occurs on the unsegmented packet and no qdisc state is mutated before packet admission is confirmed.\n\nRegarding memory sanitization:\n1. KMSAN applicability: There are no kernel-to-userspace info-leaks, padding leaks, or uninitialized memory reads introduced. All new local variables and structures (`struct cake_hash_keys keys`, `flow_override`, `host_override`, `do_hash`, `idx`) are explicitly initialized to zero or well-defined values immediately upon function entry and prior to being read or passed along. No data is copied to userspace via netlink, socket options, or ioctl.\n2. KASAN applicability: Any memory safety risks in this patch revolve around skb lifetime management and list traversal (e.g., GSO segmentation error paths, `consume_skb(skb)` vs `qdisc_drop_all(segs, ...)` handling fraglist GSO in `sch_cake`). These potential bugs (such as double-free, use-after-free, or skb leaks) are directly covered by KASAN and standard kernel debug facilities.\n\nTherefore, dedicated KMSAN fuzzing is not justified for these changes.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch series addresses 32-bit integer overflow of the qdisc backlog counter (`sch-\u003eqstats.backlog`) across various packet schedulers (cake, codel, dualpi2, fifo, fq_codel, fq_pie, pie, red) by introducing `qdisc_backlog_at_max()` and enforcing packet drop at admission ceiling. In addition, it restructures packet hashing and TC filter classification in `sch_cake` and `sch_fq_codel` so that hashing occurs on the unsegmented packet and no qdisc state is mutated before packet admission is confirmed.\n\nRegarding memory sanitization:\n1. KMSAN applicability: There are no kernel-to-userspace info-leaks, padding leaks, or uninitialized memory reads introduced. All new local variables and structures (`struct cake_hash_keys keys`, `flow_override`, `host_override`, `do_hash`, `idx`) are explicitly initialized to zero or well-defined values immediately upon function entry and prior to being read or passed along. No data is copied to userspace via netlink, socket options, or ioctl.\n2. KASAN applicability: Any memory safety risks in this patch revolve around skb lifetime management and list traversal (e.g., GSO segmentation error paths, `consume_skb(skb)` vs `qdisc_drop_all(segs, ...)` handling fraglist GSO in `sch_cake`). These potential bugs (such as double-free, use-after-free, or skb leaks) are directly covered by KASAN and standard kernel debug facilities.\n\nTherefore, dedicated KMSAN fuzzing is not justified for these changes.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|