Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-30 Thread David Howells
Jann Horn wrote: > > > This means that a namespace admin (iow, an unprivileged user) can > > > allocate 1MB of unswappable kmalloc memory per userspace task, right? > > > Using userfaultfd or FUSE, you can then stall the task as long as you > > > want while it has that allocation. Is that

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-30 Thread David Howells
Jann Horn wrote: > > > This means that a namespace admin (iow, an unprivileged user) can > > > allocate 1MB of unswappable kmalloc memory per userspace task, right? > > > Using userfaultfd or FUSE, you can then stall the task as long as you > > > want while it has that allocation. Is that

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-29 Thread Jann Horn
On Sun, Jul 29, 2018 at 10:50 AM David Howells wrote: > > Jann Horn wrote: > > > [...] > > > + case fsconfig_set_binary: > > > + param.type = fs_value_is_blob; > > > + param.size = aux; > > > + param.blob = memdup_user_nul(_value, aux); > > > +

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-29 Thread Jann Horn
On Sun, Jul 29, 2018 at 10:50 AM David Howells wrote: > > Jann Horn wrote: > > > [...] > > > + case fsconfig_set_binary: > > > + param.type = fs_value_is_blob; > > > + param.size = aux; > > > + param.blob = memdup_user_nul(_value, aux); > > > +

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-29 Thread David Howells
Jann Horn wrote: > [...] > > + case fsconfig_set_binary: > > + param.type = fs_value_is_blob; > > + param.size = aux; > > + param.blob = memdup_user_nul(_value, aux); > > + if (IS_ERR(param.blob)) { > > + ret =

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-29 Thread David Howells
Jann Horn wrote: > [...] > > + case fsconfig_set_binary: > > + param.type = fs_value_is_blob; > > + param.size = aux; > > + param.blob = memdup_user_nul(_value, aux); > > + if (IS_ERR(param.blob)) { > > + ret =

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Jann Horn
On Fri, Jul 27, 2018 at 7:34 PM David Howells wrote: > > Add a syscall for configuring a filesystem creation context and triggering > actions upon it, to be used in conjunction with fsopen, fspick and fsmount. > > long fsconfig(int fs_fd, unsigned int cmd, const char *key, >

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Jann Horn
On Fri, Jul 27, 2018 at 7:34 PM David Howells wrote: > > Add a syscall for configuring a filesystem creation context and triggering > actions upon it, to be used in conjunction with fsopen, fspick and fsmount. > > long fsconfig(int fs_fd, unsigned int cmd, const char *key, >

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Andy Lutomirski wrote: > > [*] Not without a 6-arg syscall or some other way of passing it. > > Are there still architectures that have problems with 6-arg syscalls? As I understand it, 6-arg syscalls are frowned upon. > I suppose that, as long as there is never a case where fsconfig_set_path

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Andy Lutomirski wrote: > > [*] Not without a 6-arg syscall or some other way of passing it. > > Are there still architectures that have problems with 6-arg syscalls? As I understand it, 6-arg syscalls are frowned upon. > I suppose that, as long as there is never a case where fsconfig_set_path

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Andy Lutomirski
On Fri, Jul 27, 2018 at 2:51 PM, David Howells wrote: > Andy Lutomirski wrote: > >> Unless I'm rather confused, you have two or possibly three ways to >> pass in an open fd. Can you clarify what the difference is and/or >> remove all but one of them? > > No, they're not equivalent. > >> > (*)

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Andy Lutomirski
On Fri, Jul 27, 2018 at 2:51 PM, David Howells wrote: > Andy Lutomirski wrote: > >> Unless I'm rather confused, you have two or possibly three ways to >> pass in an open fd. Can you clarify what the difference is and/or >> remove all but one of them? > > No, they're not equivalent. > >> > (*)

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Andy Lutomirski wrote: > Unless I'm rather confused, you have two or possibly three ways to > pass in an open fd. Can you clarify what the difference is and/or > remove all but one of them? No, they're not equivalent. > > (*) fsconfig_set_path: A non-empty path is specified. The parameter

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Andy Lutomirski wrote: > Unless I'm rather confused, you have two or possibly three ways to > pass in an open fd. Can you clarify what the difference is and/or > remove all but one of them? No, they're not equivalent. > > (*) fsconfig_set_path: A non-empty path is specified. The parameter

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Andy Lutomirski
On Fri, Jul 27, 2018 at 10:34 AM, David Howells wrote: > (*) fsconfig_set_path: A non-empty path is specified. The parameter must > be expecting a path object. value points to a NUL-terminated string > that is the path and aux is a file descriptor at which to start a > relative

Re: [PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread Andy Lutomirski
On Fri, Jul 27, 2018 at 10:34 AM, David Howells wrote: > (*) fsconfig_set_path: A non-empty path is specified. The parameter must > be expecting a path object. value points to a NUL-terminated string > that is the path and aux is a file descriptor at which to start a > relative

[PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Add a syscall for configuring a filesystem creation context and triggering actions upon it, to be used in conjunction with fsopen, fspick and fsmount. long fsconfig(int fs_fd, unsigned int cmd, const char *key, const void *value, int aux); Where fs_fd indicates the context,

[PATCH 29/38] vfs: syscall: Add fsconfig() for configuring and managing a context [ver #10]

2018-07-27 Thread David Howells
Add a syscall for configuring a filesystem creation context and triggering actions upon it, to be used in conjunction with fsopen, fspick and fsmount. long fsconfig(int fs_fd, unsigned int cmd, const char *key, const void *value, int aux); Where fs_fd indicates the context,