Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
> > > > static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr > > > *in_nlh, > > > > > >struct nlattr **attrs) > > > > > > { > > > ... > > > > > > if (!p->cru_driver_name[0]) &

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Freitag, 21. November 2014, 10:31:31 schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: > > Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: > > > > Hi Herbert, > > > > > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: > Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: > > Hi Herbert, > > > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > > What about the following > > > > > > if (p->cru_driver_name[0] > > If

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: Hi Herbert, > On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > What about the following > > > > if (p->cru_driver_name[0] If the driver name is not empty > > > > alg = crypto_alg_match(p, 1); Do an exact

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: > > What about the following > > if (p->cru_driver_name[0] > alg = crypto_alg_match(p, 1); > else > alg = crypto_alg_match(p, 0); If cru_driver_name is not empty then exact will never be used, no? Cheers, -- Email:

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
> > > > static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr > > > *in_nlh, > > > > > >struct nlattr **attrs) > > > > > > { > > > ... > > > > > > if (!p->cru_driver_name[0]) &

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 09:04:06 schrieb Steffen Klassert: Hi Steffen, > On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: > > On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: > > > I think this is not sufficient, crypto_alg_match() will now return the > > >

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
struct nlattr **attrs) > > > > { > > ... > > > > if (!p->cru_driver_name[0]) > > > > return -EINVAL; > > OK let's fix this. > > crypto: user - Allow get request with empty driver name > > Currentl

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: > On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: > > > > I think this is not sufficient, crypto_alg_match() will now return the first > > algorithm in crypto_alg_list that matches cra_name. We would need to extend > >

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Steffen Klassert
On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: I think this is not sufficient, crypto_alg_match() will now return the first algorithm in crypto_alg_list that matches cra_name. We would need to extend

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
) { ... if (!p-cru_driver_name[0]) return -EINVAL; OK let's fix this. crypto: user - Allow get request with empty driver name Currently all get requests with an empty driver name fail with EINVAL. Since most users actually want to supply an empty driver name

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 09:04:06 schrieb Steffen Klassert: Hi Steffen, On Thu, Nov 20, 2014 at 03:45:26PM +0800, Herbert Xu wrote: On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: I think this is not sufficient, crypto_alg_match() will now return the first

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
*in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) { ... if (!p-cru_driver_name[0]) return -EINVAL; OK let's fix this. crypto: user - Allow get request with empty driver name Currently all get requests

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: What about the following if (p-cru_driver_name[0] alg = crypto_alg_match(p, 1); else alg = crypto_alg_match(p, 0); If cru_driver_name is not empty then exact will never be used, no? Cheers, -- Email: Herbert Xu

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: What about the following if (p-cru_driver_name[0] If the driver name is not empty alg = crypto_alg_match(p, 1); Do an exact match using

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Herbert Xu
On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote: What about the following if (p-cru_driver_name[0] If the driver name is

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
Am Freitag, 21. November 2014, 10:31:31 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 05:08:42PM +0100, Stephan Mueller wrote: Am Donnerstag, 20. November 2014, 21:40:29 schrieb Herbert Xu: Hi Herbert, On Thu, Nov 20, 2014 at 02:10:00PM +0100, Stephan Mueller wrote:

Re: crypto: user - Allow get request with empty driver name

2014-11-20 Thread Stephan Mueller
*in_skb, struct nlmsghdr *in_nlh, struct nlattr **attrs) { ... if (!p-cru_driver_name[0]) return -EINVAL; OK let's fix this. crypto: user - Allow get request with empty driver name Currently all get requests

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: > > I think this is not sufficient, crypto_alg_match() will now return the first > algorithm in crypto_alg_list that matches cra_name. We would need to extend > crypto_alg_match() to return the algorithm with the highest priority in

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Steffen Klassert
struct nlattr **attrs) > > { > > ... > > if (!p->cru_driver_name[0]) > > return -EINVAL; > > OK let's fix this. > > crypto: user - Allow get request with empty driver name > > Currently all get requests with an empty driver name fail w

crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
return -EINVAL; OK let's fix this. crypto: user - Allow get request with empty driver name Currently all get requests with an empty driver name fail with EINVAL. Since most users actually want to supply an empty driver name this patch removes this check. Signed-off-by: He

crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
this. crypto: user - Allow get request with empty driver name Currently all get requests with an empty driver name fail with EINVAL. Since most users actually want to supply an empty driver name this patch removes this check. Signed-off-by: Herbert Xu herb...@gondor.apana.org.au diff --git

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Steffen Klassert
-cru_driver_name[0]) return -EINVAL; OK let's fix this. crypto: user - Allow get request with empty driver name Currently all get requests with an empty driver name fail with EINVAL. Since most users actually want to supply an empty driver name this patch removes

Re: crypto: user - Allow get request with empty driver name

2014-11-19 Thread Herbert Xu
On Thu, Nov 20, 2014 at 08:11:42AM +0100, Steffen Klassert wrote: I think this is not sufficient, crypto_alg_match() will now return the first algorithm in crypto_alg_list that matches cra_name. We would need to extend crypto_alg_match() to return the algorithm with the highest priority in