Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1955541pxb; Fri, 27 Aug 2021 23:48:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbAJywasM8lwwWvWjqJUMoU/0x9V1S9BIVr3seqPs7Ee3TDNtKn9sy+APNMvNqqUiRWpfS X-Received: by 2002:a02:a317:: with SMTP id q23mr11492563jai.83.1630133287582; Fri, 27 Aug 2021 23:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630133287; cv=none; d=google.com; s=arc-20160816; b=izPEg13d85VQ0nYgIxHAEpbFKIpGvHtGEAuI9TLbC8WyP42Z0G1sGtOT82d2XZ7uDe Wfy0Fg3/J5S6B906vgJlkEQf47/+mfFQ36prrZtcsScwrtOzbUze/tT+hfOUii+EWg0g m7bgKahE/MxMca32c4JyFBBymqBuTehhxbphtoZ73n59s61te1WlyY8tr1pkEezHc5E4 aeI+Tb0/idbSB1o6ca8i1NkayGfKoztz6Ua7O7G18Fvhd92voy6SHM1qhdDCTUeP+ICd C9wECbYuDaN7LsPsOiUtxV+esOrmo0P6KDIcRhaTnPVFUR8cq6EkD1tmzoHGB8rtX5bb UTGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=AbpHq5x3HRtl7tcM2fP7V56aGCadixrpfXop8JZn1jw=; b=ddG1mKZvDpd/MLEKkq5OJPo7rlJlMyNOiIWkN/HyJnFG9l9ypA570FmVt0qf/5NvEz wuW8SIIAfc5zcdWZ0Hql59imsOobiLCqATO/VzLvsw3YnitY4OZ3oWNnlt1nMan42Biz TjecRvhZcAHScDD2s+JxPPVHc6LH2Zuv4k3vDOQKu49A2nK9mznA/4Lsjv9x6HcWX0yv 354n5RPjv+lDpHLGF7r84FTvmiwduYdlk9wW+MhqpAt6AZ5ymsZ/5zDBPTVYHKvjl9iC 7s4GMvqwpn0mjkUeYsEZ6psBuat7S+eW7biJhea0w1/hlyaQXFcYGEdF8YNuXhsmNkwX RgkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si8944907ilg.50.2021.08.27.23.47.37; Fri, 27 Aug 2021 23:48:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233317AbhH1GsZ (ORCPT + 99 others); Sat, 28 Aug 2021 02:48:25 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:54472 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233088AbhH1GsZ (ORCPT ); Sat, 28 Aug 2021 02:48:25 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mJs7i-0008E9-EV; Sat, 28 Aug 2021 14:47:26 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mJs7Y-0006ig-53; Sat, 28 Aug 2021 14:47:16 +0800 Date: Sat, 28 Aug 2021 14:47:16 +0800 From: Herbert Xu To: "yekai(A)" Cc: wangzhou1@hisilicon.com, linux-crypto@vger.kernel.org Subject: Re: [PATCH 2/5] crypto: hisilicon/sec - add ahash alg features for Kunpeng920 Message-ID: <20210828064716.GA25697@gondor.apana.org.au> References: <1628847626-24383-1-git-send-email-yekai13@huawei.com> <1628847626-24383-3-git-send-email-yekai13@huawei.com> <20210821072557.GA31491@gondor.apana.org.au> <20210827083652.GD21571@gondor.apana.org.au> <337a3bac-86d4-c66e-9d6a-d4aa6685f83d@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <337a3bac-86d4-c66e-9d6a-d4aa6685f83d@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Sat, Aug 28, 2021 at 11:16:47AM +0800, yekai(A) wrote: > > I refered to other people's plans. Modify the value of halg.statesize > is sizeof(struct sec_req) + sizeof(u32), So user can allocate an extra > sizeof(u32) memory. The driver will write a tag number to the addr in the > export process, then the driver will check the pointers by the tag number > through the import path. > I think this plan can avoid random pointers. I don't see what that's going to achieve. The whole point of export/import is to serialise the entire hash state. You can not store any pointers in there. After all, I can export the hash state, reboot, and then reimport the hash state and it should still work. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt