From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D40CA125AA for ; Tue, 28 Apr 2026 18:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777401229; cv=none; b=WWlS9ktNKXblejaz+WLskCIsyEqxV+Kie0PfYRHzNgAGlSYe81NAY9bjEwjqrQWn1qY8/nmf6GRt6dPo0ZmGHERxzeOn/k2rkHaJkZwNGH2fMm+mh9WoR8C3Ux7DnE2/zzagWkG+hZnDIj+RdoLtWhW1xdUsq680e62eTK0Ixus= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777401229; c=relaxed/simple; bh=EMyzlxpVvJDbrhhvh1Vj6X1lXlKjwC8Q+i5uCO+iUBA=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Kv1pTlBhgy6urgA0CC3677AAvbhAlvUcdxv30me/WIqBo97B+mYQcKESZqcklO8DSwYu1xF426Pws5X45LS1xCuQ5O/d3zqpS4/8nrZs/rBp0fguXDv+sUemxTmh2TD57d1wcFA3r/5BfR46cqmqKCUZufqzuzWEG4u25xOMYrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B0eOsdtp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B0eOsdtp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CED86C2BCAF; Tue, 28 Apr 2026 18:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777401229; bh=EMyzlxpVvJDbrhhvh1Vj6X1lXlKjwC8Q+i5uCO+iUBA=; h=From:Subject:Date:To:Cc:From; b=B0eOsdtp0k+5cIjV70VycURCtopArbuJg0Cet0+PCQZkhRfiG54e631fHkcrEcyX2 jnyX/ak3xHJGBX3ZcU9YkMDa9nhb+Fm4Jz+nR8Pa3gF9140ZCDXivcr+Nuu8h9RrGo nYf5tqSG2xIWv5+S1JsngAWOiH7CWRjFHDTH4syqru9LTnzQL4s5NoWoAl0zmqskh/ J9DUNy5ZAdKwGHf+aVvMLbnTFW68ZW2l29FTxFCRYSwy11AZaJWN/3J8Hg9vjaqoZ3 fqzStatm3Vdhn43/XuUzN+APcIHvc3FEX/hRV/otS0p6J3mpjITcRZBuyyeSaf0C8l jcuX3WmyKHt7Q== From: Sudeep Holla Subject: [PATCH v2 00/11] firmware: arm_ffa: Fix cleanup, notification, and discovery paths Date: Tue, 28 Apr 2026 19:33:24 +0100 Message-Id: <20260428-ffa_fixes-v2-0-8595ae450034@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAHj98GkC/22NywrCMBBFf6XM2kgeNagr/0OKxHbSRiWRTA1Ky b+b1K3Lwz2cuwBhdEhwbBaImBy54AvITQP9ZPyIzA2FQXKpeSsVs9ZcrHsjsdYMSlmOKHcciv+ MuA5FP3c/ptf1hv1cA9WYHM0hftazJKr3r5sE40wLsT9oLYy1eLpj9PjYhjhCl3P+Amb28QS1A AAA X-Change-ID: 20260423-ffa_fixes-4ad33f0ee250 To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Jens Wiklander , Sudeep Holla , Sebastian Ene X-Mailer: b4 0.15.2 Hi all, This series fixes a set of issues in the FF-A driver around init cleanup, framework notification handling, v1.0 notifier lifetime, and partition discovery. The fixes are all small and localized, but together they tighten a few important paths: - fix the early init unwind path when RX buffer allocation fails - align the stored RX/TX buffer size with the size actually mapped to firmware - ensure the framework notification handler always releases the RX buffer correctly - validate framework notification payload bounds before copying data out of the shared RX buffer - fix the partition lookup used for sched-recv callback registration - unregister the FF-A v1.0 bus notifier during teardown - bound the register-based partition discovery copies against the caller buffer - reject FF-A driver registration without an ID table - fix per-vcpu drivers own notifications handling in workqueue - make NPI per cpu work item to avoid collapsing already queued work This is the outcome of the self-initiated review of the entire driver following the oversight of Sashiko’s review on one of the patches that was merged. https://sashiko.dev/#/patchset/20260402113939.930221-1-sebastianene@google.com Signed-off-by: Sudeep Holla --- Changes in v2: - Addressed valid comments from sashiko (https://sashiko.dev/#/patchset/20260423-ffa_fixes-v1-0-61189661affe@kernel.org) - Added couple of new fixes based on the review - Link to v1: https://patch.msgid.link/20260423-ffa_fixes-v1-0-61189661affe@kernel.org --- Sudeep Holla (11): firmware: arm_ffa: Check for NULL FF-A ID table while driver registration firmware: arm_ffa: Skip free_pages on RX buffer alloc failure firmware: arm_ffa: Avoid collapsing NPI work from different CPUs firmware: arm_ffa: Fix per-vcpu self notifications handling in workqueue firmware: arm_ffa: Unregister bus notifier on teardown for FF-A v1.0 firmware: arm_ffa: Bound PARTITION_INFO_GET_REGS copies firmware: arm_ffa: Keep framework RX release under lock firmware: arm_ffa: Validate framework notification message layout firmware: arm_ffa: Align RxTx buffer size before mapping firmware: arm_ffa: Snapshot notifier callbacks under lock firmware: arm_ffa: Fix sched-recv callback partition lookup drivers/firmware/arm_ffa/bus.c | 4 +- drivers/firmware/arm_ffa/driver.c | 138 +++++++++++++++++++++++++++----------- 2 files changed, 102 insertions(+), 40 deletions(-) --- base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 change-id: 20260423-ffa_fixes-4ad33f0ee250 -- Regards, Sudeep