Re: proc: Add fs_context support to procfs

2018-10-17 Thread David Howells
Alexey Dobriyan wrote: > > +struct proc_fs_context { > > + struct pid_namespace*pid_ns; > > + unsigned long mask; > > mask should "unsigned" as there aren't lot of flags. Done, thanks. David

Re: proc: Add fs_context support to procfs

2018-10-13 Thread Alexey Dobriyan
> +struct proc_fs_context { > + struct pid_namespace*pid_ns; > + unsigned long mask; mask should "unsigned" as there aren't lot of flags.

[PATCH 18/34] proc: Add fs_context support to procfs [ver #12]

2018-09-21 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|1 fs/proc/internal.h |1 fs/proc/root.c | 220 3 files changed, 151 insertions(+), 71 deletions(-) diff --git a/fs/proc/inode.c b/fs/proc/

[PATCH 17/33] proc: Add fs_context support to procfs [ver #11]

2018-08-01 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 fs/proc/internal.h |2 fs/proc/root.c | 209 +++- 3 files changed, 141 insertions(+), 72 deletions(-) diff --git a/fs/proc/inode.c b/fs/proc/

[PATCH 18/38] proc: Add fs_context support to procfs [ver #10]

2018-07-27 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 fs/proc/internal.h |2 fs/proc/root.c | 209 +++- 3 files changed, 141 insertions(+), 72 deletions(-) diff --git a/fs/proc/inode.c b/fs/proc/

[PATCH 16/32] proc: Add fs_context support to procfs [ver #9]

2018-07-10 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 179 ++-- 3 files changed, 120 insertions(+), 63 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-27 Thread Andrei Vagin
On Tue, Jun 26, 2018 at 09:57:07AM +0100, David Howells wrote: > Andrei Vagin wrote: > > > > > > - mnt = kern_mount_data(&proc_fs_type, ns, 0); > > > > > > Here ns->user_ns and get_current_cred()->user_ns are not always equal > > > > What do you think about the attached patch? > > ... > > -

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-26 Thread David Howells
Andrei Vagin wrote: > > > > - mnt = kern_mount_data(&proc_fs_type, ns, 0); > > > > Here ns->user_ns and get_current_cred()->user_ns are not always equal > > What do you think about the attached patch? > ... > - fc = vfs_new_fs_context(&proc_fs_type, NULL, 0, > -

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-26 Thread Andrei Vagin
On Mon, Jun 25, 2018 at 11:13:20PM -0700, Andrei Vagin wrote: > On Mon, Jun 18, 2018 at 08:34:50PM -0700, Andrei Vagin wrote: > > Hi David, > > > > We run CRIU tests for vfs/for-next, and today a few of these test failed. I > > found that the problem appears after this patch.. > > > > > int pid_

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-25 Thread Andrei Vagin
On Mon, Jun 18, 2018 at 08:34:50PM -0700, Andrei Vagin wrote: > Hi David, > > We run CRIU tests for vfs/for-next, and today a few of these test failed. I > found that the problem appears after this patch.. > > > int pid_ns_prepare_proc(struct pid_namespace *ns) > > { > > + struct proc_fs_cont

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-18 Thread Andrei Vagin
Hi David, We run CRIU tests for vfs/for-next, and today a few of these test failed. I found that the problem appears after this patch.. https://travis-ci.org/avagin/linux/jobs/393766778 The reproducer is attached. It creates a process in a new set of namespaces (user, mount, etc) and then this p

[PATCH 13/32] proc: Add fs_context support to procfs [ver #8]

2018-05-24 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 179 ++-- 3 files changed, 120 insertions(+), 63 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro

[PATCH 12/24] proc: Add fs_context support to procfs [ver #7]

2018-04-19 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 169 ++-- 3 files changed, 113 insertions(+), 60 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro

[PATCH 09/14] proc: Add fs_context support to procfs [ver #6]

2017-10-06 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 176 ++-- 3 files changed, 118 insertions(+), 62 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro

Re: [PATCH 16/27] proc: Add fs_context support to procfs [ver #5]

2017-06-15 Thread Al Viro
On Wed, Jun 14, 2017 at 04:17:43PM +0100, David Howells wrote: > int pid_ns_prepare_proc(struct pid_namespace *ns) > { > + struct proc_fs_context *ctx; > + struct fs_context *fc; > struct vfsmount *mnt; > + int ret; > + > + fc = vfs_new_fs_context(&proc_fs_type, NULL, 0, FS

[PATCH 16/27] proc: Add fs_context support to procfs [ver #5]

2017-06-14 Thread David Howells
Add fs_context support to procfs. Signed-off-by: David Howells --- fs/proc/inode.c|2 - fs/proc/internal.h |2 - fs/proc/root.c | 175 ++-- 3 files changed, 116 insertions(+), 63 deletions(-) diff --git a/fs/proc/inode.c b/fs/pro