From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert Xu Subject: Re: [PATCH] crypto: skcipher - Fix skcipher_walk_aead_common Date: Sat, 25 Nov 2017 11:13:58 +1100 Message-ID: <20171125001358.GA20780@gondor.apana.org.au> References: <20171123124906.15754-1-omosnacek@gmail.com> <20171124050740.GA14836@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: "David S. Miller" , linux-crypto@vger.kernel.org, stable@vger.kernel.org To: Ondrej =?utf-8?B?TW9zbsOhxI1law==?= Return-path: Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org On Fri, Nov 24, 2017 at 11:53:53AM +0100, Ondrej Mosnáček wrote: > (I accidentally hit "reply" instead of "reply all", so resending) > > 2017-11-24 6:07 GMT+01:00 Herbert Xu : > > On Thu, Nov 23, 2017 at 01:49:06PM +0100, Ondrej Mosnacek wrote: > >> diff --git a/crypto/skcipher.c b/crypto/skcipher.c > >> index 4faa0fd53b0c..6c45ed536664 100644 > >> --- a/crypto/skcipher.c > >> +++ b/crypto/skcipher.c > >> @@ -517,6 +517,9 @@ static int skcipher_walk_aead_common(struct skcipher_walk *walk, > >> scatterwalk_copychunks(NULL, &walk->in, req->assoclen, 2); > >> scatterwalk_copychunks(NULL, &walk->out, req->assoclen, 2); > >> > >> + scatterwalk_done(&walk->in, 0, walk->total); > >> + scatterwalk_done(&walk->out, 0, walk->total); > > > > That should be 1 instead of 0 for walk->out. > > > > Could you please fix and resubmit? > > Since the associated data is not written, just skipped, I believe 0 is > more appropriate. scatterwalk_copychunks(..., 2) also calls > scatterwalk_pagedone() with out=0 internally. Thanks for the explanation. Patch applied. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt