Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1356673 > unrolled thread

[BUG] crypto: sun4i-ss: Random data corruption

Started byCorentin LABBE <clabbe.montjoie@gmail.com>
First post2016-03-13 13:50 +0100
Last post2016-03-13 13:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [BUG] crypto: sun4i-ss: Random data corruption Corentin LABBE <clabbe.montjoie@gmail.com> - 2016-03-13 13:50 +0100

#1356673 — [BUG] crypto: sun4i-ss: Random data corruption

FromCorentin LABBE <clabbe.montjoie@gmail.com>
Date2016-03-13 13:50 +0100
Subject[BUG] crypto: sun4i-ss: Random data corruption
Message-ID<rcdD3-5OV-7@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web