Re: [PATCH] net: sched: sch_teql: fix null-pointer dereference

2021-04-08 Thread Pavel Tikhomirov
On 4/8/21 6:26 PM, Eric Dumazet wrote: On 4/8/21 5:14 PM, Pavel Tikhomirov wrote: Reproduce: modprobe sch_teql tc qdisc add dev teql0 root teql0 This leads to (for instance in Centos 7 VM) OOPS: Null pointer dereference happens on master->slaves dereference in teql_destroy()

[PATCH] net: sched: sch_teql: fix null-pointer dereference

2021-04-08 Thread Pavel Tikhomirov
get OOPS. Signed-off-by: Pavel Tikhomirov --- net/sched/sch_teql.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 2f1f0a378408..6af6b95bdb67 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c @@ -134,6 +134,9 @@ teql_

[PATCH] clone3: add option to change owner of newly created namespaces

2021-04-02 Thread Pavel Tikhomirov
e3+set_tid can work for restoring pids on each level of nested user and pid namespaces when used together with userns_fd: https://github.com/Snorch/clone3_owner_ns Signed-off-by: Pavel Tikhomirov --- include/linux/nsproxy.h| 3 ++- include/linux/sched/task.h | 1 + include/linux/user_name

Re: [PATCH] move_mount: allow to add a mount into an existing group

2021-03-29 Thread Pavel Tikhomirov
On 3/29/21 12:47 AM, Andrei Vagin wrote: On Thu, Mar 25, 2021 at 03:14:44PM +0300, Pavel Tikhomirov wrote: Previously a sharing group (shared and master ids pair) can be only inherited when mount is created via bindmount. This patch adds an ability to add an existing private mount into an

[PATCH] move_mount: allow to add a mount into an existing group

2021-03-25 Thread Pavel Tikhomirov
c: linux-fsde...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: lkml Signed-off-by: Pavel Tikhomirov --- This is a rework of "mnt: allow to add a mount into an existing group" patch from Andrei. https://lkml.org/lkml/2017/4/28/20 New do_set_group is similar to do_move_mount, but wi

Re: [CRIU] [PATCH] mnt: allow to add a mount into an existing group

2021-03-24 Thread Pavel Tikhomirov
Adding Andrew to CC with the right email. On 3/23/21 3:59 PM, Pavel Tikhomirov wrote: Hi! Can we restart the discussion on this topic? In CRIU we need to be able to dump/restore all mount trees of system container (CT). CT can have anything inside - users which create their custom mounts

Re: [CRIU] [PATCH] mnt: allow to add a mount into an existing group

2021-03-23 Thread Pavel Tikhomirov
Hi! Can we restart the discussion on this topic? In CRIU we need to be able to dump/restore all mount trees of system container (CT). CT can have anything inside - users which create their custom mounts configuration, systemd with custom mount namespaces for it's services, nested application c

Re: [PATCH] fcntl: make F_GETOWN(EX) return 0 on dead owner task

