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. There is no way to d

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)" 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 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 readlink("/proc/self/fd/%d") > >>> on the returned F

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 th

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 u

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 in

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

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 the superblock ops),

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 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 other possibly releva

Re: Introspecting userns relationships to other namespaces?

2016-07-07 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-07 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) > > > wrote

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 w

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 > tcp_wnd_end(

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: > https://githu

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) > > +{ > > + stru

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 == last_dest->mnt_

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 (IS_MNT_SH

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 t

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-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 wit

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-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 imp

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_stru

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-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 proce

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 the

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-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 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-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, wh

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-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 st

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] 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 +0400

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-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 pivot_root(

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
> 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] 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 umounte

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] fs: don't remove inotify watchers from alive inode-s

2014-09-17 Thread Andrew Vagin
On Tue, Sep 16, 2014 at 11:12:11PM +0200, Jan Kara wrote: > On Sat 13-09-14 18:15:09, Heinrich Schuchardt wrote: > > On Tue 09-09-14 02:27:12, Al Viro wrote: > > http://lkml.org/lkml/2014/9/8/762 > > > I agree that it changes user-visible ABI and I agree the behavior > > > isn't really specified in

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

2014-09-10 Thread Andrew Vagin
On Tue, Sep 09, 2014 at 10:54:39AM +0200, Jan Kara wrote: > On Tue 09-09-14 02:27:12, Al Viro wrote: > > On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote: > > > Currently watchers are removed in dentry_iput(), if n_link is zero. > > > But other detries can be linked with this inode. For

Re: [PATCH] ipc: always handle a new value of auto_msgmni

2014-08-18 Thread Andrew Vagin
On Sat, Aug 16, 2014 at 10:29:16PM +0200, Manfred Spraul wrote: > Hi Andrew, > > On 08/14/2014 03:34 PM, Andrew Vagin wrote: > >On Thu, Aug 14, 2014 at 11:37:45AM +0200, Manfred Spraul wrote: > >>Hi Andrey, > >> > >>[...] > >>What do you use a

Re: [PATCH] ipc: always handle a new value of auto_msgmni

2014-08-14 Thread Andrew Vagin
On Thu, Aug 14, 2014 at 11:37:45AM +0200, Manfred Spraul wrote: > Hi Andrey, > > On 08/13/2014 03:21 PM, Andrey Vagin wrote: > >proc_dointvec_minmax() returns zero, if a new value has been set. > >So we don't need to check all charectes have been handled. > What do you use auto_msgmni for? We dis

Re: [PATCH] tcp: don't use timestamp from repaired skb-s to calculate RTT

2014-08-12 Thread Andrew Vagin
On Tue, Aug 12, 2014 at 07:53:57AM -0700, Yuchung Cheng wrote: > On Tue, Aug 12, 2014 at 2:45 AM, Andrey Vagin wrote: > > We don't know right timestamp for repaired skb-s. Wrong RTT estimations > > isn't good, because some congestion modules heavily depends on it. > > > > This patch adds the TCPCB

Re: [PATCH] tcp: don't use timestamp from repaired skb-s to calculate RTT

2014-08-12 Thread Andrew Vagin
On Tue, Aug 12, 2014 at 06:14:43AM -0700, Eric Dumazet wrote: > On Tue, 2014-08-12 at 16:33 +0400, Andrew Vagin wrote: > > On Tue, Aug 12, 2014 at 05:15:01AM -0700, Eric Dumazet wrote: > > > On Tue, 2014-08-12 at 13:45 +0400, Andrey Vagin wrote: > > > > We don'

Re: [PATCH] tcp: don't use timestamp from repaired skb-s to calculate RTT

2014-08-12 Thread Andrew Vagin
On Tue, Aug 12, 2014 at 05:15:01AM -0700, Eric Dumazet wrote: > On Tue, 2014-08-12 at 13:45 +0400, Andrey Vagin wrote: > > We don't know right timestamp for repaired skb-s. Wrong RTT estimations > > isn't good, because some congestion modules heavily depends on it. > > > > This patch adds the TCPC

Re: [patch 4/4] prctl: PR_SET_MM -- Introduce PR_SET_MM_MAP operation, v3

2014-08-05 Thread Andrew Vagin
w interface is implemented in the kernel one > can pass PR_SET_MM_MAP_SIZE opcode and the kernel returns > the size of currently supported struct prctl_mm_map. > > v2: > - compact macros (by keescook@) > - wrap new code with CONFIG_ (by akpm@) > > v3 (by jln@): > - u

Re: [RFC 2/2] prctl: PR_SET_MM -- Introduce PR_SET_MM_MAP operation

2014-07-24 Thread Andrew Vagin
On Tue, Jul 22, 2014 at 01:07:51PM -0700, Kees Cook wrote: > > - @exe_fd is referred from /proc/$pid/exe and when generating > >coredump. We uses prctl_set_mm_exe_file_locked helper to update > >this member, so exe-file link modification remains one-shot > >action. > > Controlling exe

Re: [PATCH] CAPABILITIES: remove undefined caps from all processes

2014-07-22 Thread Andrew Vagin
fined capability bits. it's simple, it you > don't put those invalid bits in CAP_FULL_SET you won't get them in init > and you won't get them in any other task either. Pls, look at the comment for my first patch: https://lkml.org/lkml/2012/10/5/374 The following comman

Re: [RFC 2/2] prctl: PR_SET_MM -- Introduce PR_SET_MM_MAP operation

2014-07-04 Thread Andrew Vagin
currently supported struct prctl_mm_map. I like the idea of this patch. See a few comments inline > > Signed-off-by: Cyrill Gorcunov > Cc: Kees Cook > Cc: Tejun Heo > Cc: Andrew Morton > Cc: Andrew Vagin > Cc: Eric W. Biederman > Cc: Serge Hallyn > Cc: Pavel

Re: [patch 0/4] timerfd c/r support, v4

2014-06-23 Thread Andrew Vagin
hink that while there is only one ioctl > designated > solely for c/r needs no need to build it all the time until explicitly > requested. > Please take a look once time permit. Comments are highly appreciated. > Also note the last patch is for man-page git repo, not for kernel. >

Re: [patch 3/3] timerfd: Implement write method

2014-06-11 Thread Andrew Vagin
On Wed, Jun 11, 2014 at 11:51:25AM +0400, Cyrill Gorcunov wrote: > On Wed, Jun 11, 2014 at 11:27:43AM +0400, Andrew Vagin wrote: ... > +#ifdef CONFIG_CHECKPOINT_RESTORE > +static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long > arg) > +{ > + struc

Re: [patch 3/3] timerfd: Implement write method

2014-06-11 Thread Andrew Vagin
On Tue, Jun 10, 2014 at 08:35:30PM +0400, Cyrill Gorcunov wrote: > On Thu, May 22, 2014 at 06:58:19AM +0900, Thomas Gleixner wrote: > > > > > > So what wakes a potential waiter in read/poll? > > > > And who is updating timerfd_create(2) ? > > Thomas, could you please take a look if the approach

Re: [PATCH] [RFC] netfilter: ct: flush net_gre->keymap_list only in nf_conntrack_proto_gre

2014-04-07 Thread Andrew Vagin
On Mon, Apr 07, 2014 at 04:51:58PM +0200, Pablo Neira Ayuso wrote: > On Mon, Mar 31, 2014 at 06:14:18PM +0400, Andrey Vagin wrote: > > nf_ct_gre_keymap_flush() removes a nf_ct_gre_keymap object from > > net_gre->keymap_list and frees the object. But it doesn't clean > > a reference on this object f

Re: [PATCH 1/3] prctl: reduce permissions to change boundaries of data, brk and stack

2014-02-14 Thread Andrew Vagin
On Fri, Feb 14, 2014 at 08:05:42AM -0800, Eric W. Biederman wrote: > Andrey Vagin writes: > > > Currently this operation requires the global CAP_SYS_RESOURCE. > > It's required, because a task can exceed limits (RLIMIT_DATA, > > RLIMIT_STACK). > > > > So let's allow task to change these parameter

Re: [PATCH] kernel: reduce required permission for prctl_set_mm

2014-02-12 Thread Andrew Vagin
On Wed, Feb 12, 2014 at 01:50:35PM -0800, Kees Cook wrote: > On Wed, Feb 12, 2014 at 1:32 PM, Andrew Morton > wrote: > > On Wed, 12 Feb 2014 19:40:11 +0400 Andrey Vagin wrote: > > > >> Currently prctl_set_mm requires the global CAP_SYS_RESOURCE, > >> this patch reduce requiremence to CAP_SYS_RESO

Re: [PATCH] kernel: reduce required permission for prctl_set_mm

2014-02-12 Thread Andrew Vagin
On Wed, Feb 12, 2014 at 01:32:28PM -0800, Andrew Morton wrote: > On Wed, 12 Feb 2014 19:40:11 +0400 Andrey Vagin wrote: > > > Currently prctl_set_mm requires the global CAP_SYS_RESOURCE, > > this patch reduce requiremence to CAP_SYS_RESOURCE in the current > > namespace. > > > > When we restore

Re: Thread overran stack, or stack corrupted on 3.13.0

2014-02-05 Thread Andrew Vagin
On Wed, Feb 05, 2014 at 01:23:45PM -0800, David Rientjes wrote: > On Wed, 5 Feb 2014, Andrew Vagin wrote: ... > > You've clipped the most interesting part of the trace, we don't know what > was calling mempool_alloc() and must have used a ton of stack. Sorry. You can find

Thread overran stack, or stack corrupted on 3.13.0

2014-02-05 Thread Andrew Vagin
Hello All, My test server crashed a few days ago. The kernel was built from Linus' git without any additional changes. I don't know how to reproduce this bug. [532284.563576] BUG: unable to handle kernel paging request at 35c83420 [532284.564086] IP: [] cpuacct_charge+0x97/0x1e0 [532284.5

Re: [PATCH] [RFC] netfilter: nf_conntrack: don't relase a conntrack with non-zero refcnt

2014-02-03 Thread Andrew Vagin
On Mon, Feb 03, 2014 at 12:30:46AM +0100, Pablo Neira Ayuso wrote: > On Thu, Jan 16, 2014 at 10:23:01AM +0100, Florian Westphal wrote: > > Andrew Vagin wrote: > > > > I think it would be nice if we could keep it that way. > > > > If everything fails we could proab

Re: [CRIU] [PATCH] timerfd: show procfs fdinfo helper

2014-02-03 Thread Andrew Vagin
On Mon, Feb 03, 2014 at 01:24:41AM +, sh...@churchofgit.com wrote: > Original Message > From: "Andrey Wagin" > To: "Shawn Landden" > CC: "LKML" , "c...@openvz.org" > , "Alexander Viro" , > linux-fsde...@vger.kernel.org, "Thomas Gleixner" > Sent: Wed, Dec

Re: [PATCH] mm: don't lose the SOFT_DIRTY flag on mprotect

2014-01-29 Thread Andrew Vagin
On Wed, Jan 29, 2014 at 12:18:59PM -0800, Andrew Morton wrote: > On Thu, 30 Jan 2014 00:04:59 +0400 Andrey Vagin wrote: > > > The SOFT_DIRTY bit shows that the content of memory was changed > > after a defined point in the past. mprotect() doesn't change the > > content of memory, so it must not

Re: [PATCH] [RFC] netfilter: nf_conntrack: don't relase a conntrack with non-zero refcnt

2014-01-27 Thread Andrew Vagin
On Tue, Jan 14, 2014 at 09:35:48PM +0400, Andrey Vagin wrote: > > Eric and Florian, could you look at this patch. When you say, > that it looks good, I will ask the user to validate it. > I can't reorder these actions, because it's reproduced on a real host > with real users. Thanks. We didn'

Re: [PATCH] [RFC] netfilter: nf_conntrack: don't relase a conntrack with non-zero refcnt

2014-01-15 Thread Andrew Vagin
On Tue, Jan 14, 2014 at 07:53:29PM +0100, Florian Westphal wrote: > Andrey Vagin wrote: > > > > Eric and Florian, could you look at this patch. When you say, > > that it looks good, I will ask the user to validate it. > > I can't reorder these actions, because it's reproduced on a real host >

Re: [PATCH] netfilter: nf_conntrack: fix RCU race in nf_conntrack_find_get (v3)

2014-01-14 Thread Andrew Vagin
On Sun, Jan 12, 2014 at 12:21:14PM -0800, Eric Dumazet wrote: > On Sun, 2014-01-12 at 21:50 +0400, Andrey Vagin wrote: > > Lets look at destroy_conntrack: > > > > hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); > > ... > > nf_conntrack_free(ct) > > kmem_cache_free(net->ct.nf_co

Re: [PATCH] netfilter: nf_conntrack: fix RCU race in nf_conntrack_find_get

2014-01-09 Thread Andrew Vagin
On Thu, Jan 09, 2014 at 09:56:22PM +0100, Florian Westphal wrote: > Andrew Vagin wrote: > > Can we allocate conntrack with zero ct_general.use and increment it at > > the first time before inserting the conntrack into the hash table? > > When conntrack is allocated it is at

Re: [PATCH] netfilter: nf_conntrack: fix RCU race in nf_conntrack_find_get

2014-01-09 Thread Andrew Vagin
On Tue, Jan 07, 2014 at 04:25:20PM +0100, Florian Westphal wrote: > Eric Dumazet wrote: > > > diff --git a/net/netfilter/nf_conntrack_core.c > > > b/net/netfilter/nf_conntrack_core.c > > > index 43549eb..7a34bb2 100644 > > > --- a/net/netfilter/nf_conntrack_core.c > > > +++ b/net/netfilter/nf_con

Re: [PATCH] netfilter: nf_conntrack: fix RCU race in nf_conntrack_find_get

2014-01-08 Thread Andrew Vagin
On Tue, Jan 07, 2014 at 07:08:25AM -0800, Eric Dumazet wrote: > On Tue, 2014-01-07 at 14:31 +0400, Andrey Vagin wrote: > > Lets look at destroy_conntrack: > > > > hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); > > ... > > nf_conntrack_free(ct) > > kmem_cache_free(net->ct.nf_co

Re: [PATCH] netfilter: nf_conntrack: release conntrack from rcu callback

2014-01-06 Thread Andrew Vagin
On Mon, Jan 06, 2014 at 06:02:35PM +0100, Florian Westphal wrote: > Andrey Vagin wrote: > > Lets look at destroy_conntrack: > > > > hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); > > ... > > nf_conntrack_free(ct) > > kmem_cache_free(net->ct.nf_conntrack_cachep, ct); > > > >

[PATCH] mm: don't forget to free shrinker->nr_deferred

2013-10-01 Thread Andrew Vagin
lloc_pid+0x466/0x4a0 [] copy_process+0xc6a/0x1860 [] do_fork+0x8b/0x370 [] SyS_clone+0x16/0x20 [] stub_clone+0x69/0x90 [] 0x Cc: Andrew Morton Cc: Mel Gorman Cc: Michal Hocko Cc: Rik van Riel Cc: Johannes Weiner Cc: Glauber Costa Signed-off-by: Andrew Vag

Re: [PATCH 1/3] ptrace.2: place GETSIGINFO and SETSIGINFO near each other

2013-08-08 Thread Andrew Vagin
Hi Michael, On Thu, Jul 18, 2013 at 03:13:39AM +0200, Michael Kerrisk wrote: > Thanks Andrey. Applied. You committed one of three patches. What do you think about other patches? ptrace.2: add description for PTRACE_PEEKSIGINFO ptrace.2: add description for PTRACE_{GET,SET}SIGMASK Thanks, Andre

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-08-05 Thread Andrew Vagin
On Mon, Aug 05, 2013 at 02:16:09PM -0700, Andrew Morton wrote: > On Tue, 6 Aug 2013 01:01:28 +0400 Andrew Vagin wrote: > > > On Mon, Aug 05, 2013 at 01:05:30PM -0700, Andrew Morton wrote: > > > On Mon, 5 Aug 2013 20:09:40 +0400 Andrey Vagin wrote: > > > > >

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-08-05 Thread Andrew Vagin
On Mon, Aug 05, 2013 at 01:05:30PM -0700, Andrew Morton wrote: > On Mon, 5 Aug 2013 20:09:40 +0400 Andrey Vagin wrote: > > > struct memcg_cache_params has a union. Different parts of this union > > are used for root and non-root caches. A part with destroying work is > > used only for non-root c

[PATCH] tracing: a few fields of struct trace_iterator are zeroed by mistake

2013-08-02 Thread Andrew Vagin
be freed. The "started" is never dereferenced for trace_pipe, because trace_pipe can't have the TRACE_FILE_ANNOTATE options (why?). Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: David Sharp Cc: Hiraku Toyooka Cc: Arjan van de Ven Cc: Masami Hiramatsu Sign

Re: frequent softlockups with 3.10rc6.

2013-06-22 Thread Andrew Vagin
On Sat, Jun 22, 2013 at 05:59:05PM -0400, Dave Jones wrote: > On Sat, Jun 22, 2013 at 07:31:29PM +0200, Oleg Nesterov wrote: > > > > [ 7485.261299] WARNING: at include/linux/nsproxy.h:63 > get_proc_task_net+0x1c8/0x1d0() > > > [ 7485.262021] Modules linked in: 8021q garp stp tun fuse rfcomm bn

[PATCH] virtio-pci: fix leaks of msix_affinity_masks

2013-06-19 Thread Andrew Vagin
dev+0x94/0xb0 [] driver_attach+0x1e/0x20 [] bus_add_driver+0x200/0x280 [] driver_register+0x74/0x160 [] register_virtio_driver+0x20/0x40 Cc: Rusty Russell Cc: "Michael S. Tsirkin" Signed-off-by: Andrew Vagin --- drivers/virtio/virtio_pci.c |3 ++- 1 files changed, 2 ins

Re: [PATCH] [RFC] mnt: restrict a number of "struct mnt"

2013-06-17 Thread Andrew Vagin
On Mon, Jun 17, 2013 at 03:56:14PM -0700, Andrew Morton wrote: > On Mon, 17 Jun 2013 12:58:00 -0700 ebied...@xmission.com (Eric W. Biederman) > wrote: > > > > I found that a few processes can eat all host memory and nobody can kill > > > them. > > > $ mount -t tmpfs xxx /mnt > > > $ mount --make

Re: [PATCH 1/1] move exit_task_namespaces() outside of exit_notify()

2013-06-13 Thread Andrew Vagin
On Sat, Apr 13, 2013 at 05:55:21PM +0200, Oleg Nesterov wrote: > exit_notify() does exit_task_namespaces() after > forget_original_parent(). This was needed to ensure that ->nsproxy > can't be cleared prematurely, an exiting child we are going to > reparent can do do_notify_parent() and use the par

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-05-22 Thread Andrew Vagin
On Wed, May 22, 2013 at 03:50:24PM +0800, Li Zefan wrote: > On 2013/5/22 15:40, Andrew Vagin wrote: > > On Tue, May 14, 2013 at 06:08:59PM +0200, Michal Hocko wrote: > >> > >> Forgot to add > >> Reviewed-by: Michal Hocko > >> + > >> Cc: stabl

Re: [PATCH] memcg: don't initialize kmem-cache destroying work for root caches

2013-05-22 Thread Andrew Vagin
On Tue, May 14, 2013 at 06:08:59PM +0200, Michal Hocko wrote: > > Forgot to add > Reviewed-by: Michal Hocko > + > Cc: stable # 3.9 > > Thanks Who usually picks up such patches? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

Re: [PATCH] ptrace: add ability to get/set signal-blocked mask (v2)

2013-05-06 Thread Andrew Vagin
Andrew, let me know if you are waiting something to accept this patch. Thanks. On Tue, Apr 23, 2013 at 05:21:43PM +0200, Oleg Nesterov wrote: > On 04/23, Andrey Vagin wrote: > > > > @@ -841,6 +841,48 @@ int ptrace_request(struct task_struct *child, long > > request, > > ret =

Re: [PATCH] ptrace: add ability to get/set signal-blocked mask

2013-04-23 Thread Andrew Vagin
On Mon, Apr 22, 2013 at 05:07:10PM +0200, Oleg Nesterov wrote: > On 04/22, Oleg Nesterov wrote: > > > > On 04/22, Andrey Vagin wrote: > > > > > > + case PTRACE_SETSIGMASK: > > > + { > > > + sigset_t new_set; > > > + > > > + if (addr != sizeof(sigset_t)) { > > > + ret

Re: [PATCH 2/2] netlink: Diag core and basic socket info dumping

2013-03-21 Thread Andrew Vagin
On Thu, Mar 21, 2013 at 12:52:30PM +, Thomas Graf wrote: > On 03/21/13 at 01:21pm, Andrey Vagin wrote: > > diff --git a/include/uapi/linux/netlink_diag.h > > b/include/uapi/linux/netlink_diag.h > > new file mode 100644 > > index 000..9328866 > > --- /dev/null > > +++ b/include/uapi/linux/n

Re: [CRIU] [PATCH 3/3] signalfd: add ability to read siginfo-s without dequeuing signals (v2)

2013-02-11 Thread Andrew Vagin
On Mon, Feb 11, 2013 at 10:29:50AM +0100, Denys Vlasenko wrote: > On Friday 08 February 2013 21:15, Michael Kerrisk (man-pages) wrote: > > >> >Damn. But after I wrote this email I realized that llseek() probably > > >> >can't > > >> > work. Because peek_offset/f_pos/whatever has to be shared with

Re: [CRIU] [PATCH 3/3] signalfd: add ability to read siginfo-s without dequeuing signals (v2)

2013-02-10 Thread Andrew Vagin
On Sat, Feb 09, 2013 at 07:22:39PM +0100, Oleg Nesterov wrote: > On 02/08, Michael Kerrisk (man-pages) wrote: > > > > On Fri, Feb 8, 2013 at 8:10 PM, Oleg Nesterov wrote: > > > > > > Well. I do not know. Up to you and Michael. > > > > > > But honestly, I can't say this all looks really nice. And w

Re: [CRIU] [PATCH 3/3] signalfd: add ability to read siginfo-s without dequeuing signals (v2)

2013-02-10 Thread Andrew Vagin
On Sat, Feb 09, 2013 at 11:53:04PM +0100, Michael Kerrisk (man-pages) wrote: > On Sat, Feb 9, 2013 at 7:22 PM, Oleg Nesterov wrote: > > On 02/08, Michael Kerrisk (man-pages) wrote: > >> > >> On Fri, Feb 8, 2013 at 8:10 PM, Oleg Nesterov wrote: > >> > > >> > Well. I do not know. Up to you and Mich

Re: [PATCH 1/2] tcp: make tcp_timestamp dependent on tcp_sock

2013-01-23 Thread Andrew Vagin
On Wed, Jan 23, 2013 at 08:25:17AM -0800, Eric Dumazet wrote: > > @@ -1142,9 +1145,11 @@ static inline void tcp_openreq_init(struct > > request_sock *req, > > static inline void tcp_synack_rtt_meas(struct sock *sk, > >struct request_sock *req) > > { > > + co

Re: [PATCH 0/3] signalfd: a kernel interface for dumping pending signals

2013-01-23 Thread Andrew Vagin
On Wed, Jan 23, 2013 at 01:11:42PM +0100, Michael Kerrisk (man-pages) wrote: > Hi Andrey, > > On Wed, Jan 23, 2013 at 12:03 PM, Andrew Vagin wrote: > > On Wed, Jan 23, 2013 at 05:19:24AM +0100, Michael Kerrisk (man-pages) wrote: > >> Hi Andrey, > >> > >>

  1   2   >