linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [BUG] crypto: sun4i-ss: Random data corruption
@ 2016-03-13 12:40 Corentin LABBE
  0 siblings, 0 replies; only message in thread
From: Corentin LABBE @ 2016-03-13 12:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hello

I had some report of random data corruption of people using cryptsetup with my sun4i-ss driver (via AF_ALG).
Even if it is hard to hit, I could confirm it by continuously moving files on a LUKS encrypted FS and comparing hash of it before and after.
The corruption is always when deciphering the end of 512bytes sector and always of a length multiple of 4.

The only way of removing this random corruption is to transform all spinlock_bh by spinlock_irqsave.
In fact this problem is extremely similar to another bug that I have encountered (https://lkml.org/lkml/2015/10/11/47)
The only difference is that I do not need to remove SG_MITER_ATOMIC for removing the issue.

So my question remains nearly the same than on my first problem: Why disabling irq remove this data corruption ?

Any help/suggestions will be really appreciated since I doesn't understand why this fix works.

Regards

LABBE Corentin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-13 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-13 12:40 [BUG] crypto: sun4i-ss: Random data corruption Corentin LABBE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).