AI Trajectory


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

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies `msgbuf.c` in the Broadcom FullMAC WLAN driver (brcmfmac). This file implements the MSGBUF protocol, which is exclusively used by the PCIe interface of the driver (`pcie.c`). Since QEMU does not emulate Broadcom Wi-Fi PCIe hardware, and syzkaller's PCI fuzzer cannot emulate the complex DMA rings and firmware interactions required to reach this code, it is unreachable in a standard virtualized environment.",
  "WorthFuzzing": false
}

1/1 2026/08/03 07:56 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 26552c27a2d015722e6c3e67bfab10fe1565cc64\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Mon Aug 3 07:56:33 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c\nindex ba1ce1552e0f4..959659bfea99e 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c\n@@ -24,7 +24,6 @@\n #include \"bus.h\"\n #include \"tracepoint.h\"\n \n-\n #define MSGBUF_IOCTL_RESP_TIMEOUT\t\tmsecs_to_jiffies(2000)\n \n #define MSGBUF_TYPE_GEN_STATUS\t\t\t0x1\n@@ -291,7 +290,6 @@ struct brcmf_msgbuf_pktids {\n \n static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf);\n \n-\n static struct brcmf_msgbuf_pktids *\n brcmf_msgbuf_init_pktids(u32 nr_array_entries,\n \t\t\t enum dma_data_direction direction)\n@@ -314,7 +312,6 @@ brcmf_msgbuf_init_pktids(u32 nr_array_entries,\n \treturn pktids;\n }\n \n-\n static int\n brcmf_msgbuf_alloc_pktid(struct device *dev,\n \t\t\t struct brcmf_msgbuf_pktids *pktids,\n@@ -362,7 +359,6 @@ brcmf_msgbuf_alloc_pktid(struct device *dev,\n \treturn 0;\n }\n \n-\n static struct sk_buff *\n brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids,\n \t\t       u32 idx)\n@@ -390,7 +386,6 @@ brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids,\n \treturn NULL;\n }\n \n-\n static void\n brcmf_msgbuf_release_array(struct device *dev,\n \t\t\t   struct brcmf_msgbuf_pktids *pktids)\n@@ -416,7 +411,6 @@ brcmf_msgbuf_release_array(struct device *dev,\n \tkfree(pktids);\n }\n \n-\n static void brcmf_msgbuf_release_pktids(struct brcmf_msgbuf *msgbuf)\n {\n \tif (msgbuf-\u003erx_pktids)\n@@ -427,7 +421,6 @@ static void brcmf_msgbuf_release_pktids(struct brcmf_msgbuf *msgbuf)\n \t\t\t\t\t   msgbuf-\u003etx_pktids);\n }\n \n-\n static int brcmf_msgbuf_tx_ioctl(struct brcmf_pub *drvr, int ifidx,\n \t\t\t\t uint cmd, void *buf, uint len)\n {\n@@ -473,7 +466,6 @@ static int brcmf_msgbuf_tx_ioctl(struct brcmf_pub *drvr, int ifidx,\n \treturn err;\n }\n \n-\n static int brcmf_msgbuf_ioctl_resp_wait(struct brcmf_msgbuf *msgbuf)\n {\n \treturn wait_event_timeout(msgbuf-\u003eioctl_resp_wait,\n@@ -481,14 +473,12 @@ static int brcmf_msgbuf_ioctl_resp_wait(struct brcmf_msgbuf *msgbuf)\n \t\t\t\t  MSGBUF_IOCTL_RESP_TIMEOUT);\n }\n \n-\n static void brcmf_msgbuf_ioctl_resp_wake(struct brcmf_msgbuf *msgbuf)\n {\n \tmsgbuf-\u003ectl_completed = true;\n \twake_up(\u0026msgbuf-\u003eioctl_resp_wait);\n }\n \n-\n static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx,\n \t\t\t\t   uint cmd, void *buf, uint len, int *fwerr)\n {\n@@ -526,14 +516,12 @@ static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx,\n \treturn 0;\n }\n \n-\n static int brcmf_msgbuf_set_dcmd(struct brcmf_pub *drvr, int ifidx,\n \t\t\t\t uint cmd, void *buf, uint len, int *fwerr)\n {\n \treturn brcmf_msgbuf_query_dcmd(drvr, ifidx, cmd, buf, len, fwerr);\n }\n \n-\n static int brcmf_msgbuf_hdrpull(struct brcmf_pub *drvr, bool do_fws,\n \t\t\t\tstruct sk_buff *skb, struct brcmf_if **ifp)\n {\n@@ -560,6 +548,27 @@ brcmf_msgbuf_remove_flowring(struct brcmf_msgbuf *msgbuf, u16 flowid)\n \tbrcmf_flowring_delete(msgbuf-\u003eflow, flowid);\n }\n \n+static bool brcmf_msgbuf_get_flowid(struct brcmf_msgbuf *msgbuf,\n+\t\t\t\t    u16 flow_ring_id, u16 *flowid)\n+{\n+\tu32 id = flow_ring_id;\n+\n+\tif (id \u003c BRCMF_H2D_MSGRING_FLOWRING_IDSTART) {\n+\t\tbphy_err(msgbuf-\u003edrvr, \"invalid flowring id %u\\n\",\n+\t\t\t flow_ring_id);\n+\t\treturn false;\n+\t}\n+\n+\tid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;\n+\tif (id \u003e= msgbuf-\u003emax_flowrings) {\n+\t\tbphy_err(msgbuf-\u003edrvr, \"invalid flowring id %u\\n\",\n+\t\t\t flow_ring_id);\n+\t\treturn false;\n+\t}\n+\n+\t*flowid = id;\n+\treturn true;\n+}\n \n static struct brcmf_msgbuf_work_item *\n brcmf_msgbuf_dequeue_work(struct brcmf_msgbuf *msgbuf)\n@@ -578,7 +587,6 @@ brcmf_msgbuf_dequeue_work(struct brcmf_msgbuf *msgbuf)\n \treturn work;\n }\n \n-\n static u32\n brcmf_msgbuf_flowring_create_worker(struct brcmf_msgbuf *msgbuf,\n \t\t\t\t    struct brcmf_msgbuf_work_item *work)\n@@ -647,7 +655,6 @@ brcmf_msgbuf_flowring_create_worker(struct brcmf_msgbuf *msgbuf,\n \treturn flowid;\n }\n \n-\n static void brcmf_msgbuf_flowring_worker(struct work_struct *work)\n {\n \tstruct brcmf_msgbuf *msgbuf;\n@@ -661,7 +668,6 @@ static void brcmf_msgbuf_flowring_worker(struct work_struct *work)\n \t}\n }\n \n-\n static u32 brcmf_msgbuf_flowring_create(struct brcmf_msgbuf *msgbuf, int ifidx,\n \t\t\t\t\tstruct sk_buff *skb)\n {\n@@ -694,7 +700,6 @@ static u32 brcmf_msgbuf_flowring_create(struct brcmf_msgbuf *msgbuf, int ifidx,\n \treturn flowid;\n }\n \n-\n static void brcmf_msgbuf_txflow(struct brcmf_msgbuf *msgbuf, u16 flowid)\n {\n \tstruct brcmf_flowring *flow = msgbuf-\u003eflow;\n@@ -768,7 +773,6 @@ static void brcmf_msgbuf_txflow(struct brcmf_msgbuf *msgbuf, u16 flowid)\n \tbrcmf_commonring_unlock(commonring);\n }\n \n-\n static void brcmf_msgbuf_txflow_worker(struct work_struct *worker)\n {\n \tstruct brcmf_msgbuf *msgbuf;\n@@ -781,7 +785,6 @@ static void brcmf_msgbuf_txflow_worker(struct work_struct *worker)\n \t}\n }\n \n-\n static int brcmf_msgbuf_schedule_txdata(struct brcmf_msgbuf *msgbuf, u32 flowid,\n \t\t\t\t\tbool force)\n {\n@@ -796,7 +799,6 @@ static int brcmf_msgbuf_schedule_txdata(struct brcmf_msgbuf *msgbuf, u32 flowid,\n \treturn 0;\n }\n \n-\n static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx,\n \t\t\t\t      struct sk_buff *skb)\n {\n@@ -824,7 +826,6 @@ static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx,\n \treturn 0;\n }\n \n-\n static void\n brcmf_msgbuf_configure_addr_mode(struct brcmf_pub *drvr, int ifidx,\n \t\t\t\t enum proto_addr_mode addr_mode)\n@@ -834,7 +835,6 @@ brcmf_msgbuf_configure_addr_mode(struct brcmf_pub *drvr, int ifidx,\n \tbrcmf_flowring_configure_addr_mode(msgbuf-\u003eflow, ifidx, addr_mode);\n }\n \n-\n static void\n brcmf_msgbuf_delete_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])\n {\n@@ -843,7 +843,6 @@ brcmf_msgbuf_delete_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])\n \tbrcmf_flowring_delete_peer(msgbuf-\u003eflow, ifidx, peer);\n }\n \n-\n static void\n brcmf_msgbuf_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])\n {\n@@ -852,7 +851,6 @@ brcmf_msgbuf_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])\n \tbrcmf_flowring_add_tdls_peer(msgbuf-\u003eflow, ifidx, peer);\n }\n \n-\n static void\n brcmf_msgbuf_process_ioctl_complete(struct brcmf_msgbuf *msgbuf, void *buf)\n {\n@@ -872,7 +870,6 @@ brcmf_msgbuf_process_ioctl_complete(struct brcmf_msgbuf *msgbuf, void *buf)\n \tbrcmf_msgbuf_rxbuf_ioctlresp_post(msgbuf);\n }\n \n-\n static void\n brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)\n {\n@@ -880,17 +877,23 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)\n \tstruct msgbuf_tx_status *tx_status;\n \tu32 idx;\n \tstruct sk_buff *skb;\n+\tu16 flow_ring_id;\n \tu16 flowid;\n \n \ttx_status = (struct msgbuf_tx_status *)buf;\n \tidx = le32_to_cpu(tx_status-\u003emsg.request_id) - 1;\n-\tflowid = le16_to_cpu(tx_status-\u003ecompl_hdr.flow_ring_id);\n-\tflowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;\n+\tflow_ring_id = le16_to_cpu(tx_status-\u003ecompl_hdr.flow_ring_id);\n \tskb = brcmf_msgbuf_get_pktid(msgbuf-\u003edrvr-\u003ebus_if-\u003edev,\n \t\t\t\t     msgbuf-\u003etx_pktids, idx);\n \tif (!skb)\n \t\treturn;\n \n+\tif (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, \u0026flowid)) {\n+\t\tbrcmf_txfinalize(brcmf_get_ifp(msgbuf-\u003edrvr, tx_status-\u003emsg.ifidx),\n+\t\t\t\t skb, false);\n+\t\treturn;\n+\t}\n+\n \tset_bit(flowid, msgbuf-\u003etxstatus_done_map);\n \tcommonring = msgbuf-\u003eflowrings[flowid];\n \tatomic_dec(\u0026commonring-\u003eoutstanding_tx);\n@@ -899,7 +902,6 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)\n \t\t\t skb, true);\n }\n \n-\n static u32 brcmf_msgbuf_rxbuf_data_post(struct brcmf_msgbuf *msgbuf, u32 count)\n {\n \tstruct brcmf_pub *drvr = msgbuf-\u003edrvr;\n@@ -977,7 +979,6 @@ static u32 brcmf_msgbuf_rxbuf_data_post(struct brcmf_msgbuf *msgbuf, u32 count)\n \treturn i;\n }\n \n-\n static void\n brcmf_msgbuf_rxbuf_data_fill(struct brcmf_msgbuf *msgbuf)\n {\n@@ -995,7 +996,6 @@ brcmf_msgbuf_rxbuf_data_fill(struct brcmf_msgbuf *msgbuf)\n \t}\n }\n \n-\n static void\n brcmf_msgbuf_update_rxbufpost_count(struct brcmf_msgbuf *msgbuf, u16 rxcnt)\n {\n@@ -1005,7 +1005,6 @@ brcmf_msgbuf_update_rxbufpost_count(struct brcmf_msgbuf *msgbuf, u16 rxcnt)\n \t\tbrcmf_msgbuf_rxbuf_data_fill(msgbuf);\n }\n \n-\n static u32\n brcmf_msgbuf_rxbuf_ctrl_post(struct brcmf_msgbuf *msgbuf, bool event_buf,\n \t\t\t     u32 count)\n@@ -1079,7 +1078,6 @@ brcmf_msgbuf_rxbuf_ctrl_post(struct brcmf_msgbuf *msgbuf, bool event_buf,\n \treturn i;\n }\n \n-\n static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf)\n {\n \tu32 count;\n@@ -1089,7 +1087,6 @@ static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf)\n \tmsgbuf-\u003ecur_ioctlrespbuf += count;\n }\n \n-\n static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf)\n {\n \tu32 count;\n@@ -1099,7 +1096,6 @@ static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf)\n \tmsgbuf-\u003ecur_eventbuf += count;\n }\n \n-\n static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf)\n {\n \tstruct brcmf_pub *drvr = msgbuf-\u003edrvr;\n@@ -1142,7 +1138,6 @@ static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf)\n \tbrcmu_pkt_buf_free_skb(skb);\n }\n \n-\n static void\n brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf)\n {\n@@ -1237,13 +1232,16 @@ brcmf_msgbuf_process_flow_ring_create_response(struct brcmf_msgbuf *msgbuf,\n \tstruct msgbuf_flowring_create_resp *flowring_create_resp;\n \tu16 status;\n \tu16 flowid;\n+\tu16 flow_ring_id;\n \n \tflowring_create_resp = (struct msgbuf_flowring_create_resp *)buf;\n \n-\tflowid = le16_to_cpu(flowring_create_resp-\u003ecompl_hdr.flow_ring_id);\n-\tflowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;\n+\tflow_ring_id = le16_to_cpu(flowring_create_resp-\u003ecompl_hdr.flow_ring_id);\n \tstatus =  le16_to_cpu(flowring_create_resp-\u003ecompl_hdr.status);\n \n+\tif (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, \u0026flowid))\n+\t\treturn;\n+\n \tif (status) {\n \t\tbphy_err(drvr, \"Flowring creation failed, code %d\\n\", status);\n \t\tbrcmf_msgbuf_remove_flowring(msgbuf, flowid);\n@@ -1257,7 +1255,6 @@ brcmf_msgbuf_process_flow_ring_create_response(struct brcmf_msgbuf *msgbuf,\n \tbrcmf_msgbuf_schedule_txdata(msgbuf, flowid, true);\n }\n \n-\n static void\n brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,\n \t\t\t\t\t       void *buf)\n@@ -1266,13 +1263,16 @@ brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,\n \tstruct msgbuf_flowring_delete_resp *flowring_delete_resp;\n \tu16 status;\n \tu16 flowid;\n+\tu16 flow_ring_id;\n \n \tflowring_delete_resp = (struct msgbuf_flowring_delete_resp *)buf;\n \n-\tflowid = le16_to_cpu(flowring_delete_resp-\u003ecompl_hdr.flow_ring_id);\n-\tflowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;\n+\tflow_ring_id = le16_to_cpu(flowring_delete_resp-\u003ecompl_hdr.flow_ring_id);\n \tstatus =  le16_to_cpu(flowring_delete_resp-\u003ecompl_hdr.status);\n \n+\tif (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, \u0026flowid))\n+\t\treturn;\n+\n \tif (status) {\n \t\tbphy_err(drvr, \"Flowring deletion failed, code %d\\n\", status);\n \t\tbrcmf_flowring_delete(msgbuf-\u003eflow, flowid);\n@@ -1284,7 +1284,6 @@ brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,\n \tbrcmf_msgbuf_remove_flowring(msgbuf, flowid);\n }\n \n-\n static void brcmf_msgbuf_process_msgtype(struct brcmf_msgbuf *msgbuf, void *buf)\n {\n \tstruct brcmf_pub *drvr = msgbuf-\u003edrvr;\n@@ -1333,7 +1332,6 @@ static void brcmf_msgbuf_process_msgtype(struct brcmf_msgbuf *msgbuf, void *buf)\n \t}\n }\n \n-\n static void brcmf_msgbuf_process_rx(struct brcmf_msgbuf *msgbuf,\n \t\t\t\t    struct brcmf_commonring *commonring)\n {\n@@ -1365,7 +1363,6 @@ static void brcmf_msgbuf_process_rx(struct brcmf_msgbuf *msgbuf,\n \t\tgoto again;\n }\n \n-\n int brcmf_proto_msgbuf_rx_trigger(struct device *dev)\n {\n \tstruct brcmf_bus *bus_if = dev_get_drvdata(dev);\n@@ -1397,7 +1394,6 @@ int brcmf_proto_msgbuf_rx_trigger(struct device *dev)\n \treturn 0;\n }\n \n-\n void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid)\n {\n \tstruct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr-\u003eproto-\u003epd;\n@@ -1613,7 +1609,6 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)\n \tif (!msgbuf-\u003eflow)\n \t\tgoto fail;\n \n-\n \tbrcmf_dbg(MSGBUF, \"Feeding buffers, rx data %d, rx event %d, rx ioctl resp %d\\n\",\n \t\t  msgbuf-\u003emax_rxbufpost, msgbuf-\u003emax_eventbuf,\n \t\t  msgbuf-\u003emax_ioctlrespbuf);\n@@ -1653,7 +1648,6 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)\n \treturn -ENOMEM;\n }\n \n-\n void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr)\n {\n \tstruct brcmf_msgbuf *msgbuf;\n"
}

2/1 2026/08/03 07:56 agent patch-evaluator
0m Model:
best-expensive

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies `msgbuf.c` in the Broadcom FullMAC WLAN driver (brcmfmac). This file implements the MSGBUF protocol, which is exclusively used by the PCIe interface of the driver (`pcie.c`). Since QEMU does not emulate Broadcom Wi-Fi PCIe hardware, and syzkaller's PCI fuzzer cannot emulate the complex DMA rings and firmware interactions required to reach this code, it is unreachable in a standard virtualized environment.",
  "WorthFuzzing": false
}

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

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

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

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

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


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

Prompt:
For your convenience, here is the diff of the changes:
commit 26552c27a2d015722e6c3e67bfab10fe1565cc64
Author: syz-cluster <triage@syzkaller.com>
Date:   Mon Aug 3 07:56:33 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
index ba1ce1552e0f4..959659bfea99e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c
@@ -24,7 +24,6 @@
 #include "bus.h"
 #include "tracepoint.h"
 
-
 #define MSGBUF_IOCTL_RESP_TIMEOUT		msecs_to_jiffies(2000)
 
 #define MSGBUF_TYPE_GEN_STATUS			0x1
@@ -291,7 +290,6 @@ struct brcmf_msgbuf_pktids {
 
 static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf);
 
-
 static struct brcmf_msgbuf_pktids *
 brcmf_msgbuf_init_pktids(u32 nr_array_entries,
 			 enum dma_data_direction direction)
@@ -314,7 +312,6 @@ brcmf_msgbuf_init_pktids(u32 nr_array_entries,
 	return pktids;
 }
 
-
 static int
 brcmf_msgbuf_alloc_pktid(struct device *dev,
 			 struct brcmf_msgbuf_pktids *pktids,
@@ -362,7 +359,6 @@ brcmf_msgbuf_alloc_pktid(struct device *dev,
 	return 0;
 }
 
-
 static struct sk_buff *
 brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids,
 		       u32 idx)
@@ -390,7 +386,6 @@ brcmf_msgbuf_get_pktid(struct device *dev, struct brcmf_msgbuf_pktids *pktids,
 	return NULL;
 }
 
-
 static void
 brcmf_msgbuf_release_array(struct device *dev,
 			   struct brcmf_msgbuf_pktids *pktids)
@@ -416,7 +411,6 @@ brcmf_msgbuf_release_array(struct device *dev,
 	kfree(pktids);
 }
 
-
 static void brcmf_msgbuf_release_pktids(struct brcmf_msgbuf *msgbuf)
 {
 	if (msgbuf->rx_pktids)
@@ -427,7 +421,6 @@ static void brcmf_msgbuf_release_pktids(struct brcmf_msgbuf *msgbuf)
 					   msgbuf->tx_pktids);
 }
 
-
 static int brcmf_msgbuf_tx_ioctl(struct brcmf_pub *drvr, int ifidx,
 				 uint cmd, void *buf, uint len)
 {
@@ -473,7 +466,6 @@ static int brcmf_msgbuf_tx_ioctl(struct brcmf_pub *drvr, int ifidx,
 	return err;
 }
 
-
 static int brcmf_msgbuf_ioctl_resp_wait(struct brcmf_msgbuf *msgbuf)
 {
 	return wait_event_timeout(msgbuf->ioctl_resp_wait,
@@ -481,14 +473,12 @@ static int brcmf_msgbuf_ioctl_resp_wait(struct brcmf_msgbuf *msgbuf)
 				  MSGBUF_IOCTL_RESP_TIMEOUT);
 }
 
-
 static void brcmf_msgbuf_ioctl_resp_wake(struct brcmf_msgbuf *msgbuf)
 {
 	msgbuf->ctl_completed = true;
 	wake_up(&msgbuf->ioctl_resp_wait);
 }
 
-
 static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx,
 				   uint cmd, void *buf, uint len, int *fwerr)
 {
@@ -526,14 +516,12 @@ static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx,
 	return 0;
 }
 
-
 static int brcmf_msgbuf_set_dcmd(struct brcmf_pub *drvr, int ifidx,
 				 uint cmd, void *buf, uint len, int *fwerr)
 {
 	return brcmf_msgbuf_query_dcmd(drvr, ifidx, cmd, buf, len, fwerr);
 }
 
-
 static int brcmf_msgbuf_hdrpull(struct brcmf_pub *drvr, bool do_fws,
 				struct sk_buff *skb, struct brcmf_if **ifp)
 {
@@ -560,6 +548,27 @@ brcmf_msgbuf_remove_flowring(struct brcmf_msgbuf *msgbuf, u16 flowid)
 	brcmf_flowring_delete(msgbuf->flow, flowid);
 }
 
+static bool brcmf_msgbuf_get_flowid(struct brcmf_msgbuf *msgbuf,
+				    u16 flow_ring_id, u16 *flowid)
+{
+	u32 id = flow_ring_id;
+
+	if (id < BRCMF_H2D_MSGRING_FLOWRING_IDSTART) {
+		bphy_err(msgbuf->drvr, "invalid flowring id %u\n",
+			 flow_ring_id);
+		return false;
+	}
+
+	id -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;
+	if (id >= msgbuf->max_flowrings) {
+		bphy_err(msgbuf->drvr, "invalid flowring id %u\n",
+			 flow_ring_id);
+		return false;
+	}
+
+	*flowid = id;
+	return true;
+}
 
 static struct brcmf_msgbuf_work_item *
 brcmf_msgbuf_dequeue_work(struct brcmf_msgbuf *msgbuf)
@@ -578,7 +587,6 @@ brcmf_msgbuf_dequeue_work(struct brcmf_msgbuf *msgbuf)
 	return work;
 }
 
-
 static u32
 brcmf_msgbuf_flowring_create_worker(struct brcmf_msgbuf *msgbuf,
 				    struct brcmf_msgbuf_work_item *work)
@@ -647,7 +655,6 @@ brcmf_msgbuf_flowring_create_worker(struct brcmf_msgbuf *msgbuf,
 	return flowid;
 }
 
-
 static void brcmf_msgbuf_flowring_worker(struct work_struct *work)
 {
 	struct brcmf_msgbuf *msgbuf;
@@ -661,7 +668,6 @@ static void brcmf_msgbuf_flowring_worker(struct work_struct *work)
 	}
 }
 
-
 static u32 brcmf_msgbuf_flowring_create(struct brcmf_msgbuf *msgbuf, int ifidx,
 					struct sk_buff *skb)
 {
@@ -694,7 +700,6 @@ static u32 brcmf_msgbuf_flowring_create(struct brcmf_msgbuf *msgbuf, int ifidx,
 	return flowid;
 }
 
-
 static void brcmf_msgbuf_txflow(struct brcmf_msgbuf *msgbuf, u16 flowid)
 {
 	struct brcmf_flowring *flow = msgbuf->flow;
@@ -768,7 +773,6 @@ static void brcmf_msgbuf_txflow(struct brcmf_msgbuf *msgbuf, u16 flowid)
 	brcmf_commonring_unlock(commonring);
 }
 
-
 static void brcmf_msgbuf_txflow_worker(struct work_struct *worker)
 {
 	struct brcmf_msgbuf *msgbuf;
@@ -781,7 +785,6 @@ static void brcmf_msgbuf_txflow_worker(struct work_struct *worker)
 	}
 }
 
-
 static int brcmf_msgbuf_schedule_txdata(struct brcmf_msgbuf *msgbuf, u32 flowid,
 					bool force)
 {
@@ -796,7 +799,6 @@ static int brcmf_msgbuf_schedule_txdata(struct brcmf_msgbuf *msgbuf, u32 flowid,
 	return 0;
 }
 
-
 static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx,
 				      struct sk_buff *skb)
 {
@@ -824,7 +826,6 @@ static int brcmf_msgbuf_tx_queue_data(struct brcmf_pub *drvr, int ifidx,
 	return 0;
 }
 
-
 static void
 brcmf_msgbuf_configure_addr_mode(struct brcmf_pub *drvr, int ifidx,
 				 enum proto_addr_mode addr_mode)
@@ -834,7 +835,6 @@ brcmf_msgbuf_configure_addr_mode(struct brcmf_pub *drvr, int ifidx,
 	brcmf_flowring_configure_addr_mode(msgbuf->flow, ifidx, addr_mode);
 }
 
-
 static void
 brcmf_msgbuf_delete_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])
 {
@@ -843,7 +843,6 @@ brcmf_msgbuf_delete_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])
 	brcmf_flowring_delete_peer(msgbuf->flow, ifidx, peer);
 }
 
-
 static void
 brcmf_msgbuf_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])
 {
@@ -852,7 +851,6 @@ brcmf_msgbuf_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN])
 	brcmf_flowring_add_tdls_peer(msgbuf->flow, ifidx, peer);
 }
 
-
 static void
 brcmf_msgbuf_process_ioctl_complete(struct brcmf_msgbuf *msgbuf, void *buf)
 {
@@ -872,7 +870,6 @@ brcmf_msgbuf_process_ioctl_complete(struct brcmf_msgbuf *msgbuf, void *buf)
 	brcmf_msgbuf_rxbuf_ioctlresp_post(msgbuf);
 }
 
-
 static void
 brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)
 {
@@ -880,17 +877,23 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)
 	struct msgbuf_tx_status *tx_status;
 	u32 idx;
 	struct sk_buff *skb;
+	u16 flow_ring_id;
 	u16 flowid;
 
 	tx_status = (struct msgbuf_tx_status *)buf;
 	idx = le32_to_cpu(tx_status->msg.request_id) - 1;
-	flowid = le16_to_cpu(tx_status->compl_hdr.flow_ring_id);
-	flowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;
+	flow_ring_id = le16_to_cpu(tx_status->compl_hdr.flow_ring_id);
 	skb = brcmf_msgbuf_get_pktid(msgbuf->drvr->bus_if->dev,
 				     msgbuf->tx_pktids, idx);
 	if (!skb)
 		return;
 
+	if (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, &flowid)) {
+		brcmf_txfinalize(brcmf_get_ifp(msgbuf->drvr, tx_status->msg.ifidx),
+				 skb, false);
+		return;
+	}
+
 	set_bit(flowid, msgbuf->txstatus_done_map);
 	commonring = msgbuf->flowrings[flowid];
 	atomic_dec(&commonring->outstanding_tx);
@@ -899,7 +902,6 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)
 			 skb, true);
 }
 
-
 static u32 brcmf_msgbuf_rxbuf_data_post(struct brcmf_msgbuf *msgbuf, u32 count)
 {
 	struct brcmf_pub *drvr = msgbuf->drvr;
@@ -977,7 +979,6 @@ static u32 brcmf_msgbuf_rxbuf_data_post(struct brcmf_msgbuf *msgbuf, u32 count)
 	return i;
 }
 
-
 static void
 brcmf_msgbuf_rxbuf_data_fill(struct brcmf_msgbuf *msgbuf)
 {
@@ -995,7 +996,6 @@ brcmf_msgbuf_rxbuf_data_fill(struct brcmf_msgbuf *msgbuf)
 	}
 }
 
-
 static void
 brcmf_msgbuf_update_rxbufpost_count(struct brcmf_msgbuf *msgbuf, u16 rxcnt)
 {
@@ -1005,7 +1005,6 @@ brcmf_msgbuf_update_rxbufpost_count(struct brcmf_msgbuf *msgbuf, u16 rxcnt)
 		brcmf_msgbuf_rxbuf_data_fill(msgbuf);
 }
 
-
 static u32
 brcmf_msgbuf_rxbuf_ctrl_post(struct brcmf_msgbuf *msgbuf, bool event_buf,
 			     u32 count)
@@ -1079,7 +1078,6 @@ brcmf_msgbuf_rxbuf_ctrl_post(struct brcmf_msgbuf *msgbuf, bool event_buf,
 	return i;
 }
 
-
 static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf)
 {
 	u32 count;
@@ -1089,7 +1087,6 @@ static void brcmf_msgbuf_rxbuf_ioctlresp_post(struct brcmf_msgbuf *msgbuf)
 	msgbuf->cur_ioctlrespbuf += count;
 }
 
-
 static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf)
 {
 	u32 count;
@@ -1099,7 +1096,6 @@ static void brcmf_msgbuf_rxbuf_event_post(struct brcmf_msgbuf *msgbuf)
 	msgbuf->cur_eventbuf += count;
 }
 
-
 static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf)
 {
 	struct brcmf_pub *drvr = msgbuf->drvr;
@@ -1142,7 +1138,6 @@ static void brcmf_msgbuf_process_event(struct brcmf_msgbuf *msgbuf, void *buf)
 	brcmu_pkt_buf_free_skb(skb);
 }
 
