Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp436203imu; Tue, 11 Dec 2018 01:27:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/mcpPLTFNlsWQNcV+PEbcC5vzEawaFGLzUtAV+zISUtkFwx+/e+me8mxyoH08iRsNgIWa X-Received: by 2002:a62:7e93:: with SMTP id z141mr15309828pfc.239.1544520449133; Tue, 11 Dec 2018 01:27:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544520449; cv=none; d=google.com; s=arc-20160816; b=ucCtMmowdk1L1wM45o5uIexq8cXHzabsqj3qTndR2ugIUlZ/o2YKKe9LFHEfjWMemR ulLczji8ELSCLI/DmkQP5pJIH2mqpyRaH7SomgbtQpfBJXUhZpN+ufh2oa64adHvZ/Ma JXpXXnqHhNeheZNJfPtVOa3+PeBvnhkKzXedSwdBA1wSsOkID4O4ebNZ8AeGUzurzLI/ tBYSFFFXJvyGpbdLEsdC3+Lh0wRPg/Hd2l3dkDcgj8L+LWQ0Mf3v0Y3wYXzWRFYUJ+w2 s2eKIKKog/bstdft75NM4YH2zya7E+cRqNPcFTrLW3rV2GCBrRH0UnnQRuYU6+Na9+3b jrMA== 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=wjz2Dd/t+BIpowqMVeuCG0HsqKBUdCY6j94bAZLIuWc=; b=LuDp1ZxNItl1iIwCid10hb2wBEPZF+fpd+1aF29chZT8ljU7JHxRbiUGG2ewEGKwrJ LJG15oOw4Hj63i4ZTVfENKGGqt1xyjFLLaj5zMMuJBiNClaTKPdi6MyHz0BiE5UqzN7W KNv4RPy/WAc6zVECrFLbwx5TTZr7kPLIpbF5OSThF+U558B7qtV1AKfB/DJ2X9jUr+Ej URofWhb0Gk4T/BT3urNgWA6bl7cQiFLBzm4JOiqTOIOGx4m+ZCjhpLSawWlDOTN39tpY r11inZ7P8Y62Zw9VLSF/mZgcxpHMVj+WvcQFvVUTHGwue/sWRz4SLnnE0wcUwAZHBQze aOoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b124si12687071pfg.47.2018.12.11.01.27.14; Tue, 11 Dec 2018 01:27:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726210AbeLKJ0Q (ORCPT + 99 others); Tue, 11 Dec 2018 04:26:16 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:43580 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbeLKJ0Q (ORCPT ); Tue, 11 Dec 2018 04:26:16 -0500 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 1gWeIs-0007tw-94; Tue, 11 Dec 2018 17:26:10 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1gWeIo-0002o0-G5; Tue, 11 Dec 2018 17:26:06 +0800 Date: Tue, 11 Dec 2018 17:26:06 +0800 From: Herbert Xu To: Christophe Leroy Cc: "David S. Miller" , Ard Biesheuvel , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK Message-ID: <20181211092606.il7a2gc4jlsnij3n@gondor.apana.org.au> References: <20181211072940.4E0B0716F4@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181211072940.4E0B0716F4@localhost.localdomain> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 11, 2018 at 07:29:40AM +0000, Christophe Leroy wrote: > > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > index 6988012deca4..385ec970b639 100644 > --- a/drivers/crypto/talitos.c > +++ b/drivers/crypto/talitos.c > @@ -1668,8 +1668,11 @@ static struct talitos_edesc *ablkcipher_edesc_alloc(struct ablkcipher_request * > struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher); > unsigned int ivsize = crypto_ablkcipher_ivsize(cipher); > > + if (ivsize) > + memcpy(ctx->iv, areq->info, ivsize); The ctx is per-tfm, not per-request. So you cannot write to it. This needs to go into a pre-request area. > return talitos_edesc_alloc(ctx->dev, areq->src, areq->dst, > - areq->info, 0, areq->nbytes, 0, ivsize, 0, > + ctx->iv, 0, areq->nbytes, 0, ivsize, 0, > areq->base.flags, encrypt); > } Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt