| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/06/26 17:41 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"NFC",
"NFC_NCI",
"NFC_VIRTUAL_NCI"
],
"FocusSymbols": [
"nci_core_init_rsp_packet_v1",
"nci_core_init_rsp_packet_v2",
"nci_core_init_rsp_packet"
],
"Reasoning": "The patch adds bounds checking to NCI core init response packet parsing. This is functional code reachable via virtual NCI devices, so it should be fuzzed to ensure the new checks correctly prevent out-of-bounds accesses without breaking valid packets.",
"WorthFuzzing": true
} |
| 1/1 | 2026/06/26 17:41 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 0516c81b7443c0a48940cefaf1b681e68c152221\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Jun 26 17:41:56 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c\nindex 9eeb862825c5fe..6b2fa6bdbd14bd 100644\n--- a/net/nfc/nci/rsp.c\n+++ b/net/nfc/nci/rsp.c\n@@ -50,11 +50,25 @@ static u8 nci_core_init_rsp_packet_v1(struct nci_dev *ndev,\n \tconst struct nci_core_init_rsp_1 *rsp_1 = (void *)skb-\u003edata;\n \tconst struct nci_core_init_rsp_2 *rsp_2;\n \n+\tif (skb-\u003elen \u003c sizeof(*rsp_1))\n+\t\treturn NCI_STATUS_SYNTAX_ERROR;\n+\n \tpr_debug(\"status 0x%x\\n\", rsp_1-\u003estatus);\n \n \tif (rsp_1-\u003estatus != NCI_STATUS_OK)\n \t\treturn rsp_1-\u003estatus;\n \n+\t/*\n+\t * supported_rf_interfaces[] and the trailing nci_core_init_rsp_2 are\n+\t * addressed using the on-wire (unclamped) interface count, so the\n+\t * response must be long enough for both before any of it is parsed or\n+\t * stored into @ndev - otherwise a truncated response would leave\n+\t * ndev-\u003enum_supported_rf_interfaces holding the unclamped count.\n+\t */\n+\tif (skb-\u003elen \u003c sizeof(*rsp_1) +\n+\t rsp_1-\u003enum_supported_rf_interfaces + sizeof(*rsp_2))\n+\t\treturn NCI_STATUS_SYNTAX_ERROR;\n+\n \tndev-\u003enfcc_features = __le32_to_cpu(rsp_1-\u003enfcc_features);\n \tndev-\u003enum_supported_rf_interfaces = rsp_1-\u003enum_supported_rf_interfaces;\n \n@@ -88,9 +102,13 @@ static u8 nci_core_init_rsp_packet_v2(struct nci_dev *ndev,\n {\n \tconst struct nci_core_init_rsp_nci_ver2 *rsp = (void *)skb-\u003edata;\n \tconst u8 *supported_rf_interface = rsp-\u003esupported_rf_interfaces;\n+\tconst u8 *end = skb-\u003edata + skb-\u003elen;\n \tu8 rf_interface_idx = 0;\n \tu8 rf_extension_cnt = 0;\n \n+\tif (skb-\u003elen \u003c sizeof(*rsp))\n+\t\treturn NCI_STATUS_SYNTAX_ERROR;\n+\n \tpr_debug(\"status %x\\n\", rsp-\u003estatus);\n \n \tif (rsp-\u003estatus != NCI_STATUS_OK)\n@@ -104,10 +122,16 @@ static u8 nci_core_init_rsp_packet_v2(struct nci_dev *ndev,\n \t\t NCI_MAX_SUPPORTED_RF_INTERFACES);\n \n \twhile (rf_interface_idx \u003c ndev-\u003enum_supported_rf_interfaces) {\n-\t\tndev-\u003esupported_rf_interfaces[rf_interface_idx++] = *supported_rf_interface++;\n+\t\t/* one interface byte + one extension-count byte must be present */\n+\t\tif (end - supported_rf_interface \u003c 2)\n+\t\t\treturn NCI_STATUS_SYNTAX_ERROR;\n+\t\tndev-\u003esupported_rf_interfaces[rf_interface_idx++] =\n+\t\t\t*supported_rf_interface++;\n \n-\t\t/* skip rf extension parameters */\n+\t\t/* skip rf extension parameters, bounded by the packet */\n \t\trf_extension_cnt = *supported_rf_interface++;\n+\t\tif (rf_extension_cnt \u003e end - supported_rf_interface)\n+\t\t\treturn NCI_STATUS_SYNTAX_ERROR;\n \t\tsupported_rf_interface += rf_extension_cnt;\n \t}\n \n"
} |
| 2/1 | 2026/06/26 17:42 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": [
"NFC",
"NFC_NCI",
"NFC_VIRTUAL_NCI"
],
"FocusSymbols": [
"nci_core_init_rsp_packet_v1",
"nci_core_init_rsp_packet_v2",
"nci_core_init_rsp_packet"
],
"Reasoning": "The patch adds bounds checking to NCI core init response packet parsing. This is functional code reachable via virtual NCI devices, so it should be fuzzed to ensure the new checks correctly prevent out-of-bounds accesses without breaking valid packets.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 0516c81b7443c0a48940cefaf1b681e68c152221
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Jun 26 17:41:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index 9eeb862825c5fe..6b2fa6bdbd14bd 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -50,11 +50,25 @@ static u8 nci_core_init_rsp_packet_v1(struct nci_dev *ndev,
const struct nci_core_init_rsp_1 *rsp_1 = (void *)skb->data;
const struct nci_core_init_rsp_2 *rsp_2;
+ if (skb->len < sizeof(*rsp_1))
+ return NCI_STATUS_SYNTAX_ERROR;
+
pr_debug("status 0x%x\n", rsp_1->status);
if (rsp_1->status != NCI_STATUS_OK)
return rsp_1->status;
+ /*
+ * supported_rf_interfaces[] and the trailing nci_core_init_rsp_2 are
+ * addressed using the on-wire (unclamped) interface count, so the
+ * response must be long enough for both before any of it is parsed or
+ * stored into @ndev - otherwise a truncated response would leave
+ * ndev->num_supported_rf_interfaces holding the unclamped count.
+ */
+ if (skb->len < sizeof(*rsp_1) +
+ rsp_1->num_supported_rf_interfaces + sizeof(*rsp_2))
+ return NCI_STATUS_SYNTAX_ERROR;
+
ndev->nfcc_features = __le32_to_cpu(rsp_1->nfcc_features);
ndev->num_supported_rf_interfaces = rsp_1->num_supported_rf_interfaces;
@@ -88,9 +102,13 @@ static u8 nci_core_init_rsp_packet_v2(struct nci_dev *ndev,
{
const struct nci_core_init_rsp_nci_ver2 *rsp = (void *)skb->data;
const u8 *supported_rf_interface = rsp->supported_rf_interfaces;
+ const u8 *end = skb->data + skb->len;
u8 rf_interface_idx = 0;
u8 rf_extension_cnt = 0;
+ if (skb->len < sizeof(*rsp))
+ return NCI_STATUS_SYNTAX_ERROR;
+
pr_debug("status %x\n", rsp->status);
if (rsp->status != NCI_STATUS_OK)
@@ -104,10 +122,16 @@ static u8 nci_core_init_rsp_packet_v2(struct nci_dev *ndev,
NCI_MAX_SUPPORTED_RF_INTERFACES);
while (rf_interface_idx < ndev->num_supported_rf_interfaces) {
- ndev->supported_rf_interfaces[rf_interface_idx++] = *supported_rf_interface++;
+ /* one interface byte + one extension-count byte must be present */
+ if (end - supported_rf_interface < 2)
+ return NCI_STATUS_SYNTAX_ERROR;
+ ndev->supported_rf_interfaces[rf_interface_idx++] =
+ *supported_rf_interface++;
- /* skip rf extension parameters */
+ /* skip rf extension parameters, bounded by the packet */
rf_extension_cnt = *supported_rf_interface++;
+ if (rf_extension_cnt > end - supported_rf_interface)
+ return NCI_STATUS_SYNTAX_ERROR;
supported_rf_interface += rf_extension_cnt;
}
|
| 3/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 2604 output: 44 thoughts: 121 Thoughts: **Analyzing the NFC NCI Core Init Response Packet Handling** Okay, so I'm looking at this patch that touches `net/nfc/nci/rsp.c`. Seems straightforward: it adds some length validation to `nci_core_init_rsp_packet_v1` and `nci_core_init_rsp_packet_v2`. These functions handle NCI core init response packets, which is a pretty crucial part of the NFC stack initialization. My immediate thought is, given that this is directly handling packet parsing, this is prime territory for fuzzing. Any input validation issues here could be exploitable. So, I need to figure out what config options are relevant to NFC and NCI within this context. I'll use `grepper` to search the codebase and identify the configuration variables that control compilation of `net/nfc/nci/rsp.c`, and by extension, the behavior of these functions. I need to understand what defines the build configurations that enable this code path so I can ensure the fuzzing targets the correct build variants. |
| 4/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "nci_core_init_rsp_packet_v1",
"PathPrefix": "net/nfc/nci/rsp.c"
}Results: {
"Output": "net/nfc/nci/rsp.c=28=static void nci_core_reset_rsp_packet(struct nci_dev *ndev,\n--\nnet/nfc/nci/rsp.c-46-\nnet/nfc/nci/rsp.c:47:static u8 nci_core_init_rsp_packet_v1(struct nci_dev *ndev,\nnet/nfc/nci/rsp.c-48-\t\t\t\t const struct sk_buff *skb)\n--\nnet/nfc/nci/rsp.c=148=static void nci_core_init_rsp_packet(struct nci_dev *ndev, const struct sk_buff *skb)\n--\nnet/nfc/nci/rsp.c-152-\tif (!(ndev-\u003enci_ver \u0026 NCI_VER_2_MASK))\nnet/nfc/nci/rsp.c:153:\t\tstatus = nci_core_init_rsp_packet_v1(ndev, skb);\nnet/nfc/nci/rsp.c-154-\telse\n"
} |
| 5/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 3280 output: 32 thoughts: 17 Thoughts: Here's my thought process, summarized as if I were considering the Makefile for `net/nfc/nci/`: **Analyzing the `net/nfc/nci/` Makefile** Okay, time to dive into the `net/nfc/nci/` directory and see what's happening within that Makefile. I need to understand the build process and dependencies for this NFC NCI component. My primary goal is to quickly grasp the relevant rules, variables, and include paths. I'll be looking for things like: how the NCI driver is built, what header files it's including, which source files are involved, if there are any specific compilation flags I need to be aware of, and how it links with other modules. Are there any conditional compilation directives that might be relevant to specific hardware configurations or kernel versions? Any cross-compilation settings? Any custom build targets or intermediate object directories? I'll pay close attention to the dependencies – that's often where the real complexity lies. I expect this should be fairly straightforward, but you never know until you look. |
| 6/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "rsp.o",
"PathPrefix": "net/nfc/nci/Makefile"
}Results: {
"Output": "net/nfc/nci/Makefile=6=obj-$(CONFIG_NFC_NCI) += nci.o\nnet/nfc/nci/Makefile-7-\nnet/nfc/nci/Makefile:8:nci-objs := core.o data.o lib.o ntf.o rsp.o hci.o\nnet/nfc/nci/Makefile-9-\n"
} |
| 7/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 3661 output: 37 thoughts: 24 Thoughts: Here's my take on the thought process, as if it were my own: **Initial Assessment and Exploration** Okay, so the current configuration we're looking at is `CONFIG_NFC_NCI`. Right, I know that one. But, before I dive too deeply into this specific setting, I need to get a broader picture. I should quickly scan for any related configurations. It's always best to understand the context. Are there any other NFC settings defined? Are there dependencies? Let's check. Gotta be thorough. We don't want to get tunnel vision on just one config when there might be something important connected to it, or something else related to NFC that needs consideration. |
| 8/2 | 2026/06/26 17:42 | tool | grepper |
0mError:no matches Args: {
"Expression": "CONFIG_NFC_NCI",
"PathPrefix": "net/nfc/nci/Kconfig"
}Results: {
"error": "no matches"
} |
| 9/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 3883 output: 32 thoughts: 13 Thoughts: Here's my take on the thought process, as if it were my own: **Diving into the NFC Configuration** Alright, time to dig into the heart of the NFC configuration. Let's see what's what. My initial focus is the `net/nfc/Kconfig` file. This is where the core options and dependencies for the NFC subsystem are probably defined. I need to understand the configuration knobs, dependencies, and defaults. The specifics here will drive what features are enabled, how the driver is built, and how it interacts with the rest of the network stack. I anticipate finding a layered structure, so I can see what is critical, and what is optional. This is the starting point for understanding how the system behaves. |
| 10/2 | 2026/06/26 17:42 | tool | grepper |
0mError:no matches Args: {
"Expression": "config NFC_NCI",
"PathPrefix": "net/nfc/Kconfig"
}Results: {
"error": "no matches"
} |
| 11/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4097 output: 19 thoughts: 17 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person: **Navigating the Configuration Landscape** Alright, so I need to find the configuration options related to NFC and specifically the NCI (NFC Controller Interface) within this project. My initial instinct is to go for a direct search. I'm going to leverage my knowledge of the build system and the expected naming conventions. I'll search the entire project tree for the string `config NFC_NCI`. This should, in theory, identify the relevant configuration files, defconfig fragments, or Kconfig entries where these options are defined or used. Hopefully this targeted search will be efficient, avoiding the need to manually crawl the entire directory structure. From there I'll be able to see the dependencies, defaults, and usage of this specific NFC controller interface. Let's see what we find. |
| 12/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "config NFC_NCI"
}Results: {
"Output": "net/nfc/nci/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\nnet/nfc/nci/Kconfig:2:config NFC_NCI\nnet/nfc/nci/Kconfig-3-\tdepends on NFC\n--\nnet/nfc/nci/Kconfig-12-\nnet/nfc/nci/Kconfig:13:config NFC_NCI_SPI\nnet/nfc/nci/Kconfig-14-\tdepends on NFC_NCI \u0026\u0026 SPI\n--\nnet/nfc/nci/Kconfig-23-\nnet/nfc/nci/Kconfig:24:config NFC_NCI_UART\nnet/nfc/nci/Kconfig-25-\tdepends on NFC_NCI \u0026\u0026 TTY\n"
} |
| 13/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4524 output: 37 thoughts: 104 Thoughts: **Debugging NFC Configuration** Okay, so I was looking at `net/nfc/nci/Kconfig` trying to figure out the correct configuration options, and I realized a subtle but critical difference. I initially assumed it was going to be `CONFIG_NFC_NCI` based on the file path, but it's actually `config NFC_NCI` in the file. Right, that underscores the importance of being precise with the syntax in these Kconfig files. The actual configuration symbol, then, is `NFC_NCI`. Now, I need to make sure I've got all the base requirements. I should check if `NFC` is also a required symbol in this space. Ah, yes, looking at the code I can see that it is, so `NFC` is essential. I should run through the `net/nfc/nci/Kconfig` file again and just verify that there aren't any other dependent configurations I need to be aware of while I'm at it. I need to make sure I haven't missed anything else related to `NFC_NCI`. Better safe than sorry when dealing with these kernel configs. |
| 14/2 | 2026/06/26 17:42 | tool | read-file |
0mArgs:{
"File": "net/nfc/nci/Kconfig",
"FirstLine": 1,
"LineCount": 100
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig NFC_NCI\n 3:\t\tdepends on NFC\n 4:\t\ttristate \"NCI protocol support\"\n 5:\t\tdefault n\n 6:\t\thelp\n 7:\t\t NCI (NFC Controller Interface) is a communication protocol between\n 8:\t\t an NFC Controller (NFCC) and a Device Host (DH).\n 9:\t\n 10:\t\t Say Y here to compile NCI support into the kernel or say M to\n 11:\t\t compile it as module (nci).\n 12:\t\n 13:\tconfig NFC_NCI_SPI\n 14:\t\tdepends on NFC_NCI \u0026\u0026 SPI\n 15:\t\tselect CRC_CCITT\n 16:\t\ttristate \"NCI over SPI protocol support\"\n 17:\t\tdefault n\n 18:\t\thelp\n 19:\t\t NCI (NFC Controller Interface) is a communication protocol between\n 20:\t\t an NFC Controller (NFCC) and a Device Host (DH).\n 21:\t\n 22:\t\t Say yes if you use an NCI driver that requires SPI link layer.\n 23:\t\n 24:\tconfig NFC_NCI_UART\n 25:\t\tdepends on NFC_NCI \u0026\u0026 TTY\n 26:\t\ttristate \"NCI over UART protocol support\"\n 27:\t\tdefault n\n 28:\t\thelp\n 29:\t\t Say yes if you use an NCI driver that requires UART link layer.\n"
} |
| 15/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 5306 output: 41 thoughts: 125 Thoughts: **Analyzing NFC Initialization Responses** Okay, so I'm looking at these configurations, `NFC` and `NFC_NCI`. The key functions I need to dissect here seem to be `nci_core_init_rsp_packet_v1`, `nci_core_init_rsp_packet_v2`, and potentially the base function, `nci_core_init_rsp_packet`. Let's see... I'll quickly confirm whether `nci_core_init_rsp_packet` is declared as static. Yes, it is. Alright, that means my focus will be on the `nci_core_init_rsp_packet` definition, and I need to check it in `net/nfc/nci/rsp.c`. This will give me the clearest picture of how these initialization responses are constructed within the NCI framework. |
| 16/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "nci_core_init_rsp_packet",
"PathPrefix": "net/nfc/nci/rsp.c"
}Results: {
"Output": "net/nfc/nci/rsp.c=28=static void nci_core_reset_rsp_packet(struct nci_dev *ndev,\n--\nnet/nfc/nci/rsp.c-46-\nnet/nfc/nci/rsp.c:47:static u8 nci_core_init_rsp_packet_v1(struct nci_dev *ndev,\nnet/nfc/nci/rsp.c-48-\t\t\t\t const struct sk_buff *skb)\n--\nnet/nfc/nci/rsp.c-99-\nnet/nfc/nci/rsp.c:100:static u8 nci_core_init_rsp_packet_v2(struct nci_dev *ndev,\nnet/nfc/nci/rsp.c-101-\t\t\t\t const struct sk_buff *skb)\n--\nnet/nfc/nci/rsp.c-147-\nnet/nfc/nci/rsp.c:148:static void nci_core_init_rsp_packet(struct nci_dev *ndev, const struct sk_buff *skb)\nnet/nfc/nci/rsp.c-149-{\n--\nnet/nfc/nci/rsp.c-152-\tif (!(ndev-\u003enci_ver \u0026 NCI_VER_2_MASK))\nnet/nfc/nci/rsp.c:153:\t\tstatus = nci_core_init_rsp_packet_v1(ndev, skb);\nnet/nfc/nci/rsp.c-154-\telse\nnet/nfc/nci/rsp.c:155:\t\tstatus = nci_core_init_rsp_packet_v2(ndev, skb);\nnet/nfc/nci/rsp.c-156-\n--\nnet/nfc/nci/rsp.c=369=void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)\n--\nnet/nfc/nci/rsp.c-399-\tcase NCI_OP_CORE_INIT_RSP:\nnet/nfc/nci/rsp.c:400:\t\tnci_core_init_rsp_packet(ndev, skb);\nnet/nfc/nci/rsp.c-401-\t\tbreak;\n"
} |
| 17/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 6256 output: 27 thoughts: 178 Thoughts: **Fuzzing Target Identification** Okay, so this patch is pointing me towards some interesting areas. It looks like they've added bounds checking to `nci_core_init_rsp_packet_v1` and `nci_core_init_rsp_packet_v2`, which are called from `nci_rsp_packet`. Given that they're touching these functions, that screams fuzzing target to me. Memory corruption is a likely avenue of attack given the context. I need to focus my attention on those three symbols: `nci_core_init_rsp_packet_v1`, `nci_core_init_rsp_packet_v2`, and the parent, `nci_rsp_packet`. Now, the configuration... they're mentioning `NFC_NCI`. I need to make sure that's sufficient to enable the relevant code paths. Is just `NFC_NCI` enough to get these functions built and reachable? Or do I need to enable a more specific NCI variant like `NFC_NCI_SPI` or `NFC_NCI_UART`? Maybe even `NFC_VIRTUAL_NCI`? I'd better check for that virtual driver; virtual drivers can sometimes expose interesting attack surfaces. I need to understand the configuration space completely to effectively target the fuzzing campaign. |
| 18/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "NCI",
"PathPrefix": "drivers/nfc/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 1879 lines.\nUse more precise expression if possible.\n\ndrivers/nfc/Kconfig=42=config NFC_PORT100\n--\ndrivers/nfc/Kconfig-51-\ndrivers/nfc/Kconfig:52:config NFC_VIRTUAL_NCI\ndrivers/nfc/Kconfig:53:\ttristate \"NCI device simulator driver\"\ndrivers/nfc/Kconfig:54:\tdepends on NFC_NCI\ndrivers/nfc/Kconfig-55-\thelp\ndrivers/nfc/Kconfig:56:\t NCI virtual device simulates a NCI device to the user.\ndrivers/nfc/Kconfig:57:\t It can be used to validate the NCI module and applications.\ndrivers/nfc/Kconfig:58:\t This driver supports communication between the virtual NCI device and\ndrivers/nfc/Kconfig-59-\t module.\n--\ndrivers/nfc/Makefile=15=obj-$(CONFIG_NFC_ST21NFCA) \t+= st21nfca/\ndrivers/nfc/Makefile:16:obj-$(CONFIG_NFC_ST_NCI)\t+= st-nci/\ndrivers/nfc/Makefile:17:obj-$(CONFIG_NFC_NXP_NCI)\t+= nxp-nci/\ndrivers/nfc/Makefile-18-obj-$(CONFIG_NFC_S3FWRN5)\t+= s3fwrn5/\ndrivers/nfc/Makefile=19=obj-$(CONFIG_NFC_ST95HF)\t+= st95hf/\ndrivers/nfc/Makefile:20:obj-$(CONFIG_NFC_VIRTUAL_NCI)\t+= virtual_ncidev.o\n--\ndrivers/nfc/fdp/Kconfig=2=config NFC_FDP\ndrivers/nfc/fdp/Kconfig-3-\ttristate \"Intel FDP NFC driver\"\ndrivers/nfc/fdp/Kconfig:4:\tdepends on NFC_NCI\ndrivers/nfc/fdp/Kconfig-5-\tselect CRC_CCITT\n--\ndrivers/nfc/fdp/Kconfig-8-\t Intel Fields Peak NFC controller core driver.\ndrivers/nfc/fdp/Kconfig:9:\t This is a driver based on the NCI NFC kernel layers.\ndrivers/nfc/fdp/Kconfig-10-\n--\ndrivers/nfc/fdp/Makefile-2-#\ndrivers/nfc/fdp/Makefile:3:# Makefile for FDP NCI based NFC driver\ndrivers/nfc/fdp/Makefile-4-#\n--\ndrivers/nfc/fdp/fdp.c-21-\ndrivers/nfc/fdp/fdp.c:22:#define NCI_GET_VERSION_TIMEOUT\t\t\t8000\ndrivers/nfc/fdp/fdp.c:23:#define NCI_PATCH_REQUEST_TIMEOUT\t\t8000\ndrivers/nfc/fdp/fdp.c-24-#define FDP_PATCH_CONN_DEST\t\t\t0xC2\n--\ndrivers/nfc/fdp/fdp.c-26-\ndrivers/nfc/fdp/fdp.c:27:#define NCI_PATCH_TYPE_RAM\t\t\t0x00\ndrivers/nfc/fdp/fdp.c:28:#define NCI_PATCH_TYPE_OTP\t\t\t0x01\ndrivers/nfc/fdp/fdp.c:29:#define NCI_PATCH_TYPE_EOT\t\t\t0xFF\ndrivers/nfc/fdp/fdp.c-30-\ndrivers/nfc/fdp/fdp.c:31:#define NCI_PARAM_ID_FW_RAM_VERSION\t\t0xA0\ndrivers/nfc/fdp/fdp.c:32:#define NCI_PARAM_ID_FW_OTP_VERSION\t\t0xA1\ndrivers/nfc/fdp/fdp.c:33:#define NCI_PARAM_ID_OTP_LIMITED_VERSION\t0xC5\ndrivers/nfc/fdp/fdp.c:34:#define NCI_PARAM_ID_KEY_INDEX_ID\t\t0xC6\ndrivers/nfc/fdp/fdp.c-35-\ndrivers/nfc/fdp/fdp.c:36:#define NCI_GID_PROP\t\t\t\t0x0F\ndrivers/nfc/fdp/fdp.c:37:#define NCI_OP_PROP_PATCH_OID\t\t\t0x08\ndrivers/nfc/fdp/fdp.c:38:#define NCI_OP_PROP_SET_PDATA_OID\t\t0x23\ndrivers/nfc/fdp/fdp.c-39-\n--\ndrivers/nfc/fdp/fdp.c=68=static const u8 nci_core_get_config_otp_ram_version[5] = {\ndrivers/nfc/fdp/fdp.c-69-\t0x04,\ndrivers/nfc/fdp/fdp.c:70:\tNCI_PARAM_ID_FW_RAM_VERSION,\ndrivers/nfc/fdp/fdp.c:71:\tNCI_PARAM_ID_FW_OTP_VERSION,\ndrivers/nfc/fdp/fdp.c:72:\tNCI_PARAM_ID_OTP_LIMITED_VERSION,\ndrivers/nfc/fdp/fdp.c:73:\tNCI_PARAM_ID_KEY_INDEX_ID\ndrivers/nfc/fdp/fdp.c-74-};\n--\ndrivers/nfc/fdp/fdp.c=101=static inline int fdp_nci_get_versions(struct nci_dev *ndev)\ndrivers/nfc/fdp/fdp.c-102-{\ndrivers/nfc/fdp/fdp.c:103:\treturn nci_core_cmd(ndev, NCI_OP_CORE_GET_CONFIG_CMD,\ndrivers/nfc/fdp/fdp.c-104-\t\t\t sizeof(nci_core_get_config_otp_ram_version),\n--\ndrivers/nfc/fdp/fdp.c=108=static inline int fdp_nci_patch_cmd(struct nci_dev *ndev, u8 type)\ndrivers/nfc/fdp/fdp.c-109-{\ndrivers/nfc/fdp/fdp.c:110:\treturn nci_prop_cmd(ndev, NCI_OP_PROP_PATCH_OID, sizeof(type), \u0026type);\ndrivers/nfc/fdp/fdp.c-111-}\n--\ndrivers/nfc/fdp/fdp.c=113=static inline int fdp_nci_set_production_data(struct nci_dev *ndev, u8 len,\n--\ndrivers/nfc/fdp/fdp.c-115-{\ndrivers/nfc/fdp/fdp.c:116:\treturn nci_prop_cmd(ndev, NCI_OP_PROP_SET_PDATA_OID, len, data);\ndrivers/nfc/fdp/fdp.c-117-}\n--\ndrivers/nfc/fdp/fdp.c=159=static void fdp_nci_set_data_pkt_counter(struct nci_dev *ndev,\n--\ndrivers/nfc/fdp/fdp.c-164-\ndrivers/nfc/fdp/fdp.c:165:\tdev_dbg(dev, \"NCI data pkt counter %d\\n\", count);\ndrivers/nfc/fdp/fdp.c-166-\tatomic_set(\u0026info-\u003edata_pkt_counter, count);\n--\ndrivers/nfc/fdp/fdp.c-176- *\ndrivers/nfc/fdp/fdp.c:177: * The firmware will be analyzed and applied when we send NCI_OP_PROP_PATCH_CMD\ndrivers/nfc/fdp/fdp.c:178: * command with NCI_PATCH_TYPE_EOT parameter. The device will send a\ndrivers/nfc/fdp/fdp.c:179: * NFCC_PATCH_NTF packet and a NCI_OP_CORE_RESET_NTF packet.\ndrivers/nfc/fdp/fdp.c-180- */\ndrivers/nfc/fdp/fdp.c=181=static int fdp_nci_send_patch(struct nci_dev *ndev, u8 conn_id, u8 type)\n--\ndrivers/nfc/fdp/fdp.c-189-\ndrivers/nfc/fdp/fdp.c:190:\tif ((type == NCI_PATCH_TYPE_OTP \u0026\u0026 !info-\u003eotp_patch) ||\ndrivers/nfc/fdp/fdp.c:191:\t (type == NCI_PATCH_TYPE_RAM \u0026\u0026 !info-\u003eram_patch))\ndrivers/nfc/fdp/fdp.c-192-\t\treturn -EINVAL;\ndrivers/nfc/fdp/fdp.c-193-\ndrivers/nfc/fdp/fdp.c:194:\tif (type == NCI_PATCH_TYPE_OTP)\ndrivers/nfc/fdp/fdp.c-195-\t\tfw = info-\u003eotp_patch;\n--\ndrivers/nfc/fdp/fdp.c-211-\ndrivers/nfc/fdp/fdp.c:212:\t\tskb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + payload_size),\ndrivers/nfc/fdp/fdp.c-213-\t\t\t\t GFP_KERNEL);\n--\ndrivers/nfc/fdp/fdp.c-219-\ndrivers/nfc/fdp/fdp.c:220:\t\tskb_reserve(skb, NCI_CTRL_HDR_SIZE);\ndrivers/nfc/fdp/fdp.c-221-\n--\ndrivers/nfc/fdp/fdp.c=324=static int fdp_nci_patch_otp(struct nci_dev *ndev)\n--\ndrivers/nfc/fdp/fdp.c-338-\t/* Patch init request */\ndrivers/nfc/fdp/fdp.c:339:\tr = fdp_nci_patch_cmd(ndev, NCI_PATCH_TYPE_OTP);\ndrivers/nfc/fdp/fdp.c-340-\tif (r)\n--\ndrivers/nfc/fdp/fdp.c-348-\t/* Send the patch over the data connection */\ndrivers/nfc/fdp/fdp.c:349:\tr = fdp_nci_send_patch(ndev, conn_id, NCI_PATCH_TYPE_OTP);\ndrivers/nfc/fdp/fdp.c-350-\tif (r)\n--\ndrivers/nfc/fdp/fdp.c-365-\t/* Patch finish message */\ndrivers/nfc/fdp/fdp.c:366:\tif (fdp_nci_patch_cmd(ndev, NCI_PATCH_TYPE_EOT)) {\ndrivers/nfc/fdp/fdp.c-367-\t\tnfc_err(dev, \"OTP patch error 0x%x\\n\", r);\n--\ndrivers/nfc/fdp/fdp.c=390=static int fdp_nci_patch_ram(struct nci_dev *ndev)\n--\ndrivers/nfc/fdp/fdp.c-404-\t/* Patch init request */\ndrivers/nfc/fdp/fdp.c:405:\tr = fdp_nci_patch_cmd(ndev, NCI_PATCH_TYPE_RAM);\ndrivers/nfc/fdp/fdp.c-406-\tif (r)\n--\ndrivers/nfc/fdp/fdp.c-414-\t/* Send the patch over the data connection */\ndrivers/nfc/fdp/fdp.c:415:\tr = fdp_nci_send_patch(ndev, conn_id, NCI_PATCH_TYPE_RAM);\ndrivers/nfc/fdp/fdp.c-416-\tif (r)\n--\ndrivers/nfc/fdp/fdp.c-431-\t/* Patch finish message */\ndrivers/nfc/fdp/fdp.c:432:\tif (fdp_nci_patch_cmd(ndev, NCI_PATCH_TYPE_EOT)) {\ndrivers/nfc/fdp/fdp.c-433-\t\tnfc_err(dev, \"RAM patch error 0x%x\\n\", r);\n--\ndrivers/nfc/fdp/fdp.c=456=static int fdp_nci_setup(struct nci_dev *ndev)\ndrivers/nfc/fdp/fdp.c-457-{\ndrivers/nfc/fdp/fdp.c:458:\t/* Format: total length followed by an NCI packet */\ndrivers/nfc/fdp/fdp.c-459-\tstruct fdp_nci_info *info = nci_get_drvdata(ndev);\n--\ndrivers/nfc/fdp/fdp.c=616=static int fdp_nci_core_get_config_rsp_packet(struct nci_dev *ndev,\n--\ndrivers/nfc/fdp/fdp.c-624-\ndrivers/nfc/fdp/fdp.c:625:\tif (rsp-\u003estatus == NCI_STATUS_OK) {\ndrivers/nfc/fdp/fdp.c-626-\n--\ndrivers/nfc/fdp/fdp.c-630-\t\t\tswitch (*p++) {\ndrivers/nfc/fdp/fdp.c:631:\t\t\tcase NCI_PARAM_ID_FW_RAM_VERSION:\ndrivers/nfc/fdp/fdp.c-632-\t\t\t\tp++;\n--\ndrivers/nfc/fdp/fdp.c-635-\t\t\t\tbreak;\ndrivers/nfc/fdp/fdp.c:636:\t\t\tcase NCI_PARAM_ID_FW_OTP_VERSION:\ndrivers/nfc/fdp/fdp.c-637-\t\t\t\tp++;\n--\ndrivers/nfc/fdp/fdp.c-640-\t\t\t\tbreak;\ndrivers/nfc/fdp/fdp.c:641:\t\t\tcase NCI_PARAM_ID_OTP_LIMITED_VERSION:\ndrivers/nfc/fdp/fdp.c-642-\t\t\t\tp++;\n--\ndrivers/nfc/fdp/fdp.c-645-\t\t\t\tbreak;\ndrivers/nfc/fdp/fdp.c:646:\t\t\tcase NCI_PARAM_ID_KEY_INDEX_ID:\ndrivers/nfc/fdp/fdp.c-647-\t\t\t\tp++;\n--\ndrivers/nfc/fdp/fdp.c=663=static const struct nci_driver_ops fdp_core_ops[] = {\ndrivers/nfc/fdp/fdp.c-664-\t{\ndrivers/nfc/fdp/fdp.c:665:\t\t.opcode = NCI_OP_CORE_GET_CONFIG_RSP,\ndrivers/nfc/fdp/fdp.c-666-\t\t.rsp = fdp_nci_core_get_config_rsp_packet,\n--\ndrivers/nfc/fdp/fdp.c-668-\t{\ndrivers/nfc/fdp/fdp.c:669:\t\t.opcode = NCI_OP_CORE_RESET_NTF,\ndrivers/nfc/fdp/fdp.c-670-\t\t.ntf = fdp_nci_core_reset_ntf_packet,\n--\ndrivers/nfc/fdp/fdp.c=674=static const struct nci_driver_ops fdp_prop_ops[] = {\ndrivers/nfc/fdp/fdp.c-675-\t{\ndrivers/nfc/fdp/fdp.c:676:\t\t.opcode = nci_opcode_pack(NCI_GID_PROP, NCI_OP_PROP_PATCH_OID),\ndrivers/nfc/fdp/fdp.c-677-\t\t.rsp = fdp_nci_prop_patch_rsp_packet,\n--\ndrivers/nfc/fdp/fdp.c-680-\t{\ndrivers/nfc/fdp/fdp.c:681:\t\t.opcode = nci_opcode_pack(NCI_GID_PROP,\ndrivers/nfc/fdp/fdp.c:682:\t\t\t\t\t NCI_OP_PROP_SET_PDATA_OID),\ndrivers/nfc/fdp/fdp.c-683-\t\t.rsp = fdp_nci_prop_set_production_data_rsp_packet,\n--\ndrivers/nfc/fdp/fdp.c=699=int fdp_nci_probe(struct fdp_i2c_phy *phy, const struct nfc_phy_ops *phy_ops,\n--\ndrivers/nfc/fdp/fdp.c-729-\ndrivers/nfc/fdp/fdp.c:730:\tBUILD_BUG_ON(ARRAY_SIZE(fdp_prop_ops) \u003e NCI_MAX_PROPRIETARY_CMD);\ndrivers/nfc/fdp/fdp.c-731-\tndev = nci_allocate_device(\u0026nci_ops, protocols, tx_headroom,\n--\ndrivers/nfc/fdp/fdp.c=762=MODULE_LICENSE(\"GPL\");\ndrivers/nfc/fdp/fdp.c:763:MODULE_DESCRIPTION(\"NFC NCI driver for Intel Fields Peak NFC controller\");\ndrivers/nfc/fdp/fdp.c-764-MODULE_AUTHOR(\"Robert Dolca \u003crobert.dolca@intel.com\u003e\");\n--\ndrivers/nfc/fdp/i2c.c-28-\ndrivers/nfc/fdp/i2c.c:29:#define FDP_NCI_I2C_MIN_PAYLOAD\t5\ndrivers/nfc/fdp/i2c.c:30:#define FDP_NCI_I2C_MAX_PAYLOAD\t261\ndrivers/nfc/fdp/i2c.c-31-\n--\ndrivers/nfc/fdp/i2c.c=129=static int fdp_nci_i2c_read(struct fdp_i2c_phy *phy, struct sk_buff **skb)\n--\ndrivers/nfc/fdp/i2c.c-131-\tint r, len;\ndrivers/nfc/fdp/i2c.c:132:\tu8 tmp[FDP_NCI_I2C_MAX_PAYLOAD], lrc, k;\ndrivers/nfc/fdp/i2c.c-133-\tu16 i;\n--\ndrivers/nfc/fdp/i2c.c-169-\t\t} else {\ndrivers/nfc/fdp/i2c.c:170:\t\t\tphy-\u003enext_read_size = FDP_NCI_I2C_MIN_PAYLOAD;\ndrivers/nfc/fdp/i2c.c-171-\n--\ndrivers/nfc/fdp/i2c.c=278=static int fdp_nci_i2c_probe(struct i2c_client *client)\n--\ndrivers/nfc/fdp/i2c.c-302-\tphy-\u003ei2c_dev = client;\ndrivers/nfc/fdp/i2c.c:303:\tphy-\u003enext_read_size = FDP_NCI_I2C_MIN_PAYLOAD;\ndrivers/nfc/fdp/i2c.c-304-\ti2c_set_clientdata(client, phy);\n--\ndrivers/nfc/fdp/i2c.c-335-\tif (r \u003c 0) {\ndrivers/nfc/fdp/i2c.c:336:\t\tnfc_err(dev, \"NCI probing error\\n\");\ndrivers/nfc/fdp/i2c.c-337-\t\treturn r;\n--\ndrivers/nfc/nfcmrvl/Kconfig=10=config NFC_MRVL_USB\ndrivers/nfc/nfcmrvl/Kconfig-11-\ttristate \"Marvell NFC-over-USB driver\"\ndrivers/nfc/nfcmrvl/Kconfig:12:\tdepends on NFC_NCI \u0026\u0026 USB\ndrivers/nfc/nfcmrvl/Kconfig-13-\tselect NFC_MRVL\n--\ndrivers/nfc/nfcmrvl/Kconfig=23=config NFC_MRVL_UART\ndrivers/nfc/nfcmrvl/Kconfig-24-\ttristate \"Marvell NFC-over-UART driver\"\ndrivers/nfc/nfcmrvl/Kconfig:25:\tdepends on NFC_NCI \u0026\u0026 NFC_NCI_UART\ndrivers/nfc/nfcmrvl/Kconfig-26-\tselect NFC_MRVL\n--\ndrivers/nfc/nfcmrvl/Kconfig=46=config NFC_MRVL_SPI\ndrivers/nfc/nfcmrvl/Kconfig-47-\ttristate \"Marvell NFC-over-SPI driver\"\ndrivers/nfc/nfcmrvl/Kconfig:48:\tdepends on NFC_MRVL \u0026\u0026 NFC_NCI_SPI\ndrivers/nfc/nfcmrvl/Kconfig-49-\thelp\n--\ndrivers/nfc/nfcmrvl/Makefile-2-#\ndrivers/nfc/nfcmrvl/Makefile:3:# Makefile for NFCMRVL NCI based NFC driver\ndrivers/nfc/nfcmrvl/Makefile-4-#\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-17-\ndrivers/nfc/nfcmrvl/fw_dnld.c:18:#define NCI_OP_PROPRIETARY_BOOT_CMD\tnci_opcode_pack(NCI_GID_PROPRIETARY, \\\ndrivers/nfc/nfcmrvl/fw_dnld.c:19:\t\t\t\t\t\t\tNCI_OP_PROP_BOOT_CMD)\ndrivers/nfc/nfcmrvl/fw_dnld.c-20-\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=65=static const uint8_t nci_pattern_core_conn_credits_ntf[] = {\ndrivers/nfc/nfcmrvl/fw_dnld.c:66:\t0x60, 0x06, 0x03, 0x01, NCI_CORE_LC_CONNID_PROP_FW_DL, 0x01\ndrivers/nfc/nfcmrvl/fw_dnld.c-67-};\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=73=static struct sk_buff *alloc_lc_skb(struct nfcmrvl_private *priv, uint8_t plen)\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-77-\ndrivers/nfc/nfcmrvl/fw_dnld.c:78:\tskb = nci_skb_alloc(priv-\u003endev, (NCI_DATA_HDR_SIZE + plen), GFP_KERNEL);\ndrivers/nfc/nfcmrvl/fw_dnld.c-79-\tif (!skb)\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-81-\ndrivers/nfc/nfcmrvl/fw_dnld.c:82:\thdr = skb_put(skb, NCI_DATA_HDR_SIZE);\ndrivers/nfc/nfcmrvl/fw_dnld.c:83:\thdr-\u003econn_id = NCI_CORE_LC_CONNID_PROP_FW_DL;\ndrivers/nfc/nfcmrvl/fw_dnld.c-84-\thdr-\u003erfu = 0;\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-86-\ndrivers/nfc/nfcmrvl/fw_dnld.c:87:\tnci_mt_set((__u8 *)hdr, NCI_MT_DATA_PKT);\ndrivers/nfc/nfcmrvl/fw_dnld.c:88:\tnci_pbf_set((__u8 *)hdr, NCI_PBF_LAST);\ndrivers/nfc/nfcmrvl/fw_dnld.c-89-\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=130=static int process_state_reset(struct nfcmrvl_private *priv,\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-141-\tpriv-\u003efw_dnld.state = STATE_INIT;\ndrivers/nfc/nfcmrvl/fw_dnld.c:142:\tnci_send_cmd(priv-\u003endev, NCI_OP_CORE_INIT_CMD, 0, NULL);\ndrivers/nfc/nfcmrvl/fw_dnld.c-143-\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=147=static int process_state_init(struct nfcmrvl_private *priv,\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-161-\ndrivers/nfc/nfcmrvl/fw_dnld.c:162:\tnci_send_cmd(priv-\u003endev, NCI_OP_CORE_SET_CONFIG_CMD, 3 + cmd.param.len,\ndrivers/nfc/nfcmrvl/fw_dnld.c-163-\t\t \u0026cmd);\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=169=static void create_lc(struct nfcmrvl_private *priv)\ndrivers/nfc/nfcmrvl/fw_dnld.c-170-{\ndrivers/nfc/nfcmrvl/fw_dnld.c:171:\tuint8_t param[2] = { NCI_CORE_LC_PROP_FW_DL, 0x0 };\ndrivers/nfc/nfcmrvl/fw_dnld.c-172-\ndrivers/nfc/nfcmrvl/fw_dnld.c-173-\tpriv-\u003efw_dnld.state = STATE_OPEN_LC;\ndrivers/nfc/nfcmrvl/fw_dnld.c:174:\tnci_send_cmd(priv-\u003endev, NCI_OP_CORE_CONN_CREATE_CMD, 2, param);\ndrivers/nfc/nfcmrvl/fw_dnld.c-175-}\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=177=static int process_state_set_ref_clock(struct nfcmrvl_private *priv,\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-217-\tpriv-\u003efw_dnld.state = STATE_SET_HI_CONFIG;\ndrivers/nfc/nfcmrvl/fw_dnld.c:218:\tnci_send_cmd(priv-\u003endev, NCI_OP_CORE_SET_CONFIG_CMD, 3 + cmd.param.len,\ndrivers/nfc/nfcmrvl/fw_dnld.c-219-\t\t \u0026cmd);\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=248=static int process_state_fw_dnld(struct nfcmrvl_private *priv,\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-258-\t\t * Command format:\ndrivers/nfc/nfcmrvl/fw_dnld.c:259:\t\t * B0..2: NCI header\ndrivers/nfc/nfcmrvl/fw_dnld.c-260-\t\t * B3 : Helper command (0xA5)\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-265-\ndrivers/nfc/nfcmrvl/fw_dnld.c:266:\t\t/* Remove NCI HDR */\ndrivers/nfc/nfcmrvl/fw_dnld.c-267-\t\tskb_pull(skb, 3);\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-306-\t\t\t/* FW Loading is done */\ndrivers/nfc/nfcmrvl/fw_dnld.c:307:\t\t\tuint8_t conn_id = NCI_CORE_LC_CONNID_PROP_FW_DL;\ndrivers/nfc/nfcmrvl/fw_dnld.c-308-\ndrivers/nfc/nfcmrvl/fw_dnld.c-309-\t\t\tpriv-\u003efw_dnld.state = STATE_CLOSE_LC;\ndrivers/nfc/nfcmrvl/fw_dnld.c:310:\t\t\tnci_send_cmd(priv-\u003endev, NCI_OP_CORE_CONN_CLOSE_CMD,\ndrivers/nfc/nfcmrvl/fw_dnld.c-311-\t\t\t\t 1, \u0026conn_id);\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=349=static int process_state_close_lc(struct nfcmrvl_private *priv,\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-356-\tpriv-\u003efw_dnld.state = STATE_BOOT;\ndrivers/nfc/nfcmrvl/fw_dnld.c:357:\tnci_send_cmd(priv-\u003endev, NCI_OP_PROPRIETARY_BOOT_CMD, 0, NULL);\ndrivers/nfc/nfcmrvl/fw_dnld.c-358-\treturn 0;\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c=391=static void fw_dnld_rx_work(struct work_struct *work)\n--\ndrivers/nfc/nfcmrvl/fw_dnld.c-403-\t\tnfc_send_to_raw_sock(priv-\u003endev-\u003enfc_dev, skb,\ndrivers/nfc/nfcmrvl/fw_dnld.c:404:\t\t\t\t RAW_PAYLOAD_NCI, NFC_DIRECTION_RX);\ndrivers/nfc/nfcmrvl/fw_dnld.c-405-\t\tswitch (fw_dnld-\u003estate) {\n--\ndrivers/nfc/nfcmrvl/fw_dnld.h-14-\ndrivers/nfc/nfcmrvl/fw_dnld.h:15:#define NCI_OP_PROP_BOOT_CMD\t\t0x3A\ndrivers/nfc/nfcmrvl/fw_dnld.h-16-\ndrivers/nfc/nfcmrvl/fw_dnld.h:17:#define NCI_CORE_LC_PROP_FW_DL\t\t0xFD\ndrivers/nfc/nfcmrvl/fw_dnld.h:18:#define NCI_CORE_LC_CONNID_PROP_FW_DL\t0x02\ndrivers/nfc/nfcmrvl/fw_dnld.h-19-\n--\ndrivers/nfc/nfcmrvl/i2c.c=25=static int nfcmrvl_i2c_read(struct nfcmrvl_i2c_drv_data *drv_data,\n--\ndrivers/nfc/nfcmrvl/i2c.c-30-\ndrivers/nfc/nfcmrvl/i2c.c:31:\t/* Read NCI header to know the payload size */\ndrivers/nfc/nfcmrvl/i2c.c:32:\tret = i2c_master_recv(drv_data-\u003ei2c, (u8 *)\u0026nci_hdr, NCI_CTRL_HDR_SIZE);\ndrivers/nfc/nfcmrvl/i2c.c:33:\tif (ret != NCI_CTRL_HDR_SIZE) {\ndrivers/nfc/nfcmrvl/i2c.c:34:\t\tnfc_err(\u0026drv_data-\u003ei2c-\u003edev, \"cannot read NCI header\\n\");\ndrivers/nfc/nfcmrvl/i2c.c-35-\t\treturn -EBADMSG;\n--\ndrivers/nfc/nfcmrvl/i2c.c-38-\t*skb = nci_skb_alloc(drv_data-\u003epriv-\u003endev,\ndrivers/nfc/nfcmrvl/i2c.c:39:\t\t\t nci_hdr.plen + NCI_CTRL_HDR_SIZE, GFP_KERNEL);\ndrivers/nfc/nfcmrvl/i2c.c-40-\tif (!*skb)\n--\ndrivers/nfc/nfcmrvl/i2c.c-42-\ndrivers/nfc/nfcmrvl/i2c.c:43:\t/* Copy NCI header into the SKB */\ndrivers/nfc/nfcmrvl/i2c.c:44:\tskb_put_data(*skb, \u0026nci_hdr, NCI_CTRL_HDR_SIZE);\ndrivers/nfc/nfcmrvl/i2c.c-45-\ndrivers/nfc/nfcmrvl/i2c.c-46-\tif (nci_hdr.plen) {\ndrivers/nfc/nfcmrvl/i2c.c:47:\t\t/* Read the NCI payload */\ndrivers/nfc/nfcmrvl/i2c.c-48-\t\tret = i2c_master_recv(drv_data-\u003ei2c,\n--\ndrivers/nfc/nfcmrvl/main.c=17=static int nfcmrvl_nci_open(struct nci_dev *ndev)\n--\ndrivers/nfc/nfcmrvl/main.c-21-\ndrivers/nfc/nfcmrvl/main.c:22:\tif (test_and_set_bit(NFCMRVL_NCI_RUNNING, \u0026priv-\u003eflags))\ndrivers/nfc/nfcmrvl/main.c-23-\t\treturn 0;\n--\ndrivers/nfc/nfcmrvl/main.c-30-\tif (err)\ndrivers/nfc/nfcmrvl/main.c:31:\t\tclear_bit(NFCMRVL_NCI_RUNNING, \u0026priv-\u003eflags);\ndrivers/nfc/nfcmrvl/main.c-32-\n--\ndrivers/nfc/nfcmrvl/main.c=36=static int nfcmrvl_nci_close(struct nci_dev *ndev)\n--\ndrivers/nfc/nfcmrvl/main.c-39-\ndrivers/nfc/nfcmrvl/main.c:40:\tif (!test_and_clear_bit(NFCMRVL_NCI_RUNNING, \u0026priv-\u003eflags))\ndrivers/nfc/nfcmrvl/main.c-41-\t\treturn 0;\n--\ndrivers/nfc/nfcmrvl/main.c=92=struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum nfcmrvl_phy phy,\n--\ndrivers/nfc/nfcmrvl/main.c-124-\tif (phy == NFCMRVL_PHY_SPI) {\ndrivers/nfc/nfcmrvl/main.c:125:\t\theadroom = NCI_SPI_HDR_LEN;\ndrivers/nfc/nfcmrvl/main.c-126-\t\ttailroom = 1;\n--\ndrivers/nfc/nfcmrvl/main.c=194=int nfcmrvl_nci_recv_frame(struct nfcmrvl_private *priv, struct sk_buff *skb)\n--\ndrivers/nfc/nfcmrvl/main.c-198-\t\t skb-\u003edata[1] == NFCMRVL_HCI_NFC_EVENT_CODE) {\ndrivers/nfc/nfcmrvl/main.c:199:\t\t\t/* Data packet, let's extract NCI payload */\ndrivers/nfc/nfcmrvl/main.c-200-\t\t\tskb_pull(skb, NFCMRVL_HCI_EVENT_HEADER_SIZE);\n--\ndrivers/nfc/nfcmrvl/main.c-212-\ndrivers/nfc/nfcmrvl/main.c:213:\tif (test_bit(NFCMRVL_NCI_RUNNING, \u0026priv-\u003eflags))\ndrivers/nfc/nfcmrvl/main.c-214-\t\tnci_recv_frame(priv-\u003endev, skb);\n--\ndrivers/nfc/nfcmrvl/nfcmrvl.h=13=struct gpio_desc;\n--\ndrivers/nfc/nfcmrvl/nfcmrvl.h-15-/* Define private flags: */\ndrivers/nfc/nfcmrvl/nfcmrvl.h:16:#define NFCMRVL_NCI_RUNNING\t\t\t1\ndrivers/nfc/nfcmrvl/nfcmrvl.h-17-#define NFCMRVL_PHY_ERROR\t\t\t2\n--\ndrivers/nfc/nfcmrvl/nfcmrvl.h-24-#define NFCMRVL_GPIO_PIN_NFC_ACTIVE\t\t0xB\ndrivers/nfc/nfcmrvl/nfcmrvl.h:25:#define NFCMRVL_NCI_MAX_EVENT_SIZE\t\t260\ndrivers/nfc/nfcmrvl/nfcmrvl.h-26-\ndrivers/nfc/nfcmrvl/nfcmrvl.h-27-/*\ndrivers/nfc/nfcmrvl/nfcmrvl.h:28: * NCI FW Parameters\ndrivers/nfc/nfcmrvl/nfcmrvl.h-29- */\n--\ndrivers/nfc/nfcmrvl/uart.c=23=static unsigned int break_control;\n--\ndrivers/nfc/nfcmrvl/uart.c-25-/*\ndrivers/nfc/nfcmrvl/uart.c:26: * NFCMRVL NCI OPS\ndrivers/nfc/nfcmrvl/uart.c-27- */\n--\ndrivers/nfc/nfcmrvl/uart.c=64=static int nfcmrvl_uart_parse_dt(struct device_node *node,\n--\ndrivers/nfc/nfcmrvl/uart.c-104-/*\ndrivers/nfc/nfcmrvl/uart.c:105: * NCI UART OPS\ndrivers/nfc/nfcmrvl/uart.c-106- */\n--\ndrivers/nfc/nfcmrvl/uart.c=190=static struct nci_uart nfcmrvl_nci_uart = {\n--\ndrivers/nfc/nfcmrvl/uart.c-192-\t.name = \"nfcmrvl_uart\",\ndrivers/nfc/nfcmrvl/uart.c:193:\t.driver = NCI_UART_DRIVER_MARVELL,\ndrivers/nfc/nfcmrvl/uart.c-194-\t.ops\t= {\n--\ndrivers/nfc/nfcmrvl/usb.c=57=static void nfcmrvl_bulk_complete(struct urb *urb)\n--\ndrivers/nfc/nfcmrvl/usb.c-64-\ndrivers/nfc/nfcmrvl/usb.c:65:\tif (!test_bit(NFCMRVL_NCI_RUNNING, \u0026drv_data-\u003eflags))\ndrivers/nfc/nfcmrvl/usb.c-66-\t\treturn;\n--\ndrivers/nfc/nfcmrvl/usb.c=103=nfcmrvl_submit_bulk_urb(struct nfcmrvl_usb_drv_data *drv_data, gfp_t mem_flags)\n--\ndrivers/nfc/nfcmrvl/usb.c-107-\tunsigned int pipe;\ndrivers/nfc/nfcmrvl/usb.c:108:\tint err, size = NFCMRVL_NCI_MAX_EVENT_SIZE;\ndrivers/nfc/nfcmrvl/usb.c-109-\n--\ndrivers/nfc/nfcmrvl/usb.c=400=static int nfcmrvl_resume(struct usb_interface *intf)\n--\ndrivers/nfc/nfcmrvl/usb.c-409-\ndrivers/nfc/nfcmrvl/usb.c:410:\tif (!test_bit(NFCMRVL_NCI_RUNNING, \u0026drv_data-\u003eflags))\ndrivers/nfc/nfcmrvl/usb.c-411-\t\tgoto done;\n--\ndrivers/nfc/nxp-nci/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/nfc/nxp-nci/Kconfig:2:config NFC_NXP_NCI\ndrivers/nfc/nxp-nci/Kconfig:3:\ttristate \"NXP-NCI NFC driver\"\ndrivers/nfc/nxp-nci/Kconfig:4:\tdepends on NFC_NCI\ndrivers/nfc/nxp-nci/Kconfig-5-\thelp\ndrivers/nfc/nxp-nci/Kconfig:6:\t Generic core driver for NXP NCI chips such as the NPC100 (PN547),\ndrivers/nfc/nxp-nci/Kconfig-7-\t NPC300 (PN548) or PN7150 families.\ndrivers/nfc/nxp-nci/Kconfig:8:\t This is a driver based on the NCI NFC kernel layers and\ndrivers/nfc/nxp-nci/Kconfig-9-\t will thus not work with NXP libnfc library.\n--\ndrivers/nfc/nxp-nci/Kconfig-14-\ndrivers/nfc/nxp-nci/Kconfig:15:config NFC_NXP_NCI_I2C\ndrivers/nfc/nxp-nci/Kconfig:16:\ttristate \"NXP-NCI I2C support\"\ndrivers/nfc/nxp-nci/Kconfig:17:\tdepends on NFC_NXP_NCI \u0026\u0026 I2C\ndrivers/nfc/nxp-nci/Kconfig-18-\thelp\ndrivers/nfc/nxp-nci/Kconfig:19:\t This module adds support for an I2C interface to the NXP NCI\ndrivers/nfc/nxp-nci/Kconfig-20-\t chips.\n--\ndrivers/nfc/nxp-nci/Makefile-2-#\ndrivers/nfc/nxp-nci/Makefile:3:# Makefile for NXP-NCI NFC driver\ndrivers/nfc/nxp-nci/Makefile-4-#\n--\ndrivers/nfc/nxp-nci/Makefile=7=nxp-nci_i2c-objs = i2c.o\ndrivers/nfc/nxp-nci/Makefile-8-\ndrivers/nfc/nxp-nci/Makefile:9:obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci.o\ndrivers/nfc/nxp-nci/Makefile:10:obj-$(CONFIG_NFC_NXP_NCI_I2C) += nxp-nci_i2c.o\n--\ndrivers/nfc/nxp-nci/core.c-2-/*\ndrivers/nfc/nxp-nci/core.c:3: * Generic driver for NXP NCI NFC chips\ndrivers/nfc/nxp-nci/core.c-4- *\n--\ndrivers/nfc/nxp-nci/core.c-20-\ndrivers/nfc/nxp-nci/core.c:21:#define NXP_NCI_HDR_LEN\t4\ndrivers/nfc/nxp-nci/core.c-22-\ndrivers/nfc/nxp-nci/core.c:23:#define NXP_NCI_NFC_PROTOCOLS (NFC_PROTO_JEWEL_MASK | \\\ndrivers/nfc/nxp-nci/core.c-24-\t\t\t NFC_PROTO_MIFARE_MASK | \\\n--\ndrivers/nfc/nxp-nci/core.c-30-\ndrivers/nfc/nxp-nci/core.c:31:#define NXP_NCI_RF_PLL_UNLOCKED_NTF nci_opcode_pack(NCI_GID_RF_MGMT, 0x21)\ndrivers/nfc/nxp-nci/core.c:32:#define NXP_NCI_RF_TXLDO_ERROR_NTF nci_opcode_pack(NCI_GID_RF_MGMT, 0x23)\ndrivers/nfc/nxp-nci/core.c-33-\ndrivers/nfc/nxp-nci/core.c=34=static int nxp_nci_open(struct nci_dev *ndev)\n--\ndrivers/nfc/nxp-nci/core.c-40-\ndrivers/nfc/nxp-nci/core.c:41:\tif (info-\u003emode != NXP_NCI_MODE_COLD) {\ndrivers/nfc/nxp-nci/core.c-42-\t\tr = -EBUSY;\n--\ndrivers/nfc/nxp-nci/core.c-46-\tif (info-\u003ephy_ops-\u003eset_mode)\ndrivers/nfc/nxp-nci/core.c:47:\t\tr = info-\u003ephy_ops-\u003eset_mode(info-\u003ephy_id, NXP_NCI_MODE_NCI);\ndrivers/nfc/nxp-nci/core.c-48-\ndrivers/nfc/nxp-nci/core.c:49:\tinfo-\u003emode = NXP_NCI_MODE_NCI;\ndrivers/nfc/nxp-nci/core.c-50-\n--\ndrivers/nfc/nxp-nci/core.c=56=static int nxp_nci_close(struct nci_dev *ndev)\n--\ndrivers/nfc/nxp-nci/core.c-63-\tif (info-\u003ephy_ops-\u003eset_mode)\ndrivers/nfc/nxp-nci/core.c:64:\t\tr = info-\u003ephy_ops-\u003eset_mode(info-\u003ephy_id, NXP_NCI_MODE_COLD);\ndrivers/nfc/nxp-nci/core.c-65-\ndrivers/nfc/nxp-nci/core.c:66:\tinfo-\u003emode = NXP_NCI_MODE_COLD;\ndrivers/nfc/nxp-nci/core.c-67-\n--\ndrivers/nfc/nxp-nci/core.c=72=static int nxp_nci_send(struct nci_dev *ndev, struct sk_buff *skb)\n--\ndrivers/nfc/nxp-nci/core.c-81-\ndrivers/nfc/nxp-nci/core.c:82:\tif (info-\u003emode != NXP_NCI_MODE_NCI) {\ndrivers/nfc/nxp-nci/core.c-83-\t\tkfree_skb(skb);\n--\ndrivers/nfc/nxp-nci/core.c=115=static const struct nci_driver_ops nxp_nci_core_ops[] = {\ndrivers/nfc/nxp-nci/core.c-116-\t{\ndrivers/nfc/nxp-nci/core.c:117:\t\t.opcode = NXP_NCI_RF_PLL_UNLOCKED_NTF,\ndrivers/nfc/nxp-nci/core.c-118-\t\t.ntf = nxp_nci_rf_pll_unlocked_ntf,\n--\ndrivers/nfc/nxp-nci/core.c-120-\t{\ndrivers/nfc/nxp-nci/core.c:121:\t\t.opcode = NXP_NCI_RF_TXLDO_ERROR_NTF,\ndrivers/nfc/nxp-nci/core.c-122-\t\t.ntf = nxp_nci_rf_txldo_error_ntf,\n--\ndrivers/nfc/nxp-nci/core.c=135=int nxp_nci_probe(void *phy_id, struct device *pdev,\n--\n\n"
} |
| 19/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 18867 output: 34 thoughts: 55 Thoughts: **NFC Virtual NCI Device Driver - Fuzzing Potential!** Okay, so I've stumbled upon `NFC_VIRTUAL_NCI`, and it immediately clicks: This is a virtual NCI device simulator driver! My mind is already racing with the implications. A virtual device... that screams "fuzzing target" to me. Think of the potential for crafting malformed NFC commands and observing the system's behavior. This could be a goldmine for uncovering vulnerabilities. Alright, time to dive in. I need to get a handle on this thing. Let's start with the basics. I'll head over to `drivers/nfc/Kconfig`. Time to see how this virtual driver is configured, built, and potentially, if there are any hidden nuances to its activation. Understanding the configuration options is crucial to effectively leverage it for fuzzing. This could be really promising! |
| 20/2 | 2026/06/26 17:42 | tool | read-file |
0mArgs:{
"File": "drivers/nfc/Kconfig",
"FirstLine": 40,
"LineCount": 30
}Results: {
"Contents": " 40:\t\t If unsure, say N.\n 41:\t\n 42:\tconfig NFC_PORT100\n 43:\t\ttristate \"Sony NFC Port-100 Series USB device support\"\n 44:\t\tdepends on USB\n 45:\t\tdepends on NFC_DIGITAL\n 46:\t\thelp\n 47:\t\t This adds support for Sony Port-100 chip based USB devices such as the\n 48:\t\t RC-S380 dongle.\n 49:\t\n 50:\t\t If unsure, say N.\n 51:\t\n 52:\tconfig NFC_VIRTUAL_NCI\n 53:\t\ttristate \"NCI device simulator driver\"\n 54:\t\tdepends on NFC_NCI\n 55:\t\thelp\n 56:\t\t NCI virtual device simulates a NCI device to the user.\n 57:\t\t It can be used to validate the NCI module and applications.\n 58:\t\t This driver supports communication between the virtual NCI device and\n 59:\t\t module.\n 60:\t\n 61:\t\t If unsure, say N.\n 62:\t\n 63:\tsource \"drivers/nfc/fdp/Kconfig\"\n 64:\tsource \"drivers/nfc/pn544/Kconfig\"\n 65:\tsource \"drivers/nfc/pn533/Kconfig\"\n 66:\tsource \"drivers/nfc/microread/Kconfig\"\n 67:\tsource \"drivers/nfc/nfcmrvl/Kconfig\"\n 68:\tsource \"drivers/nfc/st21nfca/Kconfig\"\n 69:\tsource \"drivers/nfc/st-nci/Kconfig\"\n"
} |
| 21/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 19591 output: 35 thoughts: 79 Thoughts: **My Analysis of NFC Virtual NCI and its Implications for Fuzzing** Okay, so I'm looking at this `NFC_VIRTUAL_NCI` configuration option. It's pretty straightforward: it hinges on `NFC_NCI`. If I enable `NFC_VIRTUAL_NCI`, the system is set up to allow syzkaller to create and test, in a virtual setting, NCI devices. This is significant because it opens up the NCI protocol to fuzzing, which is critical for identifying potential vulnerabilities. I need to understand the mechanics of this virtual device creation. I should dig into `drivers/nfc/virtual_ncidev.c` to see precisely how they've implemented this virtualization layer and what potential interfaces are exposed for fuzzing. |
| 22/2 | 2026/06/26 17:42 | tool | grepper |
0mArgs:{
"Expression": "virtual_nci",
"PathPrefix": "drivers/nfc/virtual_ncidev.c"
}Results: {
"Output": "drivers/nfc/virtual_ncidev.c-23-\ndrivers/nfc/virtual_ncidev.c:24:struct virtual_nci_dev {\ndrivers/nfc/virtual_ncidev.c-25-\tstruct nci_dev *ndev;\n--\ndrivers/nfc/virtual_ncidev.c-31-\ndrivers/nfc/virtual_ncidev.c:32:static int virtual_nci_open(struct nci_dev *ndev)\ndrivers/nfc/virtual_ncidev.c-33-{\ndrivers/nfc/virtual_ncidev.c:34:\tstruct virtual_nci_dev *vdev = nci_get_drvdata(ndev);\ndrivers/nfc/virtual_ncidev.c-35-\n--\ndrivers/nfc/virtual_ncidev.c-39-\ndrivers/nfc/virtual_ncidev.c:40:static int virtual_nci_close(struct nci_dev *ndev)\ndrivers/nfc/virtual_ncidev.c-41-{\ndrivers/nfc/virtual_ncidev.c:42:\tstruct virtual_nci_dev *vdev = nci_get_drvdata(ndev);\ndrivers/nfc/virtual_ncidev.c-43-\n--\ndrivers/nfc/virtual_ncidev.c-52-\ndrivers/nfc/virtual_ncidev.c:53:static int virtual_nci_send(struct nci_dev *ndev, struct sk_buff *skb)\ndrivers/nfc/virtual_ncidev.c-54-{\ndrivers/nfc/virtual_ncidev.c:55:\tstruct virtual_nci_dev *vdev = nci_get_drvdata(ndev);\ndrivers/nfc/virtual_ncidev.c-56-\n--\ndrivers/nfc/virtual_ncidev.c-75-\ndrivers/nfc/virtual_ncidev.c:76:static const struct nci_ops virtual_nci_ops = {\ndrivers/nfc/virtual_ncidev.c:77:\t.open = virtual_nci_open,\ndrivers/nfc/virtual_ncidev.c:78:\t.close = virtual_nci_close,\ndrivers/nfc/virtual_ncidev.c:79:\t.send = virtual_nci_send\ndrivers/nfc/virtual_ncidev.c-80-};\ndrivers/nfc/virtual_ncidev.c-81-\ndrivers/nfc/virtual_ncidev.c:82:static ssize_t virtual_ncidev_read(struct file *file, char __user *buf,\ndrivers/nfc/virtual_ncidev.c-83-\t\t\t\t size_t count, loff_t *ppos)\ndrivers/nfc/virtual_ncidev.c-84-{\ndrivers/nfc/virtual_ncidev.c:85:\tstruct virtual_nci_dev *vdev = file-\u003eprivate_data;\ndrivers/nfc/virtual_ncidev.c-86-\tsize_t actual_len;\n--\ndrivers/nfc/virtual_ncidev.c-112-\ndrivers/nfc/virtual_ncidev.c:113:static ssize_t virtual_ncidev_write(struct file *file,\ndrivers/nfc/virtual_ncidev.c-114-\t\t\t\t const char __user *buf,\n--\ndrivers/nfc/virtual_ncidev.c-116-{\ndrivers/nfc/virtual_ncidev.c:117:\tstruct virtual_nci_dev *vdev = file-\u003eprivate_data;\ndrivers/nfc/virtual_ncidev.c-118-\tstruct sk_buff *skb;\n--\ndrivers/nfc/virtual_ncidev.c-132-\ndrivers/nfc/virtual_ncidev.c:133:static int virtual_ncidev_open(struct inode *inode, struct file *file)\ndrivers/nfc/virtual_ncidev.c-134-{\ndrivers/nfc/virtual_ncidev.c-135-\tint ret = 0;\ndrivers/nfc/virtual_ncidev.c:136:\tstruct virtual_nci_dev *vdev;\ndrivers/nfc/virtual_ncidev.c-137-\n--\ndrivers/nfc/virtual_ncidev.c-140-\t\treturn -ENOMEM;\ndrivers/nfc/virtual_ncidev.c:141:\tvdev-\u003endev = nci_allocate_device(\u0026virtual_nci_ops,\ndrivers/nfc/virtual_ncidev.c-142-\t\tVIRTUAL_NFC_PROTOCOLS, 0, 0);\n--\ndrivers/nfc/virtual_ncidev.c-163-\ndrivers/nfc/virtual_ncidev.c:164:static int virtual_ncidev_close(struct inode *inode, struct file *file)\ndrivers/nfc/virtual_ncidev.c-165-{\ndrivers/nfc/virtual_ncidev.c:166:\tstruct virtual_nci_dev *vdev = file-\u003eprivate_data;\ndrivers/nfc/virtual_ncidev.c-167-\n--\ndrivers/nfc/virtual_ncidev.c-175-\ndrivers/nfc/virtual_ncidev.c:176:static long virtual_ncidev_ioctl(struct file *file, unsigned int cmd,\ndrivers/nfc/virtual_ncidev.c-177-\t\t\t\t unsigned long arg)\ndrivers/nfc/virtual_ncidev.c-178-{\ndrivers/nfc/virtual_ncidev.c:179:\tstruct virtual_nci_dev *vdev = file-\u003eprivate_data;\ndrivers/nfc/virtual_ncidev.c-180-\tconst struct nfc_dev *nfc_dev = vdev-\u003endev-\u003enfc_dev;\n--\ndrivers/nfc/virtual_ncidev.c-191-\ndrivers/nfc/virtual_ncidev.c:192:static const struct file_operations virtual_ncidev_fops = {\ndrivers/nfc/virtual_ncidev.c-193-\t.owner = THIS_MODULE,\ndrivers/nfc/virtual_ncidev.c:194:\t.read = virtual_ncidev_read,\ndrivers/nfc/virtual_ncidev.c:195:\t.write = virtual_ncidev_write,\ndrivers/nfc/virtual_ncidev.c:196:\t.open = virtual_ncidev_open,\ndrivers/nfc/virtual_ncidev.c:197:\t.release = virtual_ncidev_close,\ndrivers/nfc/virtual_ncidev.c:198:\t.unlocked_ioctl = virtual_ncidev_ioctl\ndrivers/nfc/virtual_ncidev.c-199-};\n--\ndrivers/nfc/virtual_ncidev.c=201=static struct miscdevice miscdev = {\ndrivers/nfc/virtual_ncidev.c-202-\t.minor = MISC_DYNAMIC_MINOR,\ndrivers/nfc/virtual_ncidev.c:203:\t.name = \"virtual_nci\",\ndrivers/nfc/virtual_ncidev.c:204:\t.fops = \u0026virtual_ncidev_fops,\ndrivers/nfc/virtual_ncidev.c-205-\t.mode = 0600,\n"
} |
| 23/2 | 2026/06/26 17:42 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 21702 output: 149 thoughts: 476 Thoughts: **Fuzzing Strategy for NCI Core Init Response Packet Parsing** Okay, here's the plan. I've been looking at this patch related to bounds checking in the NCI core init response packet parsing code. It seems like it's a good target for fuzzing. The virtual NCI device, `/dev/virtual_nci`, which is created by `NFC_VIRTUAL_NCI`, is the entry point. Syzkaller can interact with it, write data, and trigger `nci_recv_frame`. That's precisely how the NCI tests are structured. So, enabling `NFC_VIRTUAL_NCI` is the key configuration option. This virtual device directly feeds into the relevant parsing logic. I initially thought that `NFC_VIRTUAL_NCI` might be sufficient, but I need to make sure I get the dependencies right. It definitely relies on `NFC_NCI`. It looks like `NFC_NCI` in turn depends on `NFC`, so I'll need all three configs. My initial assessment is correct; this is definitely worth fuzzing. I can confirm this by checking that the symbols I need to target are reachable. The functions to focus on are `nci_core_init_rsp_packet_v1`, `nci_core_init_rsp_packet_v2`, and `nci_core_init_rsp_packet`. These are all part of the bounds checking logic. This code handles NCI initialization responses, and the virtual device allows us to inject malicious/unexpected responses. The goal is to ensure the new checks work correctly without breaking legitimate packets. I've double-checked the function names and ensured there aren't any other relevant configurations or functions in scope. This should provide sufficient coverage to detect any vulnerabilities. Now, it's time to call `set-results`. |
| 24/2 | 2026/06/26 17:42 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"NFC",
"NFC_NCI",
"NFC_VIRTUAL_NCI"
],
"FocusSymbols": [
"nci_core_init_rsp_packet_v1",
"nci_core_init_rsp_packet_v2",
"nci_core_init_rsp_packet"
],
"Reasoning": "The patch adds bounds checking to NCI core init response packet parsing. This is functional code reachable via virtual NCI devices, so it should be fuzzed to ensure the new checks correctly prevent out-of-bounds accesses without breaking valid packets.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"NFC",
"NFC_NCI",
"NFC_VIRTUAL_NCI"
],
"FocusSymbols": [
"nci_core_init_rsp_packet_v1",
"nci_core_init_rsp_packet_v2",
"nci_core_init_rsp_packet"
],
"Reasoning": "The patch adds bounds checking to NCI core init response packet parsing. This is functional code reachable via virtual NCI devices, so it should be fuzzed to ensure the new checks correctly prevent out-of-bounds accesses without breaking valid packets.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|