Re: [PATCH] crypto: caam: blob_gen.c: warn if key is insecure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 19, 2022 at 02:44:56PM +0200, Nikolaus Voss wrote:
>
> @@ -62,11 +63,13 @@ int caam_process_blob(struct caam_blob_priv *priv,
>  		      struct caam_blob_info *info, bool encap)
>  {
>  	struct caam_blob_job_result testres;
> +	const struct caam_drv_private *ctrlpriv;

Please keep the declarations sorted by length in reverse.

> @@ -100,6 +103,11 @@ int caam_process_blob(struct caam_blob_priv *priv,
>  		goto out_unmap_in;
>  	}
>  
> +	ctrlpriv = dev_get_drvdata(jrdev->parent);
> +	moo = FIELD_GET(CSTA_MOO, ctrlpriv->ctrl->perfmon.status);
> +	if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
> +		dev_warn(jrdev, "using insecure test key!\n");

Who is the audience of this warning? Is it possible for this warning
to be too frequent?

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux