Re: [PATCH v8 4/8] crypto: caam - simplify RNG implementation

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

 



On 3/16/2020 5:01 PM, Andrey Smirnov wrote:
> @@ -335,15 +225,18 @@ int caam_rng_init(struct device *ctrldev)
>  	if (!devres_open_group(ctrldev, caam_rng_init, GFP_KERNEL))
>  		return -ENOMEM;
>  
> -	ctx = devm_kzalloc(ctrldev, sizeof(*ctx), GFP_DMA | GFP_KERNEL);
> +	ctx = devm_kzalloc(ctrldev, sizeof(*ctx), GFP_KERNEL);
>  	if (!ctx)
>  		return -ENOMEM;
>  
> +	ctx->ctrldev = ctrldev;
> +
>  	ctx->rng.name    = "rng-caam";
>  	ctx->rng.init    = caam_init;
>  	ctx->rng.cleanup = caam_cleanup;
>  	ctx->rng.read    = caam_read;
>  	ctx->rng.priv    = (unsigned long)ctx;
> +	ctx->rng.quality = 1024;
>  
Nitpick: setting the quality should be moved to patch
"crypto: caam - limit single JD RNG output to maximum of 16 bytes"

Horia




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

  Powered by Linux