Re: [PATCH v3 04/17] crypto: Add userspace configuration API

2011-09-26 Thread Herbert Xu
On Mon, Sep 26, 2011 at 12:56:46PM +0200, Steffen Klassert wrote: > > I'm just wondering whether CAP_NET_ADMIN is the right capability to > use here? Do you think we can keep it like that, or would it be better > to define a new CAP_CRYPTO_ADMIN capability? I think CAP_NET_ADMIN is fine. Thanks,

Re: [PATCH v3 04/17] crypto: Add userspace configuration API

2011-09-26 Thread Steffen Klassert
On Wed, Sep 21, 2011 at 11:02:38AM +0200, Steffen Klassert wrote: > + > +static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) > +{ > + struct nlattr *attrs[CRYPTOCFGA_MAX+1]; > + struct crypto_link *link; > + int type, err; > + > + type = nlh->nlmsg_type; > +

Re: [PATCH v3 04/17] crypto: Add userspace configuration API

2011-09-23 Thread Steffen Klassert
On Fri, Sep 23, 2011 at 03:55:54PM +1000, Herbert Xu wrote: > On Wed, Sep 21, 2011 at 11:02:38AM +0200, Steffen Klassert wrote: > > > > +/* Netlink message attributes. */ > > +enum crypto_attr_type_t { > > + CRYPTOCFGA_UNSPEC, > > + CRYPTOCFGA_PRIORITY_VAL,/* __u32 */ > > + __CRYPTOC

Re: [PATCH v3 04/17] crypto: Add userspace configuration API

2011-09-22 Thread Herbert Xu
On Wed, Sep 21, 2011 at 11:02:38AM +0200, Steffen Klassert wrote: > > +/* Netlink message attributes. */ > +enum crypto_attr_type_t { > + CRYPTOCFGA_UNSPEC, > + CRYPTOCFGA_PRIORITY_VAL,/* __u32 */ > + __CRYPTOCFGA_MAX > + > +#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1) > +}; >

[PATCH v3 04/17] crypto: Add userspace configuration API

2011-09-21 Thread Steffen Klassert
This patch adds a basic userspace configuration API for the crypto layer. With this it is possible to instantiate, remove and to show crypto algorithms from userspace. Signed-off-by: Steffen Klassert --- crypto/Kconfig |7 + crypto/Makefile|1 + crypto/crypto_user