Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3972249rwb; Mon, 5 Sep 2022 23:50:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ik4nUj58K2oemQlSoXpAzKkm9F+sKN8YkCH5t2tfYrxCGHA/35fAT2gFWWVVReLCvt2EK X-Received: by 2002:a17:902:76c5:b0:174:e586:f6e2 with SMTP id j5-20020a17090276c500b00174e586f6e2mr37839582plt.37.1662447044616; Mon, 05 Sep 2022 23:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662447044; cv=none; d=google.com; s=arc-20160816; b=ElgaB1CBUJepEVid1Xg1PoYcmOq6olrvJzlo80MwjSyqYI3NlJYEJKPicXVZ3/Chhn efOtZPUnDQN98cJUqAI+8a9n2OwKvVCCEgex36v0u7B5X9LJWiIkQoYrRQ6PY9uWxQsg c6WBYy16CIRbUgcKsJd80GyZYSLLugYwGmmHM7lvf9GrItGjR3mDUT8uunn/HK7B/qvK qOhKEWewSoHY8knJKZrRjsA5yO0h/9LlgYhQLMFp98I53w7m2MTm+h/wQjTriHFXNefJ Mv0qK7ciM5Ae0We18590a4FFFnhriiqcs6X2eGDuXXO7exihsIO3qDk020ux3PVz4I4+ VP6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=iZrCrWMh7jOG+UsS8mGsAx3aRpRCcwDN014ySxemKOQ=; b=LVzOU3+TnkVxeUzXAVEdN6MPlNV6egdYeJQi/HuoqTrF0roEbh8bjtNQ3NMRL6HsQI fzBoFe9F7XqTkSZttIhNdf3VdR4MOaBw/cVN/wpJqbKJL2eUjz4anTwf9r5LzuEnE5tF J7pQFqLgKCIed4HU1Ij8dWgaW7tPgtmr4MPlH+g7u57ftoyHu6+zpCuRwDEOztTibo/K W7wupuUKHJoj5XRoiE/FFJVpMK0OWI8b/LCec7Qs5JT7QksJCQcQJH2nh9qlmxjPSqQB fA4V2/tqb6kW1UweMFx51VBxSZvdosh0+XLjUTBjB0F3MzXvySa1ckj4a7W1k2awEf7+ Hbaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pf6-20020a17090b1d8600b001fd8713170csi21620804pjb.179.2022.09.05.23.50.25; Mon, 05 Sep 2022 23:50:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238320AbiIFGob (ORCPT + 99 others); Tue, 6 Sep 2022 02:44:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233100AbiIFGo2 (ORCPT ); Tue, 6 Sep 2022 02:44:28 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABCFD6D9DB; Mon, 5 Sep 2022 23:44:20 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1oVSIo-001RDO-TA; Tue, 06 Sep 2022 16:43:20 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 06 Sep 2022 14:43:18 +0800 Date: Tue, 6 Sep 2022 14:43:18 +0800 From: Herbert Xu To: Pankaj Gupta Cc: jarkko@kernel.org, a.fatoum@pengutronix.de, Jason@zx2c4.com, jejb@linux.ibm.com, zohar@linux.ibm.com, dhowells@redhat.com, sumit.garg@linaro.org, david@sigma-star.at, michael@walle.cc, john.ernberg@actia.se, jmorris@namei.org, serge@hallyn.com, davem@davemloft.net, j.luebbe@pengutronix.de, ebiggers@kernel.org, richard@nod.at, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, sahil.malhotra@nxp.com, kshitiz.varshney@nxp.com, horia.geanta@nxp.com, V.Sethi@nxp.com Subject: Re: [RFC PATCH HBK: 2/8] hw-bound-key: flag-is_hbk added to the tfm Message-ID: References: <20220906065157.10662-1-pankaj.gupta@nxp.com> <20220906065157.10662-3-pankaj.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220906065157.10662-3-pankaj.gupta@nxp.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Sep 06, 2022 at 12:21:51PM +0530, Pankaj Gupta wrote: > Consumer of the kernel crypto api, after allocating > the transformation, sets this flag based on the basis > of the type of key consumer has. This helps: > > - This helps to influence the core processing logic > for the encapsulated algorithm. > - This flag is set by the consumer after allocating > the tfm and before calling the function crypto_xxx_setkey(). > > Signed-off-by: Pankaj Gupta > --- > include/linux/crypto.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 2324ab6f1846..b4fa83ca87bd 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -639,6 +639,8 @@ struct crypto_tfm { > > u32 crt_flags; > > + unsigned int is_hbk; > + We already have plenty of drivers with hardware keys in the tree. Plesae explain why the current support is inadequate and you need to do this. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt