• Corentin Labbe's avatar
    crypto: ixp4xx - fallback when having more than one SG · dfb098d6
    Corentin Labbe authored
    Testing ixp4xx_crypto lead to:
    alg: skcipher: ecb(des)-ixp4xx encryption overran dst buffer on test vector 0, cfg="two even aligned splits"
    
    The HW overwrites destination always when sg_nents() > 1.
    The problem seems that the HW always write areq->cryptlen bytes on the
    last SG.
    A comment in driver's code seems to give a clue that multiple SG was not
    planned "This was never tested by Intel for more than one dst buffer, I think".
    So let's add a fallback for this situation.
    Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    dfb098d6
ixp4xx_crypto.c 38.8 KB