Re: [PATCH] crypto: caam/jr - fix ablkcipher_edesc pointer arithmetic

2018-09-20 Thread Herbert Xu
On Fri, Sep 14, 2018 at 06:34:28PM +0300, Horia Geantă wrote: > In some cases the zero-length hw_desc array at the end of > ablkcipher_edesc struct requires for 4B of tail padding. > > Due to tail padding and the way pointers to S/G table and IV > are computed: > edesc->sec4_sg = (void *)ede

[PATCH] crypto: caam/jr - fix ablkcipher_edesc pointer arithmetic

2018-09-14 Thread Horia Geantă
In some cases the zero-length hw_desc array at the end of ablkcipher_edesc struct requires for 4B of tail padding. Due to tail padding and the way pointers to S/G table and IV are computed: edesc->sec4_sg = (void *)edesc + sizeof(struct ablkcipher_edesc) + desc_byt