public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@kernel.org>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Jens Wiklander <jens.wiklander@linaro.org>,
	 Sudeep Holla <sudeep.holla@kernel.org>,
	 Sebastian Ene <sebastianene@google.com>
Subject: [PATCH v2 00/11] firmware: arm_ffa: Fix cleanup, notification, and discovery paths
Date: Tue, 28 Apr 2026 19:33:24 +0100	[thread overview]
Message-ID: <20260428-ffa_fixes-v2-0-8595ae450034@kernel.org> (raw)

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 <sudeep.holla@kernel.org>
---
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



             reply	other threads:[~2026-04-28 18:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 18:33 Sudeep Holla [this message]
2026-04-28 18:33 ` [PATCH v2 01/11] firmware: arm_ffa: Check for NULL FF-A ID table while driver registration Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 02/11] firmware: arm_ffa: Skip free_pages on RX buffer alloc failure Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 03/11] firmware: arm_ffa: Avoid collapsing NPI work from different CPUs Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 04/11] firmware: arm_ffa: Fix per-vcpu self notifications handling in workqueue Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 05/11] firmware: arm_ffa: Unregister bus notifier on teardown for FF-A v1.0 Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 06/11] firmware: arm_ffa: Bound PARTITION_INFO_GET_REGS copies Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 07/11] firmware: arm_ffa: Keep framework RX release under lock Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 08/11] firmware: arm_ffa: Validate framework notification message layout Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 09/11] firmware: arm_ffa: Align RxTx buffer size before mapping Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 10/11] firmware: arm_ffa: Snapshot notifier callbacks under lock Sudeep Holla
2026-04-28 18:33 ` [PATCH v2 11/11] firmware: arm_ffa: Fix sched-recv callback partition lookup Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260428-ffa_fixes-v2-0-8595ae450034@kernel.org \
    --to=sudeep.holla@kernel.org \
    --cc=jens.wiklander@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastianene@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox