Re: [PATCH] p9caps: add Plan9 capability devices

2018-04-25 Thread Richard Weinberger
Am Mittwoch, 25. April 2018, 12:38:02 CEST schrieb Enrico Weigelt: > >> + list_for_each_safe(pos, q, &(caphash_writers)) { > >> + tmp = list_entry(pos, struct caphash_entry, list); > > > > list_for_each_entry. > > what's the exact difference ? Whoops, I meant list_for_each_en

Re: [PATCH] p9caps: add Plan9 capability devices

2018-04-25 Thread Enrico Weigelt
On 17.02.2018 23:11, Richard Weinberger wrote: Hi, +static LIST_HEAD(caphash_writers); >> +>> +static DEFINE_MUTEX(lock);>> +>> +struct crypto_ahash *hmac_tfm = NULL;>> +>> +static int caphash_open(struct inode *inode, struct file *filp)>> +{>> + struct caphash_writer *tmp = NULL;>> + s

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-17 Thread Richard Weinberger
On Sun, Feb 11, 2018 at 10:50 PM, Enrico Weigelt, metux IT consult wrote: > From: "Enrico Weigelt, metux IT consult" > > This driver implements the Plan9 capability devices, used for > switching user id via capability tokens. > > https://9p.io/sys/doc/auth.html Please see some nit-picks below. I

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-14 Thread Enrico Weigelt
On 14.02.2018 15:56, Serge E. Hallyn wrote: If it's an out of tree module you'd have to do it this way, but if > it's in-tree, even as a module, adding a bit to the userns struct> would imo be ok. Assuming one doesn't try to load the module when the kernel image previously was built w/o it ;-)

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-14 Thread Serge E. Hallyn
Quoting Enrico Weigelt, metux IT consult (me...@gmx.de): > On 13.02.2018 07:16, Serge E. Hallyn wrote: > >>+ /* make sure only one instance per namespace can be opened */ > > ... > >>at a time > yeah, right. > > >might be better to keep this state in the user_ns itself, would > >avoid kzalloc b

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-13 Thread Enrico Weigelt, metux IT consult
On 13.02.2018 07:16, Serge E. Hallyn wrote: + /* make sure only one instance per namespace can be opened */ > > ... at a time yeah, right. might be better to keep this state in the user_ns itself, would avoid kzalloc below. thought about, but hesitated to touch user_ns. might not be t

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-12 Thread Serge E. Hallyn
On Sun, Feb 11, 2018 at 09:50:28PM +, Enrico Weigelt, metux IT consult wrote: > From: "Enrico Weigelt, metux IT consult" > > This driver implements the Plan9 capability devices, used for > switching user id via capability tokens. > > https://9p.io/sys/doc/auth.html > --- > drivers/staging/

p9caps: add Plan9 capability devices

2018-02-11 Thread Enrico Weigelt, metux IT consult
v2 of the p9caps patch

[PATCH] p9caps: add Plan9 capability devices

2018-02-11 Thread Enrico Weigelt, metux IT consult
From: "Enrico Weigelt, metux IT consult" This driver implements the Plan9 capability devices, used for switching user id via capability tokens. https://9p.io/sys/doc/auth.html --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile| 1 + drivers/staging/p9caps/Kconfig |

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-10 Thread Al Viro
On Sat, Feb 10, 2018 at 04:58:45PM +, Enrico Weigelt, metux IT consult wrote: > From: "Enrico Weigelt, metux IT consult" > +MODULE_LICENSE("GPLv3"); ... which is incompatible with GPLv2. I'm not even going to look at that thing - same as with proprietary code. You CAN'T combine any deriva

Re: [PATCH] p9caps: add Plan9 capability devices

2018-02-10 Thread Randy Dunlap
Hi, On 02/10/2018 08:58 AM, Enrico Weigelt, metux IT consult wrote: > From: "Enrico Weigelt, metux IT consult" > > This driver implements the Plan9 capability devices, used for > switching user id via capability tokens. > > https://9p.io/sys/doc/auth.html > --- > drivers/staging/Kconfig

[PATCH] p9caps: add Plan9 capability devices

2018-02-10 Thread Enrico Weigelt, metux IT consult
From: "Enrico Weigelt, metux IT consult" This driver implements the Plan9 capability devices, used for switching user id via capability tokens. https://9p.io/sys/doc/auth.html --- drivers/staging/Kconfig | 2 + drivers/staging/Makefile| 1 + drivers/staging/p9caps/Kconfig |