Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-02 Thread Rui Wang
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 .p

Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-02 Thread Herbert Xu
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 auth

Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-02 Thread Rui Wang
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 { >

Re: [PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-02-01 Thread Herbert Xu
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; >

[PATCH v2 4/4] crypto: testmgr - Add a test case for import()/export()

2016-01-27 Thread Rui Wang
Modify __test_hash() so that hash import/export can be tested from within the kernel by simply adding .partial = 1 to a hash algo's struct hash_testvec where .np > 1. v2: Leverage template[i].np as suggested by Tim Chen Signed-off-by: Rui Wang --- crypto/testmgr.c | 137