2021-02-08 Thread Pavel Tikhomirov
On 2/8/21 3:31 PM, Jeff Layton wrote: On Thu, 2021-02-04 at 01:17 +0300, Cyrill Gorcunov wrote: On Thu, Feb 04, 2021 at 12:35:42AM +0300, Pavel Tikhomirov wrote: AFAICS if pid is held only by 1) fowner refcount and by 2) single process (without threads, group and session for simplicity

Re: [PATCH] fcntl: make F_GETOWN(EX) return 0 on dead owner task

2021-02-03 Thread Pavel Tikhomirov
On 2/3/21 10:32 PM, Cyrill Gorcunov wrote: On Wed, Feb 03, 2021 at 03:41:56PM +0300, Pavel Tikhomirov wrote: Currently there is no way to differentiate the file with alive owner from the file with dead owner but pid of the owner reused. That's why CRIU can't actually know if it needs

[PATCH] fcntl: make F_GETOWN(EX) return 0 on dead owner task

2021-02-03 Thread Pavel Tikhomirov
org Cc: Cyrill Gorcunov Cc: Andrei Vagin Signed-off-by: Pavel Tikhomirov --- fs/fcntl.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/fs/fcntl.c b/fs/fcntl.c index 05b36b28f2e8..483ef8861376 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -148,11 +148,15

[PATCH v5 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-10-13 Thread Pavel Tikhomirov
iner. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov --- v2: in v1 I missed actual uuid check skip v3: rebase to overlayfs-next, replace uuid with null in file handles, split ovl_f

[PATCH v5 1/2] ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh

2020-10-13 Thread Pavel Tikhomirov
mir Goldstein Signed-off-by: Pavel Tikhomirov --- fs/overlayfs/copy_up.c | 22 -- fs/overlayfs/export.c| 10 ++ fs/overlayfs/namei.c | 19 ++- fs/overlayfs/overlayfs.h | 14 -- fs/overlayfs/util.c | 3 ++- 5 files changed,

[PATCH v5 0/2] ovl introduce "uuid=off"

2020-10-13 Thread Pavel Tikhomirov
. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov Pavel Tikhomirov (2): ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh ovl: introduce new "uuid=off&qu

Re: [PATCH v4 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-10-13 Thread Pavel Tikhomirov
On 10/6/20 6:13 PM, Miklos Szeredi wrote: On Fri, Sep 25, 2020 at 10:35 AM Pavel Tikhomirov wrote: Note: In our (Virtuozzo) use case users inside a container can create "regular" overlayfs mounts without any "index=" option, but we still want to migrate this containers

Re: [PATCH 0/4] fs: add mount_setattr()

2020-10-01 Thread Pavel Tikhomirov
mount_setattr() can be expected to grow over time and is designed with extensibility in mind. It follows the extensible syscall pattern we have used with other syscalls such as openat2(), clone3(), sched_{set,get}attr(), and others. The set of mount options is passed in the uapi struct mount_a

Re: [PATCH v4 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-09-28 Thread Pavel Tikhomirov
On 9/25/20 7:42 PM, Amir Goldstein wrote: Apart from some typos, looks good to me. Amir, Thanks a lot for your review! > you should wait for more feedback from others Sure, will wait. -- Best regards, Tikhomirov Pavel Software Developer, Virtuozzo.

Re: [PATCH v3 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-09-25 Thread Pavel Tikhomirov
tein wrote: On Thu, Sep 24, 2020 at 7:38 PM Pavel Tikhomirov wrote: This replaces uuid with null in overelayfs file handles and thus relaxes uuid checks for overlay index feature. It is only possible in case there is only one filesystem for all the work/upper/lower directories and bare file ha

[PATCH v4 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-09-25 Thread Pavel Tikhomirov
C: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov --- v2: in v1 I missed actual uuid check skip v3: rebase to overlayfs-next, replace uuid with null in file handles, split ovl_fs propagation to function arguments to separate patc

[PATCH v4 1/2] ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh

2020-09-25 Thread Pavel Tikhomirov
This will be used in next patch to be able to change uuid checks and add uuid nullification based on ofs->config.index for a new "uuid=off" mode. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-

[PATCH v4 0/2] ovl introduce "uuid=off"

2020-09-25 Thread Pavel Tikhomirov
heck fallback, add a note to docs. Changes in v4: get rid of double negatives, remove nouuid leftower comment, fix missprint in kernel config name. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomiro

[PATCH v3 2/2] ovl: introduce new "uuid=off" option for inodes index feature

2020-09-24 Thread Pavel Tikhomirov
heck skip v3: rebase to overlayfs-next, replace uuid with null in file handles, split ovl_fs propagation to function arguments to separate patch, add separate bool "uuid=on/off" option, move numfs check up, add doc note. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC:

[PATCH v3 0/2] ovl introduce "uuid=off"

2020-09-24 Thread Pavel Tikhomirov
heck fallback, add a note to docs. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov Pavel Tikhomirov (2): ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh ovl: introduce n

[PATCH v3 1/2] ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh

2020-09-24 Thread Pavel Tikhomirov
This will be used in next patch to be able to change uuid checks and add uuid nullification based on ofs->config.index for a new "uuid=off" mode. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-

Re: [PATCH v2] ovl: introduce new "index=nouuid" option for inodes index feature

2020-09-24 Thread Pavel Tikhomirov
On 9/23/20 7:09 PM, Amir Goldstein wrote: On Wed, Sep 23, 2020 at 6:23 PM Pavel Tikhomirov wrote: This relaxes uuid checks for overlay index feature. It is only possible in case there is only one filesystem for all the work/upper/lower directories and bare file handles from this backing

Re: [PATCH v2] ovl: introduce new "index=nouuid" option for inodes index feature

2020-09-24 Thread Pavel Tikhomirov
On 9/23/20 7:36 PM, Amir Goldstein wrote: @@ -414,7 +415,7 @@ static int ovl_check_origin(struct ovl_fs *ofs, struct dentry *upperdentry, * Return 0 on match, -ESTALE on mismatch, < 0 on error. */ static int ovl_verify_fh(struct dentry *dentry, const char *name, -

[PATCH v2] ovl: introduce new "index=nouuid" option for inodes index feature

2020-09-23 Thread Pavel Tikhomirov
v2: in v1 I missed actual uuid check skip - add it CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov --- fs/overlayfs/Kconfig | 16 +++ fs/overlayfs/export.c| 6 ++-- fs/o

[PATCH] ovl: introduce new "index=nouuid" option for inodes index feature

2020-09-23 Thread Pavel Tikhomirov
ilesystem, overlay is not mounting any more. In Virtuozzo we copy container disks (ploops) when crate the copy of container and we require fs uuid to be uniq for a new container. CC: Amir Goldstein CC: Vivek Goyal CC: Miklos Szeredi CC: linux-unio...@vger.kernel.org CC: linux-kernel@vger.kernel

Re: [PATCH] ovl: introduce new "index=nouuid" option for inodes index feature

2020-09-23 Thread Pavel Tikhomirov
Please drop, I accidentally missed several hunks... On 9/23/20 3:50 PM, Pavel Tikhomirov wrote: dd if=/dev/zero of=loopbackfile.img bs=100M count=10 losetup -fP loopbackfile.img losetup -a #/dev/loop0: [64768]:35 (/loop-test/loopbackfile.img) mkfs.ext4 /root/loopbackfile.img mkdir loop-mp

Re: [PATCH 00/23] proc: Introduce /proc/namespaces/ directory to expose namespaces lineary

2020-08-04 Thread Pavel Tikhomirov
On 8/4/20 8:43 AM, Andrei Vagin wrote: On Thu, Jul 30, 2020 at 06:01:20PM +0300, Kirill Tkhai wrote: On 30.07.2020 17:34, Eric W. Biederman wrote: Kirill Tkhai writes: Currently, there is no a way to list or iterate all or subset of namespaces in the system. Some namespaces are exposed in

Re: [PATCH 00/23] proc: Introduce /proc/namespaces/ directory to expose namespaces lineary

2020-07-31 Thread Pavel Tikhomirov
don't fundamentally break CRIU while trying to make it's job simpler and easier. CC: Pavel Tikhomirov CRIU maintainer, who knows everything about namespaces C/R. Further by not going through the processes it looks like you are bypassing the existing permission checks. Which has

Re: [PATCH 0/2] overlayfs: C/R enhancements

2020-06-05 Thread Pavel Tikhomirov
On 6/5/20 5:35 AM, Amir Goldstein wrote: On Fri, Jun 5, 2020 at 12:34 AM Alexander Mikhalitsyn wrote: Hello, But overlayfs won't accept these "output only" options as input args, which is a problem. Will it be problematic if we simply ignore "lowerdir_mnt_id" and "upperdir_mnt_id" opti

Re: [PATCH] sunrpc: fix crash when cache_head become valid before update

2019-10-08 Thread Pavel Tikhomirov
Add Neil to CC, sorry, had lost it somehow... On 10/1/19 11:03 AM, Pavel Tikhomirov wrote: > I was investigating a crash in our Virtuozzo7 kernel which happened in > in svcauth_unix_set_client. I found out that we access m_client field > in ip_map structure, which was rece

[PATCH] sunrpc: fix crash when cache_head become valid before update

2019-10-01 Thread Pavel Tikhomirov
b/0x520 [sunrpc] [13108726.365530] RSP [13108726.367179] CR2: 0074 Fixes: d58431eacb22 ("sunrpc: don't mark uninitialised items as VALID.") Signed-off-by: Pavel Tikhomirov --- net/sunrpc/cache.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/net/sunrpc/cache.c

mm/swap: possible problem introduced when replacing REQ_NOIDLE with REQ_IDLE

2019-08-09 Thread Pavel Tikhomirov
Hi, all. Then porting patches from mainstream I've found some strange code: > commit a2b809672ee6fcb4d5756ea815725b3dbaea654e > Author: Christoph Hellwig > Date: Tue Nov 1 07:40:09 2016 -0600 > > block: replace REQ_NOIDLE with REQ_IDLE > > Noidle should be the default for writes

[PATCH] ext4: remove unnecessary gotos in ext4_xattr_set_entry

2019-05-31 Thread Pavel Tikhomirov
In the "out" label we only iput old/new_ea_inode-s, in all these places these variables are always NULL so there is no point in goto to "out". Signed-off-by: Pavel Tikhomirov --- fs/ext4/xattr.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/

Re: [PATCH] tracing: Fix event filters and triggers to handle negative numbers

2019-02-28 Thread Pavel Tikhomirov
ping, looks like the patch was lost On 8/24/18 3:48 AM, Steven Rostedt wrote: > On Thu, 23 Aug 2018 13:25:34 +0300 > Pavel Tikhomirov wrote: > >> Then tracing syscall exit event it is extremely useful to filter exit >> codes equal to some negative value, to react only to re

Re: [PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-13 Thread Pavel Tikhomirov
On 12/13/2018 10:55 PM, Michael S. Tsirkin wrote: > On Thu, Dec 13, 2018 at 05:53:50PM +0300, Pavel Tikhomirov wrote: >> We've failed to copy and process vhost_iotlb_msg so let userspace at >> least know about it. For instance before these patch the code below runs >> wi

[PATCH] vhost: return EINVAL if iovecs size does not match the message size

2018-12-13 Thread Pavel Tikhomirov
1) { perror("open"); return 1; } iov.iov_base = &msg; iov.iov_len = sizeof(msg)-4; if (writev(fd, &iov,1) == -1) { perror("writev"); return 1; } return 0; } Signed-off-by: Pavel Tikhomirov --- drivers/vhost/vhost.c | 8 ++-- 1 file cha

[PATCH] nfs: fix comment to nfs_generic_pg_test which does the opposite

2018-11-14 Thread Pavel Tikhomirov
Please see comment to filelayout_pg_test for reference. To: Trond Myklebust Cc: Anna Schumaker Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Pavel Tikhomirov --- fs/nfs/pagelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs

[PATCH v2] mm: cleancache: fix corruption on missed inode invalidation

2018-11-12 Thread Pavel Tikhomirov
entries in page cache") To: Andrew Morton Cc: Johannes Weiner Cc: Mel Gorman Cc: Jan Kara Cc: Matthew Wilcox Cc: Andi Kleen Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Vasily Averin Reviewed-by: Andrey Ryabinin Reviewed-by: Jan Kara Signed-off-by: Pavel Tikhomir

[PATCH] mm: cleancache: fix corruption on missed inode invalidation

2018-11-12 Thread Pavel Tikhomirov
ge cache") To: Andrew Morton Cc: Johannes Weiner Cc: Mel Gorman Cc: Jan Kara Cc: Matthew Wilcox Cc: Andi Kleen Cc: linux...@kvack.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Vasily Averin Reviewed-by: Andrey Ryabinin Signed-off-by: Pavel Tikhomirov --- mm/truncate.c | 4 ++-- 1 file c

[PATCH] tracing: Fix event filters and triggers to handle negative numbers

2018-08-23 Thread Pavel Tikhomirov
80765597bc58 ("tracing: Rewrite filter logic to be simpler and faster") Signed-off-by: Pavel Tikhomirov --- kernel/trace/trace_events_filter.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filt

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-11-21 Thread Pavel Tikhomirov
17 2:09 AM, Pavel Tikhomirov wrote: My patch should also fix your issue too, please see explanation in reply to your patch. Do your testing show that it doesn't? Thanks, Pavel. On 11/21/2017 09:10 AM, Stuart Hayes wrote: Pavel, It turns out that the error handler on our systems was not g

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-11-21 Thread Pavel Tikhomirov
JFYI these patch is in Virtuozzo7 kernel from September, and we have no issues found with it until now by out testing, and initial problem does not reproduce for 2.5 months.

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-11-21 Thread Pavel Tikhomirov
10 minutes or less successfully ran for many days. Thanks, Stuart On 11/9/2017 8:54 AM, Pavel Tikhomirov wrote: Are there any issues with this patch (https://patchwork.kernel.org/patch/9938919/) that Pavel Tikhomirov submitted back in September?  I am willing to help if there's anything I

Re: [PATCH] scsi_error: ensure EH wakes up on error to prevent host getting stuck

2017-11-21 Thread Pavel Tikhomirov
On 11/20/2017 10:11 PM, Stuart Hayes wrote: When a command is added to the host's error handler command queue, there is a chance that the error handler will not be woken up. This can happen when one CPU is running scsi_eh_scmd_add() at the same time as another CPU is running scsi_device_unbus

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-11-09 Thread Pavel Tikhomirov
> Are there any issues with this patch (https://patchwork.kernel.org/patch/9938919/) that Pavel Tikhomirov submitted back in September? I am willing to help if there's anything I can do to help get it accepted. Hi, Stuart, I asked James Bottomley about the patch status offlist and

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-10-20 Thread Pavel Tikhomirov
ping On 09/05/2017 03:54 PM, Pavel Tikhomirov wrote: We have a problem on several our nodes with scsi EH. Imagine such an order of execution of two threads: CPU1 scsi_eh_scmd_add CPU2 scsi_host_queue_ready /* shost->host_busy == 1 initialy */

Re: [PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-10-04 Thread Pavel Tikhomirov
Hi. Please tell if there is something I can do to help the patch get processed? It is on the list without reply for almost a month. On 09/05/2017 03:54 PM, Pavel Tikhomirov wrote: We have a problem on several our nodes with scsi EH. Imagine such an order of execution of two threads: CPU1

[PATCH] scsi/eh: fix hang adding ehandler wakeups after decrementing host_busy

2017-09-05 Thread Pavel Tikhomirov
ck/unlock, so at the time of busy==failed we will trigger wakeup in at least one thread. (Thats why putting recovery and failed checks under lock) Signed-off-by: Pavel Tikhomirov --- drivers/scsi/scsi_lib.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --

[PATCH v4 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Pavel Tikhomirov
csr_descendant leftover, change current to real_parent in has_child_subreaper inheritance v4: small commit message fix Signed-off-by: Pavel Tikhomirov --- kernel/fork.c | 10 +++--- kernel/sys.c | 22 ++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/kerne

[PATCH 1/2] introduce the walk_process_tree() helper

2017-01-30 Thread Pavel Tikhomirov
From: Oleg Nesterov Add the new helper to walk the process tree, the next patch adds a user. Note that it visits the group leaders only, proc_visitor can do for_each_thread itself or we can trivially extend walk_process_tree() to do this. Signed-off-by: Oleg Nesterov Signed-off-by: Pavel

[PATCH v3 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Pavel Tikhomirov
r inheritance v3: remove csr_descendant leftover, change current to real_parent in has_child_subreaper inheritance Signed-off-by: Pavel Tikhomirov --- kernel/fork.c | 10 +++--- kernel/sys.c | 22 ++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/kernel/fork.c b/ker

[PATCH 1/2] introduce the walk_process_tree() helper

2017-01-30 Thread Pavel Tikhomirov
From: Oleg Nesterov Add the new helper to walk the process tree, the next patch adds a user. Note that it visits the group leaders only, proc_visitor can do for_each_thread itself or we can trivially extend walk_process_tree() to do this. Signed-off-by: Oleg Nesterov Signed-off-by: Pavel

[PATCH v4 0/2] prctl: make PR_SET_CHILD_SUBREAPER deterministic

2017-01-30 Thread Pavel Tikhomirov
Oleg Nesterov (1): introduce the walk_process_tree() helper Pavel Tikhomirov (1): prctl: propagate has_child_subreaper flag to every descendant include/linux/sched.h | 3 +++ kernel/fork.c | 42 +++--- kernel/sys.c | 22

[PATCH v3 0/2] prctl: make PR_SET_CHILD_SUBREAPER deterministic

2017-01-30 Thread Pavel Tikhomirov
Oleg Nesterov (1): introduce the walk_process_tree() helper Pavel Tikhomirov (1): prctl: propagate has_child_subreaper flag to every descendant include/linux/sched.h | 3 +++ kernel/fork.c | 42 +++--- kernel/sys.c | 22

Re: [PATCH v3 0/2] prctl: make PR_SET_CHILD_SUBREAPER deterministic

2017-01-30 Thread Pavel Tikhomirov
please drop it, errors in commit message On 01/30/2017 05:48 PM, Pavel Tikhomirov wrote: Oleg Nesterov (1): introduce the walk_process_tree() helper Pavel Tikhomirov (1): prctl: propagate has_child_subreaper flag to every descendant include/linux/sched.h | 3 +++ kernel/fork.c

Re: [PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-30 Thread Pavel Tikhomirov
On 01/30/2017 03:51 PM, Oleg Nesterov wrote: On 01/27, Pavel Tikhomirov wrote: --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1725,6 +1725,8 @@ struct task_struct { struct signal_struct *signal; struct sighand_struct *sighand; + struct list_head

Re: [PATCH] prctl.2: Document new PR_SET_CHILD_SUBREAPER semantics

2017-01-27 Thread Pavel Tikhomirov
On 01/28/2017 01:47 AM, Michael Kerrisk (man-pages) wrote: Hello Pavel, On 27 January 2017 at 23:11, Pavel Tikhomirov wrote: old semantics was non deterministic and worked differently depending on the external factors, but nothing changes if process first sets itself subreaper and only after

[PATCH] prctl.2: Document new PR_SET_CHILD_SUBREAPER semantics

2017-01-27 Thread Pavel Tikhomirov
old semantics was non deterministic and worked differently depending on the external factors, but nothing changes if process first sets itself subreaper and only after forks Signed-off-by: Pavel Tikhomirov --- man2/prctl.2 | 24 +--- 1 file changed, 17 insertions(+), 7

[PATCH v2 2/2] prctl: propagate has_child_subreaper flag to every descendant

2017-01-27 Thread Pavel Tikhomirov
, it's subtree is in different pidns from us(original child-subreaper) and processes from other pidns will never reparent to us. So we can skip their(a,b) subtree from walk. v2: switch to walk_process_tree() general helper, move has_child_subreaper inheritance Signed-off-by: Pavel Tikho

[PATCH 1/2] introduce the walk_process_tree() helper

2017-01-27 Thread Pavel Tikhomirov
From: Oleg Nesterov Add the new helper to walk the process tree, the next patch adds a user. Note that it visits the group leaders only, proc_visitor can do for_each_thread itself or we can trivially extend walk_process_tree() to do this. Signed-off-by: Oleg Nesterov Reviewed-by: Pavel

[PATCH v2 0/2] prctl: make PR_SET_CHILD_SUBREAPER deterministic

2017-01-27 Thread Pavel Tikhomirov
will send documentation change proposal in reply to these letter Oleg Nesterov (1): introduce the walk_process_tree() helper Pavel Tikhomirov (1): prctl: propagate has_child_subreaper flag to every descendant include/linux/sched.h | 5 + kernel/fork.c | 42

Re: [PATCH] introduce the walk_process_tree() helper

2017-01-24 Thread Pavel Tikhomirov
Will include it in patch-set with documentation fix. Thanks Oleg! Reviewed-by: Pavel Tikhomirov On 01/23/2017 02:57 PM, Oleg Nesterov wrote: Add the new helper to walk the process tree, the next patch adds a user. Note that it visits the group leaders only, proc_visitor can do

Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant

2017-01-23 Thread Pavel Tikhomirov
Add to cc Lennart Poettering On 01/23/2017 02:55 PM, Oleg Nesterov wrote: On 01/22, Pavel Tikhomirov wrote: Hmm. could you explain how this change helps CRIU? I mean, why restorer can't do prctl(CHILD_SUBREAPER) before the first fork? Imagine we have these tree in pidn

Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant

2017-01-22 Thread Pavel Tikhomirov
Sorry I had some problem with mail-agent, resend to be on the safe side. On 01/20/2017 09:14 PM, Oleg Nesterov wrote: On 01/19, Pavel Tikhomirov wrote: Having these two differently behaving groups can lead to confusion. Also it is a problem for CRIU, as when we restore process tree we need to

Re: [PATCH] prctl: propagate has_child_subreaper flag to every descendant

2017-01-22 Thread Pavel Tikhomirov
On 01/20/2017 09:14 PM, Oleg Nesterov wrote: On 01/19, Pavel Tikhomirov wrote: Having these two differently behaving groups can lead to confusion. Also it is a problem for CRIU, as when we restore process tree we need to somehow determine which descendants belong to which group and much

[PATCH] prctl: propagate has_child_subreaper flag to every descendant

2017-01-19 Thread Pavel Tikhomirov
ady has has_child_subreaper flag all his subtree has it too already. b) When some descendant is child_reaper, it's subtree is in different pidns from us(original child-subreaper) and processes from other pidns will never reparent to us. So we can skip their(a,b) subtree from walk. Signed-off-b

[PATCH v2] ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int

2017-01-08 Thread Pavel Tikhomirov
umentation we have "tcp_notsent_lowat - UNSIGNED INTEGER" v2: simplify to just proc_douintvec Signed-off-by: Pavel Tikhomirov --- net/ipv4/sysctl_net_ipv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 80bc36b..5

[PATCH] ipv4: make tcp_notsent_lowat sysctl knob behave as true unsigned int

2016-12-29 Thread Pavel Tikhomirov
umentation we have "tcp_notsent_lowat - UNSIGNED INTEGER" Signed-off-by: Pavel Tikhomirov --- net/ipv4/sysctl_net_ipv4.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 80bc36b..5361373 100644 --- a/net/ipv4

[PATCH v2] netfilter: nf_log: fix error on write NONE to logger choice sysctl

2016-07-01 Thread Pavel Tikhomirov
cat /proc/sys/net/netfilter/nf_log/0 nfnetlink_log echo NONE > /proc/sys/net/netfilter/nf_log/0 cat /proc/sys/net/netfilter/nf_log/0 NONE v2: add missed error check for proc_dostring Signed-off-by: Pavel Tikhomirov --- net/netfilter/nf_log.c | 11 ++- 1 file changed, 6 inser

[PATCH] netfilter: nf_log: fix error on write NONE to logger choice sysctl

2016-07-01 Thread Pavel Tikhomirov
cat /proc/sys/net/netfilter/nf_log/0 nfnetlink_log echo NONE > /proc/sys/net/netfilter/nf_log/0 cat /proc/sys/net/netfilter/nf_log/0 NONE Signed-off-by: Pavel Tikhomirov --- net/netfilter/nf_log.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/net/netfilt

Re: BUG: KASAN: slab-out-of-bounds in ses_enclosure_data_process+0x900/0xe50

2015-12-03 Thread Pavel Tikhomirov
I have very similar problem with SAS2X28, please take a look on a bug report here https://bugzilla.kernel.org/show_bug.cgi?id=108771 Thanks, Pavel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

[tip:timers/urgent] posix-timers: Show clock ID in proc file

2013-05-28 Thread tip-bot for Pavel Tikhomirov
Commit-ID: 15ef0298deb3929eb6ad6d2334fd2059fd53807c Gitweb: http://git.kernel.org/tip/15ef0298deb3929eb6ad6d2334fd2059fd53807c Author: Pavel Tikhomirov AuthorDate: Fri, 17 May 2013 02:12:03 +0400 Committer: Thomas Gleixner CommitDate: Tue, 28 May 2013 11:41:14 +0200 posix-timers: Show

[PATCH 1/1] posix-timers: Show clock ID in proc file

2013-05-17 Thread Pavel Tikhomirov
Expand information about posix-timers in /proc//timers by adding info about clock, with which the timer was created. I.e. in the forth line of timer info after "notify:" line go "ClockID: ". Signed-off-by: Pavel Tikhomirov --- fs/proc/base.c |1 + 1 file changed, 1 inse

[PATCH 0/1] posix timers: Expand exitsting info in proc file

2013-05-17 Thread Pavel Tikhomirov
Hi. I'm working on the checkpoint-restore project (http://criu.org), on realisation of posix-timers. To compleatly checkpoint and restore these timers we need to know which clock they are using. So I d'like to add this information to existing syscall which shows posix-timers in