Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7704326ybi; Wed, 5 Jun 2019 23:38:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwginNcurDYXKcEos0ZZ41IcEz/aOs8tks1J33xVLeUt+0sCbUT7y9K7Z7nL9Z5RD5sx1m6 X-Received: by 2002:a17:902:20eb:: with SMTP id v40mr48637421plg.239.1559803120678; Wed, 05 Jun 2019 23:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559803120; cv=none; d=google.com; s=arc-20160816; b=QIwbk3qqxszUNYLgt6TZ9dyl6RsN4eODKmar5He6O/mNyrbtq0ZmRbvvv5tfY6YVFd 5kjgeaRqrWjTF4+nhHPWQUKh7o/rcUgEbHI9kzTh51a8g5Z6JJKrhW7fljlZsEyemW2C dQ+rW7/Opc2fzKwMDejbENhh/XkTVqTvUN1LRZBBK5YGaWxqey4PC7S/UEPsszb4iX9k Z5pjSzzHQ4qGLJD8A79hsFRq6S5PTTTz5pOG14SvQULQN157mMQ+Ig8m1oqJX2xVytku kkoVr1YMO0gnwUg5VunokVvZuDWVA5tabFMcHuGBnF8GZCZjVCGALaowUFzUcMz/n7eU e8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=q4OMEDQZHmHp87wC5Q4ob3X2l/yScwqsW/tRWckvF1g=; b=uot9u+yGqTOD4tZJUSkZGOSYbLDW8w6EOcRr/ID21sK+4DJAKnre32Y6gxV0QZn5Ni zf5KgdOwCR4Q+yqhVDrCci43bk6hzPUDMesgpjPDhb4p5KGsE8OEV+CzbH77abIoSvXo K/AmtePAEwmKIblt6aEJgtE2ewZAbDWX9MIcGPa+RskNvGwDvzPHGPyQRBvBrhQT7k59 J8LiVpr+CTMgR+8s1li9osQiGUQCW6YAgxP146+2Atv7j8zcQajkXEi7vTSFLr7dd/cj MllNRq880suRBCwGMN0JXslFiETnkWlRVOGrtbogAFRbIySgUJaURSmAXxk0Row3QFxc e3sw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21si934655pls.48.2019.06.05.23.38.18; Wed, 05 Jun 2019 23:38:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725766AbfFFGhd (ORCPT + 99 others); Thu, 6 Jun 2019 02:37:33 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37922 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725267AbfFFGhd (ORCPT ); Thu, 6 Jun 2019 02:37:33 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hYm1g-0006bn-NT; Thu, 06 Jun 2019 14:37:28 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1hYm1c-0003k2-At; Thu, 06 Jun 2019 14:37:24 +0800 Date: Thu, 6 Jun 2019 14:37:24 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: Iuliana Prodan , Eric Biggers , "David S. Miller" , Horia Geanta , Sascha Hauer , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Linux Kernel Mailing List , dl-linux-imx Subject: Re: [PATCH] crypto: gcm - fix cacheline sharing Message-ID: <20190606063724.n77z7gaf32tmyxng@gondor.apana.org.au> References: <20190529202728.GA35103@gmail.com> <20190530133427.qrwjzctac2x6nsby@gondor.apana.org.au> <20190530142734.qlhgzeal22zxfhk5@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, May 30, 2019 at 04:31:09PM +0200, Ard Biesheuvel wrote: > > This might work: > > diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c > index c0ece44f303b..3d313d2a279a 100644 > --- a/drivers/crypto/caam/caamalg.c > +++ b/drivers/crypto/caam/caamalg.c > @@ -1661,7 +1661,8 @@ static int aead_decrypt(struct aead_request *req) > * allocate and map the skcipher extended descriptor for skcipher > */ > static struct skcipher_edesc *skcipher_edesc_alloc(struct > skcipher_request *req, > - int desc_bytes) > + int desc_bytes, > + u8 const *input_iv) > { > struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); > struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher); > @@ -1745,7 +1746,7 @@ static struct skcipher_edesc > *skcipher_edesc_alloc(struct skcipher_request *req, > /* Make sure IV is located in a DMAable area */ > if (ivsize) { > iv = (u8 *)edesc->hw_desc + desc_bytes + sec4_sg_bytes; > - memcpy(iv, req->iv, ivsize); > + memcpy(iv, input_iv, ivsize); > > iv_dma = dma_map_single(jrdev, iv, ivsize, DMA_TO_DEVICE); > if (dma_mapping_error(jrdev, iv_dma)) { Hi Ard: I presume you will be submitting this patch at some point? When you do please base it on top of your other one which I'm about to merge. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt