Re: [RFC PATCH] crypto: prevent helper ciphers from being allocated by users

2015-03-17 Thread Herbert Xu
On Fri, Mar 13, 2015 at 10:09:21PM +0100, Stephan Mueller wrote: +struct crypto_tfm *__crypto_alloc_tfm_safe(struct crypto_alg *alg, u32 type, +u32 mask) +{ + /* + * Prevent all ciphers from being loaded which have a cra_priority + *

Re: [RFC PATCH] crypto: prevent helper ciphers from being allocated by users

2015-03-17 Thread Herbert Xu
On Tue, Mar 17, 2015 at 12:40:12PM +0100, Stephan Mueller wrote: How about adding a flag to all these internal algorithms and then change crypto_alg_mod_lookup to disable that flag by default? The issue with flags is the following: first we have to think about whether we want a black list

Re: [RFC PATCH] crypto: prevent helper ciphers from being allocated by users

2015-03-17 Thread Stephan Mueller
Am Dienstag, 17. März 2015, 22:23:50 schrieb Herbert Xu: Hi Herbert, On Fri, Mar 13, 2015 at 10:09:21PM +0100, Stephan Mueller wrote: +struct crypto_tfm *__crypto_alloc_tfm_safe(struct crypto_alg *alg, u32 type, + u32 mask) +{ +/* + * Prevent all

Re: [RFC PATCH] crypto: prevent helper ciphers from being allocated by users

2015-03-15 Thread Stephan Mueller
Am Freitag, 13. März 2015, 22:09:21 schrieb Stephan Mueller: Hi Stephan, Hi, Several hardware related cipher implementations are implemented as follows: a helper cipher implementation is registered with the kernel crypto API. Such helper ciphers are never intended to be called by normal

[RFC PATCH] crypto: prevent helper ciphers from being allocated by users

2015-03-13 Thread Stephan Mueller
Hi, Several hardware related cipher implementations are implemented as follows: a helper cipher implementation is registered with the kernel crypto API. Such helper ciphers are never intended to be called by normal users. In some cases, calling them via the normal crypto API may even cause