[Devel] [PATCH RH9] vtty: update termios settings and fix hung

2021-10-12 Thread Cyrill Gorcunov
From: Cyrill Gorunov Here are some things left to be updated while moving to a new kernel: - setup default limit for ports up to 8192 bytes just like it done for regular unix PTY driver - report exactly how many bytes left available in the peer buffer (actually I don't remember where thi

[Devel] [PATCH RH9 v2 0/5] part23 part

2021-10-12 Thread Kirill Tkhai
--- Alexander Mikhalitsyn (1): shm: skip shm_destroy if task IPC namespace was changed Pavel Tikhomirov (3): ve: add get_curr_ve helper ve: get_curr_ve: first try getting ve with rcu lock cgroup/net_prio: virtualize ifpriomap per-ve Vladimir Davydov (1): ve/fs/inoti

[Devel] [PATCH RH9 1/5] shm: skip shm_destroy if task IPC namespace was changed

2021-10-12 Thread Kirill Tkhai
From: Alexander Mikhalitsyn Fixes: ab602f79915 ("shm: make exit_shm work proportional to task activity") (ms commit) https://jira.sw.ru/browse/PSBM-131142 Signed-off-by: Alexander Mikhalitsyn Signed-off-by: Kirill Tkhai --- ipc/shm.c | 10 +- 1 file changed, 9 insertions(+), 1 dele

[Devel] [PATCH RH9 2/5] ve: add get_curr_ve helper

2021-10-12 Thread Kirill Tkhai
From: Pavel Tikhomirov This helper is a safe alternative to get_exec_env(), this helper actually gets reference on current ve so if from other thread current would be moved from this ve, at least this ve would not be freed under us. https://jira.sw.ru/browse/PSBM-123766 Signed-off-by: Pavel Tik

[Devel] [PATCH RH9 5/5] ve/fs/inotify: do not impose limit on the number of instances by default

2021-10-12 Thread Kirill Tkhai
From: Vladimir Davydov In Vz7 we haven't switched to user ns yet. As a result, all containers use the same user_struct for the same user id. This leads to hitting fs.inotify.max_user_instances sysctl limit quickly (it equals 128 by default) and failing to start a container. This patch sets the de

[Devel] [PATCH RH9 3/5] ve: get_curr_ve: first try getting ve with rcu lock

2021-10-12 Thread Kirill Tkhai
From: Pavel Tikhomirov By holding rcu lock we can have valid ve pointer. Next using css_tryget we can get reference on ve cgroup if it is not yet started to destroy. In case cgroup is destroying retry with cgroup_mutex. https://jira.sw.ru/browse/PSBM-123766 Signed-off-by: Pavel Tikhomirov ===

[Devel] [PATCH RH9 4/5] cgroup/net_prio: virtualize ifpriomap per-ve

2021-10-12 Thread Kirill Tkhai
From: Pavel Tikhomirov Ifpriomap is a map of net_prio cgroup id to device prio. Each process is in some netprio cgroup and all sockets of this process have prio cgroup id of this cgroup. When packet from such socket goes through network stack we choose priority for packet on each device we go thr

[Devel] [PATCH RHEL COMMIT] vtty: update termios settings and fix hung

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 1f8fc1147bf50c9264e75bec27086fa755a5f81c Author: Cyrill Gorunov Date: Tue Oct 12 14:01:11 2021 +0300 vtty: update termios settings and fix hung

[Devel] [PATCH RHEL COMMIT] ve/memcg: Virtualize /proc/vmstat view inside CT

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 4bb06a1a65c1417f64af16a8f0b4451c636ac97f Author: Pavel Tikhomirov Date: Tue Oct 12 16:18:20 2021 +0300 ve/memcg: Virtualize /proc/vmstat view i

[Devel] [PATCH RHEL COMMIT] ve/bridge: handle netlink messages AF_BRIDGE / RTM_[GSD]ETLINK sent from inside a Container

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 42c87f7e88975f1ff3ed8c8efe30458a11d16a15 Author: Vasily Averin Date: Tue Oct 12 16:18:25 2021 +0300 ve/bridge: handle netlink messages AF_BRIDG

[Devel] [PATCH RHEL COMMIT] ve: prohibit opening proc/self/exe from VE for VD_VE_ENTER_TASK

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 2efe76c734eb009a64e57a4b677331758a7f0504 Author: Pavel Tikhomirov Date: Tue Oct 12 16:18:21 2021 +0300 ve: prohibit opening proc/self/exe from

[Devel] [PATCH RHEL COMMIT] shmem/ve: virtualize tmpfs default size

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 8638e9646ad6339ce35d3f936446cecf8b71447b Author: Pavel Tikhomirov Date: Tue Oct 12 16:18:23 2021 +0300 shmem/ve: virtualize tmpfs default size

[Devel] [PATCH RHEL COMMIT] openvswitch: allow to create ovs bridges inside Containers

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 6b4bc35aae982be4b4842143ffc85e1ebbf6cfe8 Author: Vasily Averin Date: Tue Oct 12 16:18:25 2021 +0300 openvswitch: allow to create ovs bridges in

[Devel] [PATCH RHEL COMMIT] net: openvswitch: add capability to specify ifindex of new links

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit a88f8a17773816e158d026af6ec499a97b698b83 Author: Andrey Zhadchenko Date: Tue Oct 12 16:18:24 2021 +0300 net: openvswitch: add capability to spe

[Devel] [PATCH RHEL COMMIT] ve/proc/block: show /proc/diskstats inside a Container

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 9d7017446196634e8dffdf96135982e986a89ff9 Author: Vasily Averin Date: Tue Oct 12 16:18:27 2021 +0300 ve/proc/block: show /proc/diskstats inside

[Devel] [PATCH RHEL COMMIT] scsi: ratelimit messages about rejected I/O

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 1948887b6dce77036d9361b7b0d42f32d843e7b9 Author: Konstantin Khorenko Date: Tue Oct 12 16:18:26 2021 +0300 scsi: ratelimit messages about reject

[Devel] [PATCH RHEL COMMIT] ms/sock: allow reading and changing sk_userlocks with setsockopt

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit a9640b425220cc22a25ea88e5c16e26f53894f89 Author: Pavel Tikhomirov Date: Tue Oct 12 16:18:23 2021 +0300 ms/sock: allow reading and changing sk_u

[Devel] [PATCH RHEL COMMIT] ve/sysfs: relax sanity check for ns equality in kernfs_find_ns()

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit f6bc3129d4f65d6dcdeb9f68cb0975fb3b2aeacc Author: Konstantin Khorenko Date: Tue Oct 12 16:18:22 2021 +0300 ve/sysfs: relax sanity check for ns e

[Devel] [PATCH RHEL COMMIT] ve/devtmpfs: lightweight virtualization

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 94b8f0262a0c73bd8eadf053484fed2774aea38a Author: Stanislav Kinsburskiy Date: Mon Oct 11 12:21:54 2021 +0300 ve/devtmpfs: lightweight virtualiza

[Devel] [PATCH RHEL COMMIT] shm: skip shm_destroy if task IPC namespace was changed

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit d908b4d59d81865bbed8a90a6b857d0ccb0ae7b6 Author: Alexander Mikhalitsyn Date: Tue Oct 12 16:45:08 2021 +0300 shm: skip shm_destroy if task IPC n

[Devel] [PATCH RHEL COMMIT] cgroup/net_prio: virtualize ifpriomap per-ve

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 1c440266bd826dba9dc46d2cee486aed16a5233a Author: Pavel Tikhomirov Date: Tue Oct 12 16:45:10 2021 +0300 cgroup/net_prio: virtualize ifpriomap pe

[Devel] [PATCH RHEL COMMIT] ve: get_curr_ve: first try getting ve with rcu lock

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit e0d03bf51b10e2c03e8dacce8ca146858138b7bc Author: Pavel Tikhomirov Date: Tue Oct 12 16:45:10 2021 +0300 ve: get_curr_ve: first try getting ve wi

[Devel] [PATCH RHEL COMMIT] ve/fs/inotify: do not impose limit on the number of instances by default

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 4f91c73f15df198ac74308675c7817bb94c26125 Author: Vladimir Davydov Date: Tue Oct 12 16:45:11 2021 +0300 ve/fs/inotify: do not impose limit on th

[Devel] [PATCH RHEL COMMIT] ve: add get_curr_ve helper

2021-10-12 Thread Konstantin Khorenko
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git after ark-5.14 --> commit 55fee44a371f45eeb118f2ad66ecfe518c0fe374 Author: Pavel Tikhomirov Date: Tue Oct 12 16:45:09 2021 +0300 ve: add get_curr_ve helper This

[Devel] [PATCH RH8] ploop: Introduce option "off=" to cut beginning of device

2021-10-12 Thread Kirill Tkhai
This is like the functionality of dm-linear. https://jira.sw.ru/browse/PSBM-132445 Signed-off-by: Kirill Tkhai --- drivers/md/dm-ploop-map.c|9 +++-- drivers/md/dm-ploop-target.c | 28 drivers/md/dm-ploop.h|1 + 3 files changed, 28 insertio

[Devel] [PATCH RH9] ploop: Introduce option "off=" to cut beginning of device

2021-10-12 Thread Kirill Tkhai
This is like the functionality of dm-linear. https://jira.sw.ru/browse/PSBM-132445 Signed-off-by: Kirill Tkhai --- drivers/md/dm-ploop-map.c|9 +++-- drivers/md/dm-ploop-target.c | 28 drivers/md/dm-ploop.h|1 + 3 files changed, 28 insertio

[Devel] [PATCH RH9 6/6] ve/cgroup: temporary ignore misc cgroup to let vzctl start container

2021-10-12 Thread Pavel Tikhomirov
We can revert it in case vzctl would create separate misc cgroup for container. https://jira.sw.ru/browse/PSBM-134002 Signed-off-by: Pavel Tikhomirov --- kernel/cgroup/cgroup.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index c7435500a

[Devel] [PATCH RH9 3/6] ve/cgroup: Add ve_owner field to cgroup

2021-10-12 Thread Pavel Tikhomirov
From: Valeriy Vdovin Each cgroup representing a container root of cgroup subsystem hierarchy will have this field set to a valid ve_struct, that owns this root. This way each cgroup in a system will be able to know it's owning VE. Non root cgroups will have this field set to NULL, this is an opt

[Devel] [PATCH RH9 4/6] cgroup: split cgroup_get_ve_root1 into css and cgroup version

2021-10-12 Thread Pavel Tikhomirov
In vz8 we had css_local_root, cgroup_get_local_root and cgroup_get_ve_root1 all doing the same thing, let's reuse code. There is no more implicit ve0 fallback here, caller shoudl handle NULL retcode now. Rename cgroup_get_ve_root1 to cgroup_ve_root1. https://jira.sw.ru/browse/PSBM-134002 Signed-

[Devel] [PATCH RH9 5/6] ve: use rcu_dereference for ve_ns in ve_get_init_css

2021-10-12 Thread Pavel Tikhomirov
From: Kirill Tkhai vz9 changes: drop css_local_root hunk as excess, we already have root ve cgroup from ve cgroup ns css set it's not connected with init task anymore after we've switched to cgroup namespaces; cleanup comments as unrelated and rename patch. https://jira.sw.ru/browse/PSBM-134002

[Devel] [PATCH RH9 1/6] cgroup: remove excess rcu_read_lock in cgroup marking

2021-10-12 Thread Pavel Tikhomirov
We do not need rcu_read_lock here because we are already protected by ve->op_sem from ve->ve_ns modification, so let's simplify code. Also remove excess warnings. https://jira.sw.ru/browse/PSBM-134002 Fixes: 907c1e6cd67f ("cgroup: Mark cgroup CGRP_VE_ROOT") Signed-off-by: Pavel Tikhomirov --- k

[Devel] [PATCH RH9 2/6] ve/cgroup: Skip non-virtualized roots in cgroup_{, un}mark_ve_roots()

2021-10-12 Thread Pavel Tikhomirov
From: Valeriy Vdovin During container start there might be a situation when not all cgroup hierarchies get virtualized by container manager (like vzctl). By virtualizing a cgroup hierarchy I mean creation of sub-directory within a particular mounted cgroup. When container starts it looks in css s

[Devel] [PATCH RH9 0/6] part 18: everything except release agent

2021-10-12 Thread Pavel Tikhomirov
We can possibly drop release agent virtualization as: - it appears to be only needed for centos 7 containers @khorenko - code needs a great rework @ptikhomirov - new systemd should be expected to work well in cgroupns which has no release agent in mainstream So let's port everything else related t