From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796026012; b=LmKbhKLyS7HQYn6Lvo402Pb/d2P/vuwaKbnVHm6nKKUCaz+wVsbTy4WS3N/ikY93JKSj rIuKOsrzOKqN0KQqwG4ptPtqBu8fcSkrIMF8O8VvVqgSrvJemOeVQbRowkzbIDBEz21Z3 vYafWh/Lec1Ep+JVLAU0pe3C1Nkb+FmMZuYpgehBPpK4pTAuFCxlU0ZqfZMQl32zxjFcI akoxbLywbeUc2LMHqhnb26cnx7sNv7mJ8A5L2p/ZIalbRhcGjx0SyqXQfxhYemUnymDkK uPYawAjSOrwDRL4yqlh0ECAMfi66F38EPJ0/7A64pbJdrP4yVbbdeHWfotip05HTYUQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796026012; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=54dBXNOxOgnSGfbno/olJRksDdNSr43mLw2ujhqdFHw=; b=xbCWCRvle9XaL/DdjeLOf6CS8hV1IgexP28nrqkLY2nWpthDwHaDftLRcsuCGoerhAvv INfG6iNRiyoChZFqfoL1L/kOQWxPISA6LN1XRePXhHz2wZNOzYWVGz4s2RXfO5LC084i1 K0oUgEzA8EgFpURvr9rRpfgiSnVv1+0Pc2GDHUvalExxiEfoTsMVU9zNYbWrz9+jOOqjo 03CFiTMP0oY9wHt/C8JsV+vHCpBZwrb6/hNxAeyZBogmN19P17BP0XTAxVZhUdur0e3Ws 1k4I5GV18NFurRL/cjHMn2quXPowt9ogShKMLISAah/Vd4AJCzQ58OsTkYhuXpIpQIw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=octane.security; spf=pass smtp.mailfrom=octane.security; dkim=pass header.d=octane.security header.i=@octane.security header.a=rsa-sha256 header.s=google header.b=UfoV7uvT; arc=none smtp.remote-ip=74.125.82.45 Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2CA4606A320 for ; Mon, 30 Nov 2026 08:06:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C2CA4606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=octane.security Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=octane.security Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=octane.security header.i=@octane.security header.a=rsa-sha256 header.s=google header.b=UfoV7uvT Received: by mail-dl1-f45.google.com with SMTP id a92af1059eb24-1b5786e099cso9658000c88.0 for ; Mon, 30 Nov 2026 00:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=octane.security; s=google; t=1796026011; x=1796630811; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=54dBXNOxOgnSGfbno/olJRksDdNSr43mLw2ujhqdFHw=; b=UfoV7uvTW4J4QDnE1d7Wd9yF6W86wdf6d9/CFH93Oh+c3imdhlRazOgZVMzYelVmFy D+rLH8wYTWtyLPHkzJ3sOxTDUhhn1nckZG8uLrc3hcc864ivrOYLV8V0/mV66o90yLMJ GU0QpI6sONdDV3G1QH6jlRXUWqtzJ1lfHS85ZwXIdS+CJZF5n19BibUX6fMDsI/DFzEi jFSGfJDFTDwb8zrSLFthOKr1VF762eTU1ebuxI53mh1Hhbx3TfttcJUTv2sOpisV0bhw I5oNuxckZ98Sncvn4A1dLbJ9Vh4FH4pn63vGnIJwiVJ3hgVfujSiHrLR9yyUiOxcQQJ0 eChA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796026011; x=1796630811; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=54dBXNOxOgnSGfbno/olJRksDdNSr43mLw2ujhqdFHw=; b=QbxPMBq34JBcMRCd8W8MHqnmgXfTCn5lKArekFzeC7J5aiUVRlDlrizPBQjFmsY3I1 uD4jGHq4+bT0dZR8SjsLVn97Nf7vSsoAbVWySMbeBPS7tvx5xBHy7roPrrD68QYalJhg pG6dwAqw9etft3etVFUY1OrczPNiwuuMvWkDiiqTMo8FymOPH+ZnQCzcChWHIWvD5RYB 0fO0ZEYMLEyXUBJTkGmSJt8V0FLp06FslUiVIgdjKLfZiK0LFyA06iOrzNlB/oXwtIZq 2MSSf4/RsGsnYAIF48uMXsIJV4GZa/Ln9oKzsa7pG5oFy03mltryOboQW1NNl7uD6nMj yvmQ== X-Gm-Message-State: APuU4Z/4e/ij2Ex5xFt468rs6wbpgLqR00VpT9D77MUMQSZuoWsULqNp r8ImyBfq/WlFJLSOPO2PWIoTHuRHI4EA8lg4WGT4AgsbcHzXsTcweMh0IrWNehicwMBu4Efnhob ZOjkR X-Gm-Gg: AZFdTZcaRkRKjE6nrbo9UbjXOhL0OAzdSe9NImCFt6r2u9U4ZEnSMjHZE7C1Aa0/02Q vXq0yil/7g3rYQPSFRzeNSxT7Xx+pYYXhTuTfYEuukRLIXJIUzT869uwynqrfR4+ehsRv3m2U0I qypWqQwh1BqBRwPtrXVKooLwlrEUS7CG/chy/HzE4TnvgXtWAvr9xX2rccaZgmk+gTeMWmbt794 bbrQLVS47Fea3kNgkdqZM+26R/EVkqFZhT9B/jZ5qXCnFnm0FpVIGkTLf3TM38kuHxUr8thDXV/ rV1oAf3Cj6WhkW+cUhVJ3UiYKJ6XWz3xiUORiZi7rfjwcY5YqrOYZ7I5sz1AZIHAf8zPBHhUOnS hrfu8YsevxJkGW/2DxD94lTIGcwDbM+zVIEYleGe449JcHPbHel3S015PlA5zqKLoTQBeuQX/Qh fna+anwQyZiHkSRvSRIUUfM7Fsgma6Iwj7rowY6c4cQs2sIlRVKKX0e5xdNs9GDrpt+AW2KR1zb QeLRYypU42/ZuY6o10wm2VH+tttB0J18eF3zMQJ5C4/IOqhESEiS1eQn1nLylzw/quekdrgHQJc 0TENpGIlRlwfKXH2BLWrh6Eo1ewX9v0FX2uJ46fu8SGyz8rqPZ++7DhPSSlUxQ33nd5vYdrKBJD QiRJ35PFxpW/4JsGQWimLKI0atHhJWLiG6FypagStxRWnfSQBRw== X-Received: by 2002:a05:701b:2083:10b0:164:4e36:f956 with SMTP id a92af1059eb24-1b5568b47a4mr33062960c88.16.1796026010614; Mon, 30 Nov 2026 00:06:50 -0800 (PST) Received: from localhost.localdomain ([103.47.169.47]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b556829d31sm123533184c88.9.2026.11.30.00.06.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Nov 2026 00:06:50 -0800 (PST) From: Shubham Antil To: netdev@vger.kernel.org Cc: Simon Horman , gio@octane.security, David Heidelberg , oe-linux-nfc@lists.linux.dev Subject: [PATCH net v9 0/2] nfc: split firmware download admission fixes Date: Mon, 30 Nov 2026 13:36:43 +0530 Message-ID: <20261130080645.60464-1-shubham@octane.security> X-Mailer: git-send-email 2.54.0 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The v8 series combined several independent NFC fixes. This standalone submission contains only the core firmware-download admission fix. As requested in review, patch 1 adds the READ_ONCE() and WRITE_ONCE() annotations without changing the state machine. Patch 2 then rejects an overlapping firmware request without disturbing the active request. The issue was found during an AI-assisted source audit using OpenAI Codex, gpt-5.6-sol. The overlapping-download condition was reproduced at runtime by issuing two NFC_CMD_FW_DOWNLOAD requests to a pty-backed controller. With this series the second request returned -EBUSY without disturbing the first. No production incident or pre-fix kernel warning was observed. Patch development and test planning used the same assistant. Each mail patch was applied independently to the base below on the Linux test host. The affected NFC objects built after every patch with W=1 and sparse. A pty-backed controller was used for the overlapping-request test; no physical NFC controller was available. Changes since v8: - send firmware-download admission as an independent patch set - place the one-copy annotations in a preparatory patch - record validation and hardware availability in the commits - add the requested AI-assistance trailer Shubham Antil (2): nfc: annotate firmware download state accesses nfc: reject overlapping firmware downloads drivers/nfc/nfcmrvl/main.c | 2 +- drivers/nfc/nfcmrvl/uart.c | 4 ++-- net/nfc/core.c | 13 +++++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0 -- 2.54.0