-
 static void
 brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf)
 {
@@ -1237,13 +1232,16 @@ brcmf_msgbuf_process_flow_ring_create_response(struct brcmf_msgbuf *msgbuf,
 	struct msgbuf_flowring_create_resp *flowring_create_resp;
 	u16 status;
 	u16 flowid;
+	u16 flow_ring_id;
 
 	flowring_create_resp = (struct msgbuf_flowring_create_resp *)buf;
 
-	flowid = le16_to_cpu(flowring_create_resp->compl_hdr.flow_ring_id);
-	flowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;
+	flow_ring_id = le16_to_cpu(flowring_create_resp->compl_hdr.flow_ring_id);
 	status =  le16_to_cpu(flowring_create_resp->compl_hdr.status);
 
+	if (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, &flowid))
+		return;
+
 	if (status) {
 		bphy_err(drvr, "Flowring creation failed, code %d\n", status);
 		brcmf_msgbuf_remove_flowring(msgbuf, flowid);
@@ -1257,7 +1255,6 @@ brcmf_msgbuf_process_flow_ring_create_response(struct brcmf_msgbuf *msgbuf,
 	brcmf_msgbuf_schedule_txdata(msgbuf, flowid, true);
 }
 
-
 static void
 brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,
 					       void *buf)
@@ -1266,13 +1263,16 @@ brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,
 	struct msgbuf_flowring_delete_resp *flowring_delete_resp;
 	u16 status;
 	u16 flowid;
+	u16 flow_ring_id;
 
 	flowring_delete_resp = (struct msgbuf_flowring_delete_resp *)buf;
 
-	flowid = le16_to_cpu(flowring_delete_resp->compl_hdr.flow_ring_id);
-	flowid -= BRCMF_H2D_MSGRING_FLOWRING_IDSTART;
+	flow_ring_id = le16_to_cpu(flowring_delete_resp->compl_hdr.flow_ring_id);
 	status =  le16_to_cpu(flowring_delete_resp->compl_hdr.status);
 
+	if (!brcmf_msgbuf_get_flowid(msgbuf, flow_ring_id, &flowid))
+		return;
+
 	if (status) {
 		bphy_err(drvr, "Flowring deletion failed, code %d\n", status);
 		brcmf_flowring_delete(msgbuf->flow, flowid);
@@ -1284,7 +1284,6 @@ brcmf_msgbuf_process_flow_ring_delete_response(struct brcmf_msgbuf *msgbuf,
 	brcmf_msgbuf_remove_flowring(msgbuf, flowid);
 }
 
-
 static void brcmf_msgbuf_process_msgtype(struct brcmf_msgbuf *msgbuf, void *buf)
 {
 	struct brcmf_pub *drvr = msgbuf->drvr;
@@ -1333,7 +1332,6 @@ static void brcmf_msgbuf_process_msgtype(struct brcmf_msgbuf *msgbuf, void *buf)
 	}
 }
 
-
 static void brcmf_msgbuf_process_rx(struct brcmf_msgbuf *msgbuf,
 				    struct brcmf_commonring *commonring)
 {
@@ -1365,7 +1363,6 @@ static void brcmf_msgbuf_process_rx(struct brcmf_msgbuf *msgbuf,
 		goto again;
 }
 
-
 int brcmf_proto_msgbuf_rx_trigger(struct device *dev)
 {
 	struct brcmf_bus *bus_if = dev_get_drvdata(dev);
@@ -1397,7 +1394,6 @@ int brcmf_proto_msgbuf_rx_trigger(struct device *dev)
 	return 0;
 }
 
-
 void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid)
 {
 	struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd;
@@ -1613,7 +1609,6 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
 	if (!msgbuf->flow)
 		goto fail;
 
-
 	brcmf_dbg(MSGBUF, "Feeding buffers, rx data %d, rx event %d, rx ioctl resp %d\n",
 		  msgbuf->max_rxbufpost, msgbuf->max_eventbuf,
 		  msgbuf->max_ioctlrespbuf);
@@ -1653,7 +1648,6 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
 	return -ENOMEM;
 }
 
-
 void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr)
 {
 	struct brcmf_msgbuf *msgbuf;

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

Args:
null

Results:
null

Tokens:
							input: 7397
							output: 49
							thoughts: 380
						

Thoughts:
**Analyzing a WLAN Driver Patch for Virtualization Feasibility**

Okay, so I've got a patch here that's making a functional change to `brcmfmac` – specifically, in `msgbuf.c`. It's introducing `brcmf_msgbuf_get_flowid` to validate `flow_ring_id` before calculating `flowid`. Smart move, preventing a potential out-of-bounds access or an invalid flowid situation within the Broadcom FullMAC WLAN driver. We're replacing the direct calculation with a safer check using the new function. Good defensive programming, always appreciated.

The critical question now is, can I reasonably test this in a virtualized environment? QEMU is my go-to, of course. This `brcmfmac` driver supports SDIO, USB, and PCIE. Since I can work with USB devices in QEMU, either through passthrough or even dummy USB devices – like what syzkaller uses for fuzzing – that's a promising avenue.

My hunch is that fuzzing is the best approach. Syzkaller has a USB fuzzer which is great. So, I need to check if Syzkaller already targets brcmfmac over USB. Specifically, let's look at `drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c`. I need to confirm whether it registers a USB driver. If it does, and Syzkaller is indeed hitting it, then this patch is certainly testable within my current setup. If not, I may have to figure out a new USB setup or attempt SDIO. PCIE is probably out of the question for this quick test.



4/2 2026/08/03 07:56 tool grepper
0m Args:
{
  "Expression": "brcmf_usb_probe",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1165=static const struct brcmf_bus_ops brcmf_usb_bus_ops = {\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1175-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1176:static void brcmf_usb_probe_phase2(struct device *dev, int ret,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1177-\t\t\t\t   struct brcmf_fw_request *fwreq)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1224=brcmf_usb_prepare_fw_request(struct brcmf_usbdev_info *devinfo)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1243-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1244:static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1245-\t\t\t      enum brcmf_fwvendor fwvid)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1308-\t/* request firmware here */\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1309:\tret = brcmf_fw_get_firmwares(dev, fwreq, brcmf_usb_probe_phase2);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1310-\tif (ret) {\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1344=static int\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1345:brcmf_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1346-{\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1445-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1446:\tret = brcmf_usb_probe_cb(devinfo, id-\u003edriver_info);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1447-\tif (ret)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1514=static int brcmf_usb_reset_resume(struct usb_interface *intf)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1526-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1527:\tret = brcmf_fw_get_firmwares(\u0026usb-\u003edev, fwreq, brcmf_usb_probe_phase2);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1528-\tif (ret \u003c 0)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1568=static struct usb_driver brcmf_usbdrvr = {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1569-\t.name = KBUILD_MODNAME,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1570:\t.probe = brcmf_usb_probe,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1571-\t.disconnect = brcmf_usb_disconnect,\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 9341
							output: 52
							thoughts: 61
						

Thoughts:
**USB Driver Fuzzing: A Quick Mental Checklist**

Okay, so Syzkaller's got that dummy USB fuzzer, and the first step is always registering the USB driver. Classic. But then the thought hits me: I need to verify how `msgbuf.c` factors in. Is it something specific to the PCIe bus, or does the USB driver end up utilizing it? That's the question. I need to get this straight if I'm going to get this fuzzing task off the ground. Alright, let's drill down and see how `msgbuf.c` fits into the broader picture. Gotta clarify this to ensure I understand the impact.



6/2 2026/08/03 07:56 tool grepper
0m Args:
{
  "Expression": "brcmf_proto_msgbuf_attach",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c=1518=static void brcmf_msgbuf_debugfs_create(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1522-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c:1523:int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1524-{\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h=32=void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h:33:int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h-34-void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h-35-#else\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h:36:static inline int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h-37-{\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=20=int brcmf_proto_attach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-35-\t} else if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:36:\t\tif (brcmf_proto_msgbuf_attach(drvr))\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-37-\t\t\tgoto fail;\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 10265
							output: 51
							thoughts: 52
						

Thoughts:
Okay, here's my interpretation of those thoughts, framed as my own mental process, given my expertise:

**Checking Protocol Type for Message Buffer Attachment**

Alright, so the core question is *if* a specific structure, `drvr`, is attached when the protocol type is set to `BRCMF_PROTO_MSGBUF`. I need to figure out the connection between `drvr->bus_if` and its `proto_type` field. It seems that this attachment is conditionally dependent on that protocol type. Makes sense. I'm used to seeing similar structures where different underlying bus interfaces dictate how data is handled.

The next obvious step is to backtrack. I need to understand *which* buses are configuring the `proto_type` to `BRCMF_PROTO_MSGBUF`. Understanding that will shed light on what kind of situations or hardware contexts this attachment is relevant for. Knowing which buses do *not* use this specific protocol, and why, could be even more insightful. This helps me understand the overall design and potentially spot any vulnerabilities or inefficiencies. I'll need to trace through the code and quickly determine where that variable is being set, and in what context.



8/2 2026/08/03 07:56 tool grepper
0m Args:
{
  "Expression": "BRCMF_PROTO_MSGBUF",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h=51=enum brcmf_bus_protocol_type {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-52-\tBRCMF_PROTO_BCDC,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:53:\tBRCMF_PROTO_MSGBUF\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-54-};\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c=2443=brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2519-\tbus-\u003eops = \u0026brcmf_pcie_bus_ops;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:2520:\tbus-\u003eproto_type = BRCMF_PROTO_MSGBUF;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2521-\tbus-\u003echip = devinfo-\u003ecoreid;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=20=int brcmf_proto_attach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-34-\t\t\tgoto fail;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:35:\t} else if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-36-\t\tif (brcmf_proto_msgbuf_attach(drvr))\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=59=void brcmf_proto_detach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-65-\t\t\tbrcmf_proto_bcdc_detach(drvr);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:66:\t\telse if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-67-\t\t\tbrcmf_proto_msgbuf_detach(drvr);\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 11379
							output: 48
							thoughts: 105
						

Thoughts:
**Investigating the `BRCMF_PROTO_MSGBUF` Assignment**

Okay, so it looks like `BRCMF_PROTO_MSGBUF` is being assigned *specifically* in `pcie.c`. That's interesting, and it immediately makes me want to broaden the scope of my investigation. Let's see if this is the *only* place it's being set. I'll need to check the codebase. Specifically, the file path `drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c` has that line: `bus->proto_type = BRCMF_PROTO_MSGBUF;`. Now I'm wondering, since it's the only one I've seen so far, what about `usb.c`? What does *it* do with the `proto_type` variable? Time to dig in there and see.



10/2 2026/08/03 07:56 tool grepper
0m Args:
{
  "Expression": "proto_type",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1244=static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1269-\tbus-\u003eops = \u0026brcmf_usb_bus_ops;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1270:\tbus-\u003eproto_type = BRCMF_PROTO_BCDC;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1271-\tbus-\u003efwvid = fwvid;\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 11941
							output: 49
							thoughts: 44
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Investigating Broadcom Firmware Protocol Usage**

Alright, let's see... so, from the code I was just reviewing, `usb.c` explicitly uses `BRCMF_PROTO_BCDC`. That's not unexpected; BCDC is a common choice for USB-based Broadcom WiFi adapters, right? Now, the real question is whether the SDIO driver, `sdio.c`, is also employing the BCDC protocol. Logically, it's a strong possibility. It's often used where we need to maintain compatibility and commonality. But let's not assume, let's confirm it definitively. I should probably go and double-check that `sdio.c` file and see if that's the case. It's important to have a clear mental model of the protocol usage across these different interface implementations.



12/2 2026/08/03 07:56 tool grepper
0m Error:
no matches

Args:
{
  "Expression": "proto_type",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c"
}

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

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

Args:
null

Results:
null

Tokens:
							input: 12247
							output: 45
							thoughts: 18
						

Thoughts:
Here's a summary of my thought process:

**Diving into the SDIO Implementation**

Okay, so I need to understand how the SDIO bus protocol is being handled here. Let's start by digging into `sdio.c`. My primary interest at this moment is to pinpoint how the `bus->proto_type` variable is being used within the code. This will tell me what specific SDIO protocol features are being implemented. Understanding the `proto_type` assignment and usage is critical to determine the current state and capabilities of the driver with respect to SDIO.



14/2 2026/08/03 07:57 tool grepper
0m Args:
{
  "Expression": "proto_type",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c=1041=static int brcmf_ops_sdio_probe(struct sdio_func *func,\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c-1087-\tbus_if-\u003ebus_priv.sdio = sdiodev;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c:1088:\tbus_if-\u003eproto_type = BRCMF_PROTO_BCDC;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c-1089-\tbus_if-\u003efwvid = id-\u003edriver_data;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h=142=struct brcmf_bus_stats {\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-150- * @bus_priv: pointer to private bus device.\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:151: * @proto_type: protocol type, bcdc or msgbuf\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-152- * @dev: device pointer of bus device.\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h=166=struct brcmf_bus {\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-171-\t} bus_priv;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:172:\tenum brcmf_bus_protocol_type proto_type;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-173-\tstruct device *dev;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c=2443=brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2519-\tbus-\u003eops = \u0026brcmf_pcie_bus_ops;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:2520:\tbus-\u003eproto_type = BRCMF_PROTO_MSGBUF;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2521-\tbus-\u003echip = devinfo-\u003ecoreid;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=20=int brcmf_proto_attach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-31-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:32:\tif (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_BCDC) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-33-\t\tif (brcmf_proto_bcdc_attach(drvr))\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-34-\t\t\tgoto fail;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:35:\t} else if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-36-\t\tif (brcmf_proto_msgbuf_attach(drvr))\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-39-\t\tbphy_err(drvr, \"Unsupported proto type %d\\n\",\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:40:\t\t\t drvr-\u003ebus_if-\u003eproto_type);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-41-\t\tgoto fail;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=59=void brcmf_proto_detach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-63-\tif (drvr-\u003eproto) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:64:\t\tif (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_BCDC)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-65-\t\t\tbrcmf_proto_bcdc_detach(drvr);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:66:\t\telse if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-67-\t\t\tbrcmf_proto_msgbuf_detach(drvr);\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c=1244=static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1269-\tbus-\u003eops = \u0026brcmf_usb_bus_ops;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:1270:\tbus-\u003eproto_type = BRCMF_PROTO_BCDC;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c-1271-\tbus-\u003efwvid = fwvid;\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 14132
							output: 53
							thoughts: 372
						

Thoughts:
**My Assessment of the `brcmfmac` Driver for Fuzzing**

Okay, so I'm focusing on `BRCMF_PROTO_MSGBUF`. It looks like this is exclusively used within `pcie.c`. And further, this `msgbuf.c` file is only engaged when the driver is bound to a PCIe device, which makes it particularly interesting.

The task is to determine if this patch is "WorthFuzzing". The prompt specifically tells me to return `false` if the changes are limited to vendor-specific drivers that require physical PCIe hardware not emulated in standard QEMU. That's the key question: does `brcmfmac` fall into that category?

Yes, absolutely. `brcmfmac` is a Broadcom FullMAC WLAN driver. The PCIe variant, the one that's relevant here, depends on an actual Broadcom Wi-Fi chip, something like a BCM43602 or BCM4350, connected via PCIe. QEMU, as far as I understand, doesn't emulate these Broadcom Wi-Fi PCIe cards. Therefore, I can't even get started fuzzing this specific interface with a virtual machine, and QEMU won't allow me to.

Syzkaller can't effectively fuzz the PCIe interface of this driver because it lacks the necessary capabilities to emulate the specific registers and DMA rings of this Broadcom Wi-Fi chip. While Syzkaller has some PCI fuzzing capabilities, they are mostly for generic devices or virtio, and not complex vendor-specific Wi-Fi MACs.

Wait a moment, I need to check my facts here. Syzkaller *does* have a PCI fuzzer, but its capabilities are limited to the PCI configuration space and BARs. This doesn't go deep enough into emulating device firmware or DMA rings to reach the point where the `msgbuf.c` file processes messages from the firmware.

I really need to confirm if `msgbuf.c` processes DMA rings at all. If it does, then the problem is even worse.



16/2 2026/08/03 07:57 tool grepper
0m Args:
{
  "Expression": "brcmf_msgbuf_process_txstatus",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c=873=static void\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c:874:brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-875-{\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c=1287=static void brcmf_msgbuf_process_msgtype(struct brcmf_msgbuf *msgbuf, void *buf)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1322-\t\tbrcmf_dbg(MSGBUF, \"MSGBUF_TYPE_TX_STATUS\\n\");\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c:1323:\t\tbrcmf_msgbuf_process_txstatus(msgbuf, buf);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1324-\t\tbreak;\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 15348
							output: 54
							thoughts: 46
						

Thoughts:
Okay, here's my interpretation of that code flow, presented as my own mental processing:

**Understanding the brcmf_msgbuf Message Handling**

Right, so I'm looking at this `brcmf_msgbuf_process_msgtype` function, and I'm immediately tracing its call path to understand its purpose within the broader architecture. It's clear that it's deeply involved in the handling of messages within the brcmf framework, specifically messages that are being *received*.

The call stack confirms my suspicion: `brcmf_msgbuf_process_msgtype` is *triggered* from `brcmf_msgbuf_process_rx`. This `process_rx` function is likely the central processing point for incoming data. It's the "receiver" in this specific subsystem.

And the even bigger picture reveals that `brcmf_msgbuf_process_rx`, the core "receiver" function, is itself invoked from `brcmf_proto_msgbuf_rx_trigger`. Ah, so `rx_trigger` is what's kicking off the whole inbound message handling process. This trigger function probably manages the lower-level interaction with the hardware and signals the availability of new data, then this incoming data is ultimately *processed* by `brcmf_msgbuf_process_msgtype`.

So, in essence, I understand the sequence: `rx_trigger` initiates the process, `process_rx` receives/manages the data, and finally, `process_msgtype` is responsible for handling the specific *type* of incoming message. This is critical for distinguishing different control, data, and other types of messages. Makes perfect sense. Now I can dive deeper into each of these functions to understand exactly how the message parsing and handling is done.



18/2 2026/08/03 07:57 tool grepper
0m Args:
{
  "Expression": "brcmf_proto_msgbuf_rx_trigger",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c=1335=static void brcmf_msgbuf_process_rx(struct brcmf_msgbuf *msgbuf,\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1365-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c:1366:int brcmf_proto_msgbuf_rx_trigger(struct device *dev)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c-1367-{\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h=26=struct msgbuf_buf_addr {\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h-30-\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h:31:int brcmf_proto_msgbuf_rx_trigger(struct device *dev);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.h-32-void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u16 flowid);\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c=941=static irqreturn_t brcmf_pcie_isr_thread(int irq, void *arg)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-955-\t\t\tif (devinfo-\u003estate == BRCMFMAC_PCIE_STATE_UP)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:956:\t\t\t\tbrcmf_proto_msgbuf_rx_trigger(\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-957-\t\t\t\t\t\t\t\u0026devinfo-\u003epdev-\u003edev);\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 16401
							output: 51
							thoughts: 384
						

Thoughts:
**Unreachable Code Analysis**

Okay, here's the situation. This code I'm looking at, the `brcmf_msgbuf_process_txstatus` function, is called from `brcmf_pcie_isr_thread`. That immediately tells me this is specific to the PCIe implementation of the Broadcom Wi-Fi driver. Given QEMU's limitations and syzkaller's current PCI fuzzing capabilities, I can't see a way to trigger this code path in a virtualized setup. The PCI fuzzer can't meaningfully interact with the DMA rings, interrupt handling, or even get the device into the required `BRCMFMAC_PCIE_STATE_UP` state and set up the necessary DMA rings and firmware to reach this function.

I did briefly wonder if mac80211_hwsim might be a backdoor, but no, that's a software simulator for mac80211, and `brcmfmac` is a FullMAC driver that uses cfg80211 and its own firmware. No luck there. There's no known software emulation for the `brcmfmac` PCIe setup, either.

Let's do a sanity check. Can `brcmfmac` be fuzzed at all? Well, syzkaller does have a USB fuzzer, and that would give us some coverage of `brcmfmac`. However, USB uses `BRCMF_PROTO_BCDC`, and we're looking at `msgbuf.c`, which is directly tied to `BRCMF_PROTO_MSGBUF`. The USB path won't touch this code. The patch specifically modifies `msgbuf.c`, which is exclusively used by `pcie.c`.

To solidify this, let's verify that `BRCMF_PROTO_MSGBUF` is not used elsewhere. That will cement the conclusion that this code path is absolutely unreachable in a virtualized environment.



20/2 2026/08/03 07:57 tool grepper
0m Args:
{
  "Expression": "BRCMF_PROTO_MSGBUF",
  "PathPrefix": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/"
}

Results:
{
  "Output": "drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h=51=enum brcmf_bus_protocol_type {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-52-\tBRCMF_PROTO_BCDC,\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h:53:\tBRCMF_PROTO_MSGBUF\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h-54-};\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c=2443=brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2519-\tbus-\u003eops = \u0026brcmf_pcie_bus_ops;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:2520:\tbus-\u003eproto_type = BRCMF_PROTO_MSGBUF;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c-2521-\tbus-\u003echip = devinfo-\u003ecoreid;\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=20=int brcmf_proto_attach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-34-\t\t\tgoto fail;\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:35:\t} else if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF) {\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-36-\t\tif (brcmf_proto_msgbuf_attach(drvr))\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c=59=void brcmf_proto_detach(struct brcmf_pub *drvr)\n--\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-65-\t\t\tbrcmf_proto_bcdc_detach(drvr);\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c:66:\t\telse if (drvr-\u003ebus_if-\u003eproto_type == BRCMF_PROTO_MSGBUF)\ndrivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.c-67-\t\t\tbrcmf_proto_msgbuf_detach(drvr);\n"
}

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

Args:
null

Results:
null

Tokens:
							input: 18018
							output: 130
							thoughts: 181
						

Thoughts:
**WorthFuzzing Decision for the Broadcom Wi-Fi PCIe Driver**

Okay, let's break this down. It's clear that the code setting `BRCMF_PROTO_MSGBUF` is *only* found within `pcie.c`. And that's specifically the PCIe driver for Broadcom Wi-Fi chips. Here's where it gets interesting: QEMU, as we know, doesn't emulate Broadcom Wi-Fi PCIe cards. Therefore, by its nature, this code path is simply inaccessible within a virtualized QEMU environment.

Now, reviewing the prompt's explicit instruction, it nails this scenario: "Return WorthFuzzing=false if the patch only contains code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU."

This is a textbook match. The `brcmfmac` PCIe driver *unequivocally* requires a physical Broadcom Wi-Fi PCIe card. The emulation just isn't there in standard QEMU. So, after this analysis, it's clear: `WorthFuzzing=false`. The fuzzing effort would be unproductive because it can't reach this code.



22/2 2026/08/03 07:57 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies `msgbuf.c` in the Broadcom FullMAC WLAN driver (brcmfmac). This file implements the MSGBUF protocol, which is exclusively used by the PCIe interface of the driver (`pcie.c`). Since QEMU does not emulate Broadcom Wi-Fi PCIe hardware, and syzkaller's PCI fuzzer cannot emulate the complex DMA rings and firmware interactions required to reach this code, it is unreachable in a standard virtualized environment.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies `msgbuf.c` in the Broadcom FullMAC WLAN driver (brcmfmac). This file implements the MSGBUF protocol, which is exclusively used by the PCIe interface of the driver (`pcie.c`). Since QEMU does not emulate Broadcom Wi-Fi PCIe hardware, and syzkaller's PCI fuzzer cannot emulate the complex DMA rings and firmware interactions required to reach this code, it is unreachable in a standard virtualized environment.",
  "WorthFuzzing": false
}

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