Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-02 Thread Andrew Vagin
; <mtk.manpa...@gmail.com> writes: > >> > >>> On 07/26/2016 10:39 PM, Andrew Vagin wrote: > >>>> On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) > >>>> wrote: > >> > >>>> If we want to compa

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-02 Thread Andrew Vagin
On Fri, Jul 29, 2016 at 01:05:48PM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: > > > Hi Eric, > > > > On 07/28/2016 02:56 PM, Eric W. Biederman wrote: > >> "Michael Kerrisk (man-pages)" writes: > >> > &

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Andrew Vagin
On Mon, Aug 01, 2016 at 08:20:27PM +0200, Alban Crequy wrote: > Hi, > > On 14 July 2016 at 20:20, Andrey Vagin wrote: > > Each namespace has an owning user namespace and now there is not way > > to discover these relationships. > > > > Pid and user namepaces are hierarchical.

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-08-01 Thread Andrew Vagin
On Mon, Aug 01, 2016 at 08:20:27PM +0200, Alban Crequy wrote: > Hi, > > On 14 July 2016 at 20:20, Andrey Vagin wrote: > > Each namespace has an owning user namespace and now there is not way > > to discover these relationships. > > > > Pid and user namepaces are hierarchical. There is no way to

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 11:32:25AM -0700, W. Trevor King wrote: > On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > > Sure. If a process wants to compare two namespaces, it needs to get file > > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a &g

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 11:32:25AM -0700, W. Trevor King wrote: > On Tue, Jul 26, 2016 at 11:25:24AM -0700, Andrew Vagin wrote: > > Sure. If a process wants to compare two namespaces, it needs to get file > > descriptors for them (open /proc/PID/ns/XXX, use new ioctl-s, find a &g

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > On 07/26/2016 04:54 AM, Andrew Vagin wrote: > > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > > > "Michael Kerrisk (man-pages)" <mtk.manpa...@gmail.com> writes

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > On 07/26/2016 04:54 AM, Andrew Vagin wrote: > > On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > > > "Michael Kerrisk (man-pages)" writes: > > > > [snip] &

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Andrew, > > On 26 July 2016 at 20:25, Andrew Vagin <ava...@virtuozzo.com> wrote: > > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > >> On 07/26/201

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-26 Thread Andrew Vagin
On Tue, Jul 26, 2016 at 09:17:31PM +0200, Michael Kerrisk (man-pages) wrote: > Hello Andrew, > > On 26 July 2016 at 20:25, Andrew Vagin wrote: > > On Tue, Jul 26, 2016 at 10:03:25AM +0200, Michael Kerrisk (man-pages) wrote: > >> On 07/26/2016 04:54 AM, Andrew Vagin wrot

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: [snip] > [snip] > >>> So, from my point of view, the important piece that was missing from > >>> your commit message was the note to use

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Mon, Jul 25, 2016 at 09:59:43AM -0500, Eric W. Biederman wrote: > "Michael Kerrisk (man-pages)" writes: [snip] > [snip] > >>> So, from my point of view, the important piece that was missing from > >>> your commit message was the note to use readlink("/proc/self/fd/%d") > >>> on the returned

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:10:21AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Hello, > > > > I forgot to add --cc-cover for git send-email, so everyone who is in > > Cc got only a cover letter. All messages were sent in mail lists. > > > > Sorry for

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-25 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:10:21AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Hello, > > > > I forgot to add --cc-cover for git send-email, so everyone who is in > > Cc got only a cover letter. All messages were sent in mail lists. > > > > Sorry for inconvenience. > > Mostly

Re: [PATCH 1/5] namespaces: move user_ns into ns_common

2016-07-24 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:00:13AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Every namespace has a pointer to an user namespace where is was created, > > but they're all privately embedded in the individual namespace specific > > structures. > > > > Now we

Re: [PATCH 1/5] namespaces: move user_ns into ns_common

2016-07-24 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:00:13AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Every namespace has a pointer to an user namespace where is was created, > > but they're all privately embedded in the individual namespace specific > > structures. > > > > Now we are going to add an

Re: [PATCH 2/5] kernel: add a helper to get an owning user namespace for a namespace

2016-07-24 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:03:49AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Return -EPERM if an owning user namespace is outside of a process > > current user namespace. > > > > diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c > > index

Re: [PATCH 2/5] kernel: add a helper to get an owning user namespace for a namespace

2016-07-24 Thread Andrew Vagin
On Sun, Jul 24, 2016 at 12:03:49AM -0500, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Return -EPERM if an owning user namespace is outside of a process > > current user namespace. > > > > diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c > > index a5bc78c..6382e5e 100644 >

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Andrew Vagin
On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > On 07/14/2016 08:20 PM, Andrey Vagin wrote: > > Could you add here an of the API in detail: what do these FDs refer to, > and how do you use them to solve the use case? And could you you add > that

Re: [PATCH 0/5 RFC] Add an interface to discover relationships between namespaces

2016-07-21 Thread Andrew Vagin
On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > On 07/14/2016 08:20 PM, Andrey Vagin wrote: > > Could you add here an of the API in detail: what do these FDs refer to, > and how do you use them to solve the use case? And could you you add > that

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-12 Thread Andrew Vagin
On Sat, Jul 09, 2016 at 01:29:20PM -0500, Eric W. Biederman wrote: > ebied...@xmission.com (Eric W. Biederman) writes: > > > Andrew Vagin <ava...@virtuozzo.com> writes: > > > >> All these thoughts about security make me thinking that kcmp is what we > >>

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-12 Thread Andrew Vagin
On Sat, Jul 09, 2016 at 01:29:20PM -0500, Eric W. Biederman wrote: > ebied...@xmission.com (Eric W. Biederman) writes: > > > Andrew Vagin writes: > > > >> All these thoughts about security make me thinking that kcmp is what we > >> should use here. It's maybe

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-11 Thread Andrew Vagin
On Mon, Jul 11, 2016 at 06:06:48AM +0900, James Bottomley wrote: > On Sun, 2016-07-10 at 15:29 -0500, Eric W. Biederman wrote: > > Andrew Vagin <ava...@virtuozzo.com> writes: > > > > > On Fri, Jul 08, 2016 at 10:13:08PM -0500, Eric W. Biederman wrote: > > &g

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-11 Thread Andrew Vagin
On Mon, Jul 11, 2016 at 06:06:48AM +0900, James Bottomley wrote: > On Sun, 2016-07-10 at 15:29 -0500, Eric W. Biederman wrote: > > Andrew Vagin writes: > > > > > On Fri, Jul 08, 2016 at 10:13:08PM -0500, Eric W. Biederman wrote: > > > > "W. Trevor King&qu

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-09 Thread Andrew Vagin
On Fri, Jul 08, 2016 at 10:13:08PM -0500, Eric W. Biederman wrote: > "W. Trevor King" writes: > > > On Thu, Jul 07, 2016 at 08:01:52AM -0700, James Bottomley wrote: > >> In theory, we could get nsfs to show this information as an option > >> (just add a show_options entry to

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-09 Thread Andrew Vagin
On Fri, Jul 08, 2016 at 10:13:08PM -0500, Eric W. Biederman wrote: > "W. Trevor King" writes: > > > On Thu, Jul 07, 2016 at 08:01:52AM -0700, James Bottomley wrote: > >> In theory, we could get nsfs to show this information as an option > >> (just add a show_options entry to the superblock ops),

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-09 Thread Andrew Vagin
tes: > >> > >> > On July 8, 2016 1:38:19 PM PDT, Andrew Vagin <ava...@virtuozzo.com> > >> > wrote: > >> > >> > > What do you think about the idea to mount nsfs and be able to > >> > > look up any alive namespace by inu

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-09 Thread Andrew Vagin
On Fri, Jul 08, 2016 at 10:05:18PM -0500, Eric W. Biederman wrote: > James Bottomley writes: > > > On Fri, 2016-07-08 at 18:52 -0500, Eric W. Biederman wrote: > >> James Bottomley writes: > >> > >> > On July 8, 2016 1:38:19 PM PDT, Andrew Vagin >

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Fri, Jul 08, 2016 at 07:35:33AM -0700, James Bottomley wrote: > On Fri, 2016-07-08 at 02:44 -0500, Eric W. Biederman wrote: > > Andrew Vagin <ava...@virtuozzo.com> writes: > > > > > On Wed, Jul 06, 2016 at 10:46:33AM -0500, Eric W. Biederman wrote: > > >

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Fri, Jul 08, 2016 at 07:35:33AM -0700, James Bottomley wrote: > On Fri, 2016-07-08 at 02:44 -0500, Eric W. Biederman wrote: > > Andrew Vagin writes: > > > > > On Wed, Jul 06, 2016 at 10:46:33AM -0500, Eric W. Biederman wrote: > > > > "Serge E. Hallyn

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Wed, Jul 06, 2016 at 10:46:33AM -0500, Eric W. Biederman wrote: > "Serge E. Hallyn" writes: > > > On Wed, Jul 06, 2016 at 10:41:48AM +0200, Michael Kerrisk (man-pages) wrote: > >> [Rats! Doing now what I should have down to start with. Looping some > >> lists and CRIU and

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Wed, Jul 06, 2016 at 10:46:33AM -0500, Eric W. Biederman wrote: > "Serge E. Hallyn" writes: > > > On Wed, Jul 06, 2016 at 10:41:48AM +0200, Michael Kerrisk (man-pages) wrote: > >> [Rats! Doing now what I should have down to start with. Looping some > >> lists and CRIU and other possibly

Re: Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 10:26:50PM -0700, W. Trevor King wrote: > On Thu, Jul 07, 2016 at 08:26:47PM -0700, James Bottomley wrote: > > On Thu, 2016-07-07 at 20:00 -0700, Andrew Vagin wrote: > > > On Thu, Jul 07, 2016 at 07:16:18PM -0700, Andrew Vagin wrote: > > > > I

Re: Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 10:26:50PM -0700, W. Trevor King wrote: > On Thu, Jul 07, 2016 at 08:26:47PM -0700, James Bottomley wrote: > > On Thu, 2016-07-07 at 20:00 -0700, Andrew Vagin wrote: > > > On Thu, Jul 07, 2016 at 07:16:18PM -0700, Andrew Vagin wrote: > > > > I

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 08:20:05PM -0700, James Bottomley wrote: > On Thu, 2016-07-07 at 19:16 -0700, Andrew Vagin wrote: > > On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > > > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) > > > wr

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-08 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 08:20:05PM -0700, James Bottomley wrote: > On Thu, 2016-07-07 at 19:16 -0700, Andrew Vagin wrote: > > On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > > > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) > > > wr

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-07 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) wrote: > > On 7 July 2016 at 17:01, James Bottomley > > wrote: > [Serge already answered the parenting issue] > > > On Thu,

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-07 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) wrote: > > On 7 July 2016 at 17:01, James Bottomley > > wrote: > [Serge already answered the parenting issue] > > > On Thu, 2016-07-07 at 08:36 -0500, Serge E. Hallyn

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-07 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 07:16:18PM -0700, Andrew Vagin wrote: > On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) wrote: > > > On 7 July 2016 at 17:01, James Bottomley > > > <james.b

Re: [CRIU] Introspecting userns relationships to other namespaces?

2016-07-07 Thread Andrew Vagin
On Thu, Jul 07, 2016 at 07:16:18PM -0700, Andrew Vagin wrote: > On Thu, Jul 07, 2016 at 12:17:35PM -0700, James Bottomley wrote: > > On Thu, 2016-07-07 at 20:21 +0200, Michael Kerrisk (man-pages) wrote: > > > On 7 July 2016 at 17:01, James Bottomley > > > wrote:

Re: [PATCH] tcp: extend window to fit all restored unacked data in a send queue

2016-06-01 Thread Andrew Vagin
On Tue, May 31, 2016 at 08:02:36AM -0700, Andrey Vagin wrote: > Data from a send queue is sent only if there is enough space in a > window, so when we restore unacked data, we need to expand a window to > fit this data. > > Currently we don't do this and tcp_acceptable_seq() returns >

Re: [PATCH] tcp: extend window to fit all restored unacked data in a send queue

2016-06-01 Thread Andrew Vagin
On Tue, May 31, 2016 at 08:02:36AM -0700, Andrey Vagin wrote: > Data from a send queue is sent only if there is enough space in a > window, so when we restore unacked data, we need to expand a window to > fit this data. > > Currently we don't do this and tcp_acceptable_seq() returns >

Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)

2016-04-12 Thread Andrew Vagin
On Tue, Apr 12, 2016 at 09:03:39AM +0800, kbuild test robot wrote: > Hi Andrey, > > [auto build test ERROR on v4.6-rc3] > [also build test ERROR on next-20160411] > [if your patch is applied to the wrong git tree, please drop us a note to > help improving the system] > > url: >

Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)

2016-04-12 Thread Andrew Vagin
On Tue, Apr 12, 2016 at 09:03:39AM +0800, kbuild test robot wrote: > Hi Andrey, > > [auto build test ERROR on v4.6-rc3] > [also build test ERROR on next-20160411] > [if your patch is applied to the wrong git tree, please drop us a note to > help improving the system] > > url: >

Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)

2016-04-12 Thread Andrew Vagin
On Tue, Apr 12, 2016 at 10:08:57AM +0300, Cyrill Gorcunov wrote: > On Mon, Apr 11, 2016 at 04:35:44PM -0700, Andrey Vagin wrote: > ... > > +static int __taskdiag_dumpit(struct task_iter *iter, > > +struct task_diag_cb *cb, struct task_struct > > **start) > > +{ > > +

Re: [PATCH 04/15] task_diag: add a new interface to get information about tasks (v4)

2016-04-12 Thread Andrew Vagin
On Tue, Apr 12, 2016 at 10:08:57AM +0300, Cyrill Gorcunov wrote: > On Mon, Apr 11, 2016 at 04:35:44PM -0700, Andrey Vagin wrote: > ... > > +static int __taskdiag_dumpit(struct task_iter *iter, > > +struct task_diag_cb *cb, struct task_struct > > **start) > > +{ > > +

Re: [Devel] [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-25 Thread Andrew Vagin
On Tue, Feb 16, 2016 at 11:07:32PM -0800, Maxim Patlasov wrote: > On 02/16/2016 11:54 AM, Al Viro wrote: > >On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: > >>propagate_one(m) calculates "type" argument for copy_tree() like this: > >> > >>>if (m->mnt_group_id ==

Re: [Devel] [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-25 Thread Andrew Vagin
On Tue, Feb 16, 2016 at 11:07:32PM -0800, Maxim Patlasov wrote: > On 02/16/2016 11:54 AM, Al Viro wrote: > >On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: > >>propagate_one(m) calculates "type" argument for copy_tree() like this: > >> > >>>if (m->mnt_group_id ==

Re: [Devel] [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Andrew Vagin
On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: > propagate_one(m) calculates "type" argument for copy_tree() like this: > > >if (m->mnt_group_id == last_dest->mnt_group_id) { > >type = CL_MAKE_SHARED; > >} else { > >type = CL_SLAVE; > >if

Re: [Devel] [PATCH] fs/pnode.c: treat zero mnt_group_id-s as unequal

2016-02-16 Thread Andrew Vagin
On Tue, Feb 16, 2016 at 11:45:33AM -0800, Maxim Patlasov wrote: > propagate_one(m) calculates "type" argument for copy_tree() like this: > > >if (m->mnt_group_id == last_dest->mnt_group_id) { > >type = CL_MAKE_SHARED; > >} else { > >type = CL_SLAVE; > >if

Re: [CRIU] x86: Hardware breakpoints are not always triggered

2016-01-29 Thread Andrew Vagin
On Thu, Jan 28, 2016 at 02:42:25PM -0800, Andrey Wagin wrote: > On Thu, Jan 28, 2016 at 10:33:28PM +0100, Paolo Bonzini wrote: > > > > > > On 28/01/2016 09:31, Andrey Wagin wrote: > > > I tried to print drX registers after a break-point. Looks like they > > > are set correctly. > > > > Can you

Re: [CRIU] x86: Hardware breakpoints are not always triggered

2016-01-29 Thread Andrew Vagin
On Thu, Jan 28, 2016 at 02:42:25PM -0800, Andrey Wagin wrote: > On Thu, Jan 28, 2016 at 10:33:28PM +0100, Paolo Bonzini wrote: > > > > > > On 28/01/2016 09:31, Andrey Wagin wrote: > > > I tried to print drX registers after a break-point. Looks like they > > > are set correctly. > > > > Can you

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-15 Thread Andrew Vagin
On Mon, Dec 14, 2015 at 02:38:06PM -0800, Andy Lutomirski wrote: > On Dec 13, 2015 11:52 PM, "Andrew Vagin" wrote: > > > > On Thu, Dec 03, 2015 at 03:20:30PM -0800, Andy Lutomirski wrote: > > > On Tue, Nov 24, 2015 at 7:18 AM, Andrew Vagin &g

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-15 Thread Andrew Vagin
On Mon, Dec 14, 2015 at 02:38:06PM -0800, Andy Lutomirski wrote: > On Dec 13, 2015 11:52 PM, "Andrew Vagin" <ava...@virtuozzo.com> wrote: > > > > On Thu, Dec 03, 2015 at 03:20:30PM -0800, Andy Lutomirski wrote: > > > On Tue, Nov 24, 2015 at 7:18 AM, Andrew V

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-14 Thread Andrew Vagin
On Fri, Dec 04, 2015 at 12:43:29AM +0100, Arnd Bergmann wrote: > On Thursday 03 December 2015 15:20:30 Andy Lutomirski wrote: > > > * Netlink is designed for such type of workloads. It allows to expand > > > the interface and save backward compatibility. It allows to generates > > > packets

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-14 Thread Andrew Vagin
On Fri, Dec 04, 2015 at 12:43:29AM +0100, Arnd Bergmann wrote: > On Thursday 03 December 2015 15:20:30 Andy Lutomirski wrote: > > > * Netlink is designed for such type of workloads. It allows to expand > > > the interface and save backward compatibility. It allows to generates > > > packets

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-13 Thread Andrew Vagin
On Thu, Dec 03, 2015 at 03:20:30PM -0800, Andy Lutomirski wrote: > On Tue, Nov 24, 2015 at 7:18 AM, Andrew Vagin wrote: > > Hello Everybody, > > > > Sorry for the long delay. I wanted to resurrect this thread. > > > > Andy suggested to create a new syscall inste

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-12-13 Thread Andrew Vagin
On Thu, Dec 03, 2015 at 03:20:30PM -0800, Andy Lutomirski wrote: > On Tue, Nov 24, 2015 at 7:18 AM, Andrew Vagin <ava...@virtuozzo.com> wrote: > > Hello Everybody, > > > > Sorry for the long delay. I wanted to resurrect this thread. > > > > Andy suggested t

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-11-24 Thread Andrew Vagin
Hello Everybody, Sorry for the long delay. I wanted to resurrect this thread. Andy suggested to create a new syscall instead of using netlink interface. > Would it make more sense to have a new syscall instead?  You could > even still use nlattr formatting for the syscall results. I tried to

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-11-24 Thread Andrew Vagin
Hello Everybody, Sorry for the long delay. I wanted to resurrect this thread. Andy suggested to create a new syscall instead of using netlink interface. > Would it make more sense to have a new syscall instead?  You could > even still use nlattr formatting for the syscall results. I tried to

Re: [PATCH 08/24] proc: pick out a function to iterate task children

2015-07-17 Thread Andrew Vagin
On Tue, Jul 14, 2015 at 08:02:35PM +0200, Oleg Nesterov wrote: > On 07/06, Andrey Vagin wrote: > > > > -static struct pid * > > -get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos) > > +static struct task_struct * > > +task_next_child(struct task_struct *parent, struct

Re: [PATCH 08/24] proc: pick out a function to iterate task children

2015-07-17 Thread Andrew Vagin
On Tue, Jul 14, 2015 at 08:02:35PM +0200, Oleg Nesterov wrote: On 07/06, Andrey Vagin wrote: -static struct pid * -get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos) +static struct task_struct * +task_next_child(struct task_struct *parent, struct task_struct *prev,

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-07-08 Thread Andrew Vagin
On Tue, Jul 07, 2015 at 08:56:37AM -0700, Andy Lutomirski wrote: > On Tue, Jul 7, 2015 at 8:43 AM, Andrew Vagin wrote: > > On Mon, Jul 06, 2015 at 10:10:32AM -0700, Andy Lutomirski wrote: > >> On Mon, Jul 6, 2015 at 1:47 AM, Andrey Vagin wrote: > >> > Currently we u

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-07-08 Thread Andrew Vagin
On Tue, Jul 07, 2015 at 08:56:37AM -0700, Andy Lutomirski wrote: On Tue, Jul 7, 2015 at 8:43 AM, Andrew Vagin ava...@odin.com wrote: On Mon, Jul 06, 2015 at 10:10:32AM -0700, Andy Lutomirski wrote: On Mon, Jul 6, 2015 at 1:47 AM, Andrey Vagin ava...@openvz.org wrote: Currently we use

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-07-07 Thread Andrew Vagin
On Mon, Jul 06, 2015 at 10:10:32AM -0700, Andy Lutomirski wrote: > On Mon, Jul 6, 2015 at 1:47 AM, Andrey Vagin wrote: > > Currently we use the proc file system, where all information are > > presented in text files, what is convenient for humans. But if we need > > to get information about

Re: [PATCH 0/24] kernel: add a netlink interface to get information about processes (v2)

2015-07-07 Thread Andrew Vagin
On Mon, Jul 06, 2015 at 10:10:32AM -0700, Andy Lutomirski wrote: On Mon, Jul 6, 2015 at 1:47 AM, Andrey Vagin ava...@openvz.org wrote: Currently we use the proc file system, where all information are presented in text files, what is convenient for humans. But if we need to get information

Re: [PATCH] selftest: add a test case to check how locks are shown in fdinfo

2015-03-13 Thread Andrew Vagin
On Thu, Mar 12, 2015 at 02:43:19PM -0600, Shuah Khan wrote: > Hi Andrey, > > Looks good in general. Couple of comments. Thanks. The updated version is attached. > > On 03/12/2015 10:30 AM, Andrey Vagin wrote: > > The main idea of this test is to check that locks are shown correctly > > when

Re: [PATCH] selftest: add a test case to check how locks are shown in fdinfo

2015-03-13 Thread Andrew Vagin
On Thu, Mar 12, 2015 at 02:43:19PM -0600, Shuah Khan wrote: Hi Andrey, Looks good in general. Couple of comments. Thanks. The updated version is attached. On 03/12/2015 10:30 AM, Andrey Vagin wrote: The main idea of this test is to check that locks are shown correctly when they can't

Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X

2015-03-12 Thread Andrew Vagin
On Wed, Mar 11, 2015 at 03:08:53PM -0700, Andrew Morton wrote: > On Thu, 5 Mar 2015 18:37:18 +0300 Andrey Vagin wrote: > > > Let's show locks which are associated with a file descriptor in > > its fdinfo file. > > > > Currently we don't have a reliable way to determine who holds a lock. > > We

Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X

2015-03-12 Thread Andrew Vagin
On Wed, Mar 11, 2015 at 03:08:53PM -0700, Andrew Morton wrote: On Thu, 5 Mar 2015 18:37:18 +0300 Andrey Vagin ava...@openvz.org wrote: Let's show locks which are associated with a file descriptor in its fdinfo file. Currently we don't have a reliable way to determine who holds a lock.

Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X

2015-03-06 Thread Andrew Vagin
On Thu, Mar 05, 2015 at 02:11:40PM -0500, Jeff Layton wrote: > On Thu, 5 Mar 2015 18:37:18 +0300 > Andrey Vagin wrote: > > > Let's show locks which are associated with a file descriptor in > > its fdinfo file. > > > > Currently we don't have a reliable way to determine who holds a lock. > > We

Re: [PATCH] proc: show locks in /proc/pid/fdinfo/X

2015-03-06 Thread Andrew Vagin
On Thu, Mar 05, 2015 at 02:11:40PM -0500, Jeff Layton wrote: On Thu, 5 Mar 2015 18:37:18 +0300 Andrey Vagin ava...@openvz.org wrote: Let's show locks which are associated with a file descriptor in its fdinfo file. Currently we don't have a reliable way to determine who holds a lock.

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-19 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 05:18:38PM -0800, Andy Lutomirski wrote: > On Feb 18, 2015 6:27 AM, "Andrew Vagin" wrote: > > > > On Tue, Feb 17, 2015 at 11:05:31AM -0800, Andy Lutomirski wrote: > > > On Feb 17, 2015 12:40 AM, "Andrey Vagin" wrote: > >

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-19 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 03:46:31PM +0100, Arnd Bergmann wrote: > On Wednesday 18 February 2015 15:42:11 Andrew Vagin wrote: > > On Wed, Feb 18, 2015 at 12:06:40PM +0100, Arnd Bergmann wrote: > > > On Wednesday 18 February 2015 00:33:13 Andrew Vagin wrote: > > > > On T

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-19 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 03:46:31PM +0100, Arnd Bergmann wrote: On Wednesday 18 February 2015 15:42:11 Andrew Vagin wrote: On Wed, Feb 18, 2015 at 12:06:40PM +0100, Arnd Bergmann wrote: On Wednesday 18 February 2015 00:33:13 Andrew Vagin wrote: On Tue, Feb 17, 2015 at 09:53:09AM +0100

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-19 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 05:18:38PM -0800, Andy Lutomirski wrote: On Feb 18, 2015 6:27 AM, Andrew Vagin ava...@parallels.com wrote: On Tue, Feb 17, 2015 at 11:05:31AM -0800, Andy Lutomirski wrote: On Feb 17, 2015 12:40 AM, Andrey Vagin ava...@openvz.org wrote: Here is a preview

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-18 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 11:05:31AM -0800, Andy Lutomirski wrote: > On Feb 17, 2015 12:40 AM, "Andrey Vagin" wrote: > > > > Here is a preview version. It provides restricted set of functionality. > > I would like to collect feedback about this idea. > > > > Currently we use the proc file system,

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-18 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 12:06:40PM +0100, Arnd Bergmann wrote: > On Wednesday 18 February 2015 00:33:13 Andrew Vagin wrote: > > On Tue, Feb 17, 2015 at 09:53:09AM +0100, Arnd Bergmann wrote: > > > On Tuesday 17 February 2015 11:20:19 Andrey Vagin wrote: > > > >

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-18 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 11:05:31AM -0800, Andy Lutomirski wrote: On Feb 17, 2015 12:40 AM, Andrey Vagin ava...@openvz.org wrote: Here is a preview version. It provides restricted set of functionality. I would like to collect feedback about this idea. Currently we use the proc file

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-18 Thread Andrew Vagin
On Wed, Feb 18, 2015 at 12:06:40PM +0100, Arnd Bergmann wrote: On Wednesday 18 February 2015 00:33:13 Andrew Vagin wrote: On Tue, Feb 17, 2015 at 09:53:09AM +0100, Arnd Bergmann wrote: On Tuesday 17 February 2015 11:20:19 Andrey Vagin wrote: task_diag is based on netlink sockets

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-17 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 09:53:09AM +0100, Arnd Bergmann wrote: > On Tuesday 17 February 2015 11:20:19 Andrey Vagin wrote: > > task_diag is based on netlink sockets and looks like socket-diag, which > > is used to get information about sockets. > > > > A request is described by the task_diag_pid

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-17 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 09:09:47AM -0700, David Ahern wrote: > On 2/17/15 1:20 AM, Andrey Vagin wrote: > >And here are statistics about syscalls which were called by each > >command. > >$ perf stat -e syscalls:sys_exit* -- ps ax -o pid,ppid 2>&1 | grep syscalls > >| sort -n -r | head -n 5 > >

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-17 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 09:09:47AM -0700, David Ahern wrote: On 2/17/15 1:20 AM, Andrey Vagin wrote: And here are statistics about syscalls which were called by each command. $ perf stat -e syscalls:sys_exit* -- ps ax -o pid,ppid 21 | grep syscalls | sort -n -r | head -n 5

Re: [PATCH 0/7] [RFC] kernel: add a netlink interface to get information about processes

2015-02-17 Thread Andrew Vagin
On Tue, Feb 17, 2015 at 09:53:09AM +0100, Arnd Bergmann wrote: On Tuesday 17 February 2015 11:20:19 Andrey Vagin wrote: task_diag is based on netlink sockets and looks like socket-diag, which is used to get information about sockets. A request is described by the task_diag_pid structure:

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v3)

2014-10-28 Thread Andrew Vagin
Hi Al, Could you look at this patch once again? The first version changes behavior for all cases. And I agree that it's a reason to reject it. This version makes behaviour predictable and equal for all cases. Do you think it can't be accepted too? Thanks. On Fri, Oct 03, 2014 at 02:35:23PM

Re: [PATCH] fs: don't remove inotify watchers from alive inode-s (v3)

2014-10-28 Thread Andrew Vagin
Hi Al, Could you look at this patch once again? The first version changes behavior for all cases. And I agree that it's a reason to reject it. This version makes behaviour predictable and equal for all cases. Do you think it can't be accepted too? Thanks. On Fri, Oct 03, 2014 at 02:35:23PM

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-09 Thread Andrew Vagin
On Wed, Oct 08, 2014 at 12:23:52PM -0700, Eric W. Biederman wrote: > Andy Lutomirski writes: > > > On Wed, Oct 8, 2014 at 4:08 AM, Andrew Vagin wrote: > >> On Tue, Oct 07, 2014 at 01:45:22PM -0700, Eric W. Biederman wrote: > >>> Andrey Vagin writes:

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-09 Thread Andrew Vagin
On Wed, Oct 08, 2014 at 12:23:52PM -0700, Eric W. Biederman wrote: Andy Lutomirski l...@amacapital.net writes: On Wed, Oct 8, 2014 at 4:08 AM, Andrew Vagin ava...@parallels.com wrote: On Tue, Oct 07, 2014 at 01:45:22PM -0700, Eric W. Biederman wrote: Andrey Vagin ava...@openvz.org writes

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-08 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 01:45:22PM -0700, Eric W. Biederman wrote: > Andrey Vagin writes: > > > From: Andrey Vagin > > > > Currently when we create a new container with a separate root, > > we need to clone the current mount namespace with all mounts and then > > clean up it by using

Re: [PATCH] umount: Do not allow unmounting rootfs.

2014-10-08 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 12:27:06PM -0700, Eric W. Biederman wrote: > > Andrew Vagin writes: > > > #define _GNU_SOURCE > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc,

Re: [PATCH] mnt: Move the clear of MNT_LOCKED from copy_tree to it's

2014-10-08 Thread Andrew Vagin
ts > is used to take a snapshot of the mount tree for audit logging purposes > and auditing using a faithful copy of the tree is important. > > This becomes particularly significant when we start setting MNT_LOCKED > on rootfs to prevent it from being unmounted. > Acked-by: Andrew Va

Re: [PATCH] mnt: Move the clear of MNT_LOCKED from copy_tree to it's

2014-10-08 Thread Andrew Vagin
a snapshot of the mount tree for audit logging purposes and auditing using a faithful copy of the tree is important. This becomes particularly significant when we start setting MNT_LOCKED on rootfs to prevent it from being unmounted. Acked-by: Andrew Vagin ava...@parallels.com Signed-off

Re: [PATCH] umount: Do not allow unmounting rootfs.

2014-10-08 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 12:27:06PM -0700, Eric W. Biederman wrote: Andrew Vagin ava...@parallels.com writes: #define _GNU_SOURCE #include sys/types.h #include sys/stat.h #include fcntl.h #include sched.h #include unistd.h #include sys/mount.h int main(int argc, char **argv

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-08 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 01:45:22PM -0700, Eric W. Biederman wrote: Andrey Vagin ava...@openvz.org writes: From: Andrey Vagin ava...@gmail.com Currently when we create a new container with a separate root, we need to clone the current mount namespace with all mounts and then clean up

Re: [PATCH] umount: Do not allow unmounting rootfs.

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 01:58:01PM -0700, Eric W. Biederman wrote: > Andrew Vagin writes: > > > On Tue, Oct 07, 2014 at 12:27:06PM -0700, Eric W. Biederman wrote: > >> > >> Which in practice is totally uninteresting. Only the global root user can > >> do

Re: [PATCH] umount: Do not allow unmounting rootfs.

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 12:27:06PM -0700, Eric W. Biederman wrote: > > Andrew Vagin writes: > > > #define _GNU_SOURCE > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc,

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 02:33:39PM +0100, Al Viro wrote: > On Tue, Oct 07, 2014 at 02:30:40PM +0100, Al Viro wrote: > > On Tue, Oct 07, 2014 at 04:12:57PM +0400, Andrey Vagin wrote: > > > Another problem is that rootfs can't be hidden from a container, because > > > rootfs can't be moved or

Re: [PATCH] mnt: don't allow to detach the namespace root

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 02:24:36PM +0100, Al Viro wrote: > On Tue, Oct 07, 2014 at 04:00:12PM +0400, Andrey Vagin wrote: > > This patch fixes a bug, which is triggered by following code: > > while (1) { > > if (umount2("/", MNT_DETACH) || > > setns(fd, CLONE_NEWNS)) > >

Re: [PATCH] mnt: don't allow to detach the namespace root

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 02:24:36PM +0100, Al Viro wrote: On Tue, Oct 07, 2014 at 04:00:12PM +0400, Andrey Vagin wrote: This patch fixes a bug, which is triggered by following code: while (1) { if (umount2(/, MNT_DETACH) || setns(fd, CLONE_NEWNS)) return

Re: [PATCH] [RFC] mnt: add ability to clone mntns starting with the current root

2014-10-07 Thread Andrew Vagin
On Tue, Oct 07, 2014 at 02:33:39PM +0100, Al Viro wrote: On Tue, Oct 07, 2014 at 02:30:40PM +0100, Al Viro wrote: On Tue, Oct 07, 2014 at 04:12:57PM +0400, Andrey Vagin wrote: Another problem is that rootfs can't be hidden from a container, because rootfs can't be moved or umounted.

  1   2   3   >