Re: [BUG] crypto: caam - RSA encrypt doesn't always complete new data in out_buf

From: Kepplinger-Novakovic Martin

Date: Wed Feb 25 2026 - 03:02:37 EST


Am Dienstag, dem 24.02.2026 um 17:41 +0100 schrieb Lukas Wunner:
> On Tue, Feb 24, 2026 at 04:09:51PM +0000, Kepplinger-Novakovic Martin wrote:
> > Am Dienstag, dem 24.02.2026 um 16:04 +0100 schrieb Lukas Wunner:
> > > On Tue, Feb 24, 2026 at 02:17:22PM +0000, Kepplinger-Novakovic Martin wrote:
> > > > This works until v6.6 and fails after ("crypto: ahash - optimize
> > > > performance when wrapping shash")
> > > > but too much has happened that I could revert one and I might be wrong
> > > > with that commit even.
> > >
> > > It would be good if you could bisect to exactly pinpoint the offending
> > > commit.
> >
> > I know v6.6 worked. v6.7 showed
> > [    2.978722] caam_jr 2142000.jr: 40000013: DECO: desc idx 0: Header Error.
> > Invalid length or parity, or certain other problems.
>
> Well there are 18404 commits between v6.6 and v6.7, so 14 or 15 steps
> should be sufficient to find the culprit with git bisect.
>
> It's quite doubtful that 2f1f34c1bf7b ("crypto: ahash - optimize
> performance when wrapping shash") has anything to do with it.
> It doesn't touch asymmetric crypto code.  If you absolutely
> positively think it's the culprit, "git checkout 2f1f34c1bf7b^"
> plus compile would confirm that.
>
> > I can try to narrow this down a bit later.
>
> I really recommend starting with git bisect now, not doing it later.
> It's the most efficient use of your time.
>

ok I can confirm: "git checkout 2f1f34c1bf7b^" indeed is ok and 2f1f34c1bf7b is bad.

It's not the same behaviour I described (from v6.18/v6.19. that could be a combination of bugs) because on 2f1f34c1bf7b regdb cert verify succeeds,
only dm-verity fails, starting with this commit
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2f1f34c1bf7b309b296bc04321a09e6b5dba0673


2.956222] caam_jr 2142000.jr: 40000013: DECO: desc idx 0: Header Error. Invalid length or parity, or certain other problems.
[ 2.967918] SQUASHFS error: Failed to read block 0x0: -5
[ 2.973269] unable to read squashfs_super_block
kinit: Cannot open root device dev(254,0)
kinit: init not found!
[ 3.009360] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000200
[ 3.017063] CPU: 0 PID: 1 Comm: init Not tainted 6.6.0-rc1-ge-26.02.1-ge_pc_cc_gw-fronius-gbec79294ad24 #215
[ 3.026918] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
[ 3.033124] unwind_backtrace from show_stack+0x10/0x14
[ 3.038396] show_stack from dump_stack_lvl+0x24/0x2c
[ 3.043494] dump_stack_lvl from panic+0xf4/0x2d0
[ 3.048252] panic from do_exit+0x224/0x874
[ 3.052492] do_exit from do_group_exit+0x0/0xa4
[ 3.057150] do_group_exit from ret_fast_syscall+0x0/0x54


what could I test for you in order to help?

thank you!

martin