Re: [RFC PATCH 1/1] crypto: caam - fix in-place RSA payload DMA mapping

From: Jeff Barnes

Date: Fri Nov 13 2026 - 15:50:03 EST


Hi Sahil, Changwei,

Thanks for the review.

> Could you either check req->src == req->dst (before the leading zeros are
> stripped), or at least state in the commit message that only an exact
> head alias is handled?

Agreed. I'll detect the original req->src == req->dst alias before
leading-zero stripping and handle the advanced-source case through the
destination bounce path, rather than limit the fix to effective-head
equality.

> so the alias case could simply be one more trigger for the bounce path.

That makes sense. I'll use the bounce path for multi-segment aliases
instead of rejecting them with -EOPNOTSUPP or adding separate SEC4 views.

> Could the two of you agree on an order, so that whichever lands second
> is rebased with this in mind?

Changwei, would putting your series first work for you? I see v5 now
uses fixup_dst; I propose basing my respin on that infrastructure.
I'll ensure all failure paths release any allocated bounce buffer.

> Could you split them into a separate patch?
> That makes them easier to backport.

Yes, I'll split out the sg_nents_for_len() validation and place the
checks before destination traversal and bounce allocation.

I'll also add the requested Fixes and stable tags to the DMA alias fix.

Thanks for offering to test on i.MX8M with CONFIG_DMA_API_DEBUG.
I'll copy you on the respin and identify its prerequisite series.

Thanks,
Jeff