[PATCH resend] crypto: get rid of superfluous __GFP_REPEAT

2016-04-14 Thread Michal Hocko
From: Michal Hocko __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. lzo_init uses __GFP_REPEAT to allocate LZO1X_MEM_COMPRESS 16K. This is order 3 allocation request and __GFP_REPEAT is ignored for this size as

INFO: inconsistent lock state in ecryptfs_calculate_md5

2016-04-14 Thread Nicolas Boichat
Hi, We've run into the following lockdep warning while using a system with ecryptfs, under heavy memory pressure. If I understand the issue correctly, fs/ecryptfs/crypto.c:ecryptfs_calculate_md5: - Locks &crypt_stat->cs_hash_tfm_mutex -> Calls crypto_alloc_hash -> Calls crypto_alloc_base

RE: [PATCH v3 2/3] crypto: rsa_helper - add raw integer parser actions

2016-04-14 Thread Tudor-Dan Ambarus
Hi Stephan, I was out of office, sorry for the delay. > Am Mittwoch, 6. April 2016, 16:37:05 schrieb Tudor Ambarus: > > > +int rsa_check_key_length(unsigned int len) > > +{ > > + switch (len) { > > + case 512: > > + case 1024: > > + case 1536: > > + case 2048: > > + case 3072: > > +

Re: [PATCH v3 2/3] crypto: rsa_helper - add raw integer parser actions

2016-04-14 Thread Stephan Mueller
Am Donnerstag, 14. April 2016, 15:25:17 schrieb Tudor-Dan Ambarus: Hi Tudor, > > > > > +{ > > > + if (key->d) { > > > + memset(key->d, '\0', key->n_sz); > > > > memzero_explicit, please > > I don't think this is really needed. memzero_explicit is used only on stack > variables that get

Re: [PATCH v4 1/2] dt/bindings: Add bindings for hisilicon random number generator

2016-04-14 Thread Rob Herring
On Wed, Apr 13, 2016 at 06:11:27PM +0800, Kefeng Wang wrote: > Document the devicetree bindings for the random number generator found > on Hisilicon Hip04 and Hip05 soc. > > Signed-off-by: Kefeng Wang > --- > Documentation/devicetree/bindings/rng/hisi-rng.txt | 12 > 1 file changed,

[RFC PATCH] KEYS: Provide keyctls to do public key operations

2016-04-14 Thread David Howells
Here's a patch that does a first attempt at implementing keyctls for public key operations using asymmetric-type keys. This includes provision of a query function. [!] Note that whilst this patch compiles, it has not yet been tested. I make the assumption that the asymmetric key type is the only

Re: [PATCH v3 2/3] crypto: rsa_helper - add raw integer parser actions

2016-04-14 Thread Herbert Xu
On Thu, Apr 14, 2016 at 05:38:08PM +0200, Stephan Mueller wrote: > > > I don't think this is really needed. memzero_explicit is used only on stack > > variables that get cleared just before they go out of scope. > > Are you so sure that a compiler is not getting smart on seeing a memset > followe