Re: [PATCH] crypto: mxs-dcp - Initialize .statesize fields
On Thu, Nov 26, 2015 at 01:47:41PM -0200, Fabio Estevam wrote: > Initialize .statesize fields in order to avoid the following error > on probe: > > mxs-dcp 80028000.dcp: Failed to register sha1 hash! > mxs-dcp: probe of 80028000.dcp failed with error -22 > > Cc:# 4.1+ > Suggested-by: Stephan Mueller > Signed-off-by: Fabio Estevam It's not as simple as that. You must implement import and export for it before we can turn it back on. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] crypto: mxs-dcp - Initialize .statesize fields
Am Freitag, 27. November 2015, 20:52:39 schrieb Herbert Xu: Hi Herbert, >On Thu, Nov 26, 2015 at 01:47:41PM -0200, Fabio Estevam wrote: >> Initialize .statesize fields in order to avoid the following error >> on probe: >> >> mxs-dcp 80028000.dcp: Failed to register sha1 hash! >> mxs-dcp: probe of 80028000.dcp failed with error -22 >> >> Cc:# 4.1+ >> Suggested-by: Stephan Mueller >> Signed-off-by: Fabio Estevam > >It's not as simple as that. You must implement import and export >for it before we can turn it back on. May I ask you for a brief reference on how that should be covered so that we can fix all other problematic implementations? Thanks Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] crypto: mxs-dcp - Initialize .statesize fields
On Fri, Nov 27, 2015 at 03:25:22PM +0100, Stephan Mueller wrote: > > May I ask you for a brief reference on how that should be covered so that we > can fix all other problematic implementations? Basically export needs to write the complete hash state into a buffer of size statesize, and import needs to be able to read such a buffer and generate a hash state from it which can then be updated/finalised. Cheers, -- Email: Herbert XuHome Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] crypto: mxs-dcp - Initialize .statesize fields
Initialize .statesize fields in order to avoid the following error on probe: mxs-dcp 80028000.dcp: Failed to register sha1 hash! mxs-dcp: probe of 80028000.dcp failed with error -22 Cc:# 4.1+ Suggested-by: Stephan Mueller Signed-off-by: Fabio Estevam --- drivers/crypto/mxs-dcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c index 59ed54e..e65d379 100644 --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c @@ -836,6 +836,7 @@ static struct ahash_alg dcp_sha1_alg = { .digest = dcp_sha_digest, .halg = { .digestsize = SHA1_DIGEST_SIZE, + .statesize = sizeof(struct sha1_state), .base = { .cra_name = "sha1", .cra_driver_name= "sha1-dcp", @@ -860,6 +861,7 @@ static struct ahash_alg dcp_sha256_alg = { .digest = dcp_sha_digest, .halg = { .digestsize = SHA256_DIGEST_SIZE, + .statesize = sizeof(struct sha256_state), .base = { .cra_name = "sha256", .cra_driver_name= "sha256-dcp", -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html