• Russell King's avatar
    crypto: marvell/cesa - ensure iter.base.op_len is the full op length · bd274b10
    Russell King authored
    When we process the last request of data, and the request contains user
    data, the loop in mv_cesa_ahash_dma_req_init() marks the first data size
    as being iter.base.op_len which does not include the size of the cache
    data.  This means we end up hashing an insufficient amount of data.
    
    Fix this by always including the cache size in the first operation
    length of any request.
    
    This has the effect that for a request containing no user data,
    
    	iter.base.op_len === iter.src.op_offset === creq->cache_ptr
    
    As a result, we include one further change to use iter.base.op_len in
    the cache-but-no-user-data case to make the next change clearer.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    bd274b10
hash.c 33.6 KB