linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()
@ 2016-02-02 14:16 Rui Wang
  2016-02-02 14:44 ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Rui Wang @ 2016-02-02 14:16 UTC (permalink / raw)
  To: herbert; +Cc: rui.y.wang, tim.c.chen, linux-crypto, linux-kernel

On Mon, Feb 1, 2016 4:22 PM Herbert Xu wrote:
> 
> On Wed, Jan 27, 2016 at 05:08:38PM +0800, Rui Wang wrote:
> >
> > diff --git a/crypto/testmgr.h b/crypto/testmgr.h index
> > da0a8fd..451e7eb 100644
> > --- a/crypto/testmgr.h
> > +++ b/crypto/testmgr.h
> > @@ -44,6 +44,7 @@ struct hash_testvec {
> >  	unsigned short psize;
> >  	unsigned char np;
> >  	unsigned char ksize;
> > +	unsigned char partial;
> 
> Why not make it unconditional?
> 

I initially made it unconditional, but then I found that it can easily
hang the machine during boot due to any import/export bug in any of
the hash drivers. So I used this .partial flag to guard against this
risk. Only when an author is confident that his driver can do this
test, should he add this flag. What do you think?

Thanks
Rui

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()
@ 2016-02-02 15:03 Rui Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Rui Wang @ 2016-02-02 15:03 UTC (permalink / raw)
  To: herbert; +Cc: rui.y.wang, tim.c.chen, linux-crypto, linux-kernel

On Tue, Feb 2, 2016 10:45 PM Herbert Xu wrote:
>
> On Tue, Feb 02, 2016 at 10:16:34PM +0800, Rui Wang wrote:
> >
> > I initially made it unconditional, but then I found that it can easily
> > hang the machine during boot due to any import/export bug in any of
> > the hash drivers. So I used this .partial flag to guard against this
> > risk. Only when an author is confident that his driver can do this
> > test, should he add this flag. What do you think?
> 
> Well if they're buggy they may crash anyway.  Considering that all the buggy
> drivers have probably been disabled for the time being I'd say let's make it
> unconditional.

You are right the ahash drivers are already disabled. The shash drivers using
cryptd or mcryptd are probably OK by now. I'll do some tests.

Thanks
Rui 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH v2 0/4] Fix sha1_mb failure and testing import()/export()
@ 2016-01-27  9:08 Rui Wang
  2016-01-27  9:08 ` [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export() Rui Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Rui Wang @ 2016-01-27  9:08 UTC (permalink / raw)
  To: herbert; +Cc: tim.c.chen, rui.y.wang, linux-crypto, linux-kernel

Hi All,

This patchset resulted from the failure when loading sha1_mb. It
is because ahash drivers are now required to implement import()
and export(). Also, now it seems beneficial to add a test case in
testmgr to test import()/export(), thus:

patch01 - patch03 fix the problems while loading sha1_mb.
patch04 adds a test case for import() and export(). A hash algo's
import()/export() can be tested by simply adding .partial = 1 to
its corresponding struct hash_testvec where .np > 1.

v2: Leverage template[i].np in the test case as suggested by Tim Chen.

Rui Wang (4):
  crypto x86/sha1_mb: Fix load failure
  crypto: mcryptd - Fix load failure
  crypto: algif_hash - wait for crypto_ahash_init() to complete
  crypto: testmgr - Add a test case for import()/export()

 arch/x86/crypto/sha-mb/sha1_mb.c |  39 +++++++++++
 crypto/algif_hash.c              |   4 +-
 crypto/mcryptd.c                 |   1 +
 crypto/testmgr.c                 | 136 +++++++++++++++++++++++++++++++++++++++
 crypto/testmgr.h                 |   4 +-
 5 files changed, 182 insertions(+), 2 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-06  7:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 14:16 [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export() Rui Wang
2016-02-02 14:44 ` Herbert Xu
2016-02-03 10:26   ` [PATCH v3 " Rui Wang
2016-02-06  7:47     ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2016-02-02 15:03 [PATCH v2 " Rui Wang
2016-01-27  9:08 [PATCH v2 0/4] Fix sha1_mb failure and testing import()/export() Rui Wang
2016-01-27  9:08 ` [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export() Rui Wang
2016-02-01  8:21   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).