• Eric Biggers's avatar
    crypto: artpec6 - stop setting alignmask for ahashes · a06f7a8a
    Eric Biggers authored
    The crypto API's support for alignmasks for ahash algorithms is nearly
    useless, as its only effect is to cause the API to align the key and
    result buffers.  The drivers that happen to be specifying an alignmask
    for ahash rarely actually need it.  When they do, it's easily fixable,
    especially considering that these buffers cannot be used for DMA.
    
    In preparation for removing alignmask support from ahash, this patch
    makes the artpec6 driver no longer use it.  This driver is unusual in
    that it DMAs the digest directly to the result buffer.  This is broken
    because the crypto API provides the result buffer as an arbitrary
    virtual address, which might not be valid for DMA, even after the crypto
    API applies the alignmask.  Maybe the alignmask (which this driver set
    only to 3) made this code work in a few more cases than it otherwise
    would have.  But even if so, it doesn't make sense for this single
    driver that is broken anyway to block removal of the alignmask support.
    Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    a06f7a8a
artpec6_crypto.c 77.7 KB