[PATCH 2/2] ACPI: FFH: Support FF-A direct request 2 calls

Jamie Nguyen jamien at nvidia.com
Tue Nov 3 13:11:36 PST 2026


On Tue, Nov 03, 2026 at 05:39:07PM +0000, Sudeep Holla wrote:
[...]
> +	if (!acpi_ffh_ffa_version_negotiated) {
> +		args.a0 = FFA_VERSION;
> +		args.a1 = FFA_VERSION_1_2;

Same question as on the earlier thread: how does this work if the
transport driver has already negotiated a version?

[...]
> +	ret = acpi_ffh_ffa_features(ffh_ctxt, FFA_PARTITION_INFO_GET_REGS);
> +	if (ret)
> +		goto out;

I think REGS is only needed when X1 is zero, and if I understand
correctly it's optional at the Non-secure physical instance. Would it
make sense to check it in the lookup path instead, so an explicit
receiver ID still works without it?

[...]
> +	memcpy(&args.a4, &buf[4], len - 4 * sizeof(u64));

I believe this would trip FORTIFY_SOURCE's field-spanning write check.
So I suggest:

	memcpy((void *)&args + offsetof(struct arm_smccc_1_2_regs, a4),
	       &buf[4], len - 4 * sizeof(u64));



More information about the linux-arm-kernel mailing list