Re: [Devel] dm: ploop: arithemtic overflow in ploop

2024-05-17 Thread Evgenii Shatokhin
Hi, On 10.05.2024 16:15, Alexey Kuznetsov wrote: May be we do. I do such mistakes all the time, as I am paranoid about saving memory, using minimal possible type. I checked code since this morning, this is the only place, which I found. And it fixed this urgent problem. Full audit can be done

[Devel] [kpatch-build VZ7] kmod/patch: Allow the patch to get settings from sysfs and to show data there

2022-04-17 Thread Evgenii Shatokhin
/patch/kpatch-macros.h for details. For now, this enhancement is for the kpatch.ko-based patches only. Support for livepatch/klp-based patches should be implemented later. Signed-off-by: Evgenii Shatokhin --- kmod/patch/kpatch-macros.h | 56 ++ kmod/patch/kpatch

[Devel] [PATCH RH7 v2] mm: Do not drop __GFP_NOFAIL in __add_to_page_cache_locked

2021-09-26 Thread Evgenii Shatokhin
in v2: - do not issue warning if __GFP_NOFAIL has been dropped: it triggers too often. Suggested-by: Vasily Averin Signed-off-by: Evgenii Shatokhin --- mm/filemap.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mm/filemap.c b/mm/filemap.c index 2d35844b3123

Re: [Devel] [PATCH v2] ub: correct _ub_get_css() retvalue for dying/stopped containers

2021-09-14 Thread Evgenii Shatokhin
On 14.09.2021 00:52, Vasily Averin wrote: Currently __ub_get_css(ub) for dying or stopped container returns ub0-related css as failback. As result read from /proc/bc/<>/ files can show ve0-related info. With this patch, __ub_get_css() will return NULL in such cases, and everyone who called of

Re: [Devel] [PATCH] ub: correct _ub_get_css() retvalue for dying/stopped containers

2021-09-13 Thread Evgenii Shatokhin
On 12.09.2021 18:03, Vasily Averin wrote: Currently __ub_get_css(ub) for dying or stopped container returns ub0-related css as failback. As result read from /proc/bc/<>/ files can show ve0-related info. With this patch, __ub_get_css() will return NULL in such cases, and everyone who called of

[Devel] [PATCH RH8] memcg: Show correct values of slab_[un]reclaimable in memory.stat files

2021-09-06 Thread Evgenii Shatokhin
files. https://jira.sw.ru/browse/PSBM-132728 Fixes: cf89dfa06ebe ("mm: memcontrol: add stats for reclaimable and unreclaimable stats") Signed-off-by: Evgenii Shatokhin --- mm/memcontrol.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mm/memcont

[Devel] [PATCH RH8] kvm: Remove unused variable from mmu_shrink_scan()

2021-08-02 Thread Evgenii Shatokhin
"LIST_HEAD(invalid_list)" is no longer used in mmu_shrink_scan() since RedHat has backported mainline commit ebdb292dac79 ("KVM: x86/mmu: Batch zap MMU pages when shrinking the slab"). Let us remove it. Found while working on https://jira.sw.ru/browse/PSBM-131982. Si

[Devel] [PATCH RH8] oom: Scan only the relevant memcg when in berserker mode

2021-07-28 Thread Evgenii Shatokhin
-by: Evgenii Shatokhin --- include/linux/memcontrol.h | 7 -- mm/memcontrol.c| 26 -- mm/oom_kill.c | 164 + 3 files changed, 95 insertions(+), 102 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index

[Devel] [PATCH RH8] oom: Fix task selection in oom_evaluate_task()

2021-07-28 Thread Evgenii Shatokhin
k(): a new task was selected even if was not worse than the previously chosen one. This patch fixes it. https://jira.sw.ru/browse/PSBM-132385 Fixes: afac60108d3c "memcg: add oom_guarantee" Signed-off-by: Evgenii Shatokhin --- mm/oom_kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[Devel] [PATCH RH8 2/2] oom: Initialize oom_rage_lock spinlock

2021-07-28 Thread Evgenii Shatokhin
f9b22 "oom: resurrect berserker mode" Signed-off-by: Evgenii Shatokhin --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4638d9fe1ebf..f9a1c3c4f85e 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5949,6 +5949,7 @@ stat

[Devel] [PATCH RH8 1/2] oom: Restore vm.oom_relaxation sysctl

2021-07-28 Thread Evgenii Shatokhin
sec) might be too small, for example, for slow or highly loaded machines. Done in the scope of https://jira.sw.ru/browse/PSBM-131983. Fixes: 8132f6df9b22 "oom: resurrect berserker mode" Signed-off-by: Evgenii Shatokhin --- include/linux/oom.h | 1 + kernel/sysctl.c | 7 ++

[Devel] [PATCH RH8] drivers/base: Adjust the total amount of RAM shown for a NUMA node

2021-07-27 Thread Evgenii Shatokhin
from RHEL 8.4, so the patch should be dropped after rebase on top of that kernel. Signed-off-by: Evgenii Shatokhin --- drivers/base/node.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index d75862546c4e..0c69b32d3

[Devel] [PATCH RH8] mm/page_alloc: Adjust the number of managed pages for a zone if it is wrong

2021-07-12 Thread Evgenii Shatokhin
nel from RHEL 8.4, so the patch should be dropped after rebase on top of that kernel. Signed-off-by: Evgenii Shatokhin --- mm/page_alloc.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fca875aa8ab3..874de3912

[Devel] [PATCH RH8] sched: show CPU stats for a cgroup in cpu.proc.stat file

2021-07-08 Thread Evgenii Shatokhin
ss_get/put are probably not needed here (the file that belongs to the cgroup is open at the moment, so the cgroup cannot go away, neither can "cpu" subsystem). However, they are here to keep code analysis tools happier and - for a theoretical scenario where "cpuacct" subsystem is som

[Devel] [PATCH RH7] mm/memcg: do not save call stacks of css_get/put by default

2021-07-02 Thread Evgenii Shatokhin
=", which accepts 0/1/on/off/... (see the description of kstrtobool()) and allows the user to enable or disable this debugging feature at boot time. This way, even if we decide to flip the defaults again in the future, the boot option would still be usable. https://jira.sw.ru/browse/PSBM-131085

Re: [Devel] [PATCH RH7] fs/ceph: access beyound end of iovec array in dio_get_pagev_size()

2021-06-22 Thread Evgenii Shatokhin
%zu\n", size); return size; The patch looks good to me. Even with the fix, ceph does not seem stable enough in VZ7 to be production-ready but that is a different story. Reviewed-by: Evgenii Shatokhin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH RH8 2/2] tty/vt: check allocation size in con_set_unimap()

2021-06-15 Thread Evgenii Shatokhin
5de30b286e7166164f9e45de991bde26f5db8298 in the mainline kernel. It is a follow-up for ms commit fa2b360f261e "tty/vt: avoid high order pages allocation on GIO_UNIMAP ioctl" and is nice to have in VZ8 too. Added to VZ8 in the scope of https://jira.sw.ru/browse/PSBM-127844. Signed-off-b

[Devel] [PATCH RH8 1/2] tty/vt: avoid high order pages allocation on GIO_UNIMAP ioctl

2021-06-15 Thread Evgenii Shatokhin
ame for con_set_unimap(). Signed-off-by: Konstantin Khorenko Signed-off-by: Greg Kroah-Hartman Commit fa2b360f261e31f2a54f997095713f91bac0e503 in the mainline kernel. https://jira.sw.ru/browse/PSBM-93812 Added to VZ8 in the scope of https://jira.sw.ru/browse/PSBM-127844. Signed-off-by: Evgenii Shatok

[Devel] [PATCH RH8] proc/vestat: show correct maxlat in /proc/vz/vestat

2021-06-11 Thread Evgenii Shatokhin
82 ("/proc//vz_latency: Show maximal allocation latency in the last second.") in VZ8. Added to VZ8 in the scope of https://jira.sw.ru/browse/PSBM-127844. Signed-off-by: Evgenii Shatokhin --- kernel/ve/vecalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/ve/v

[Devel] [PATCH RH8 2/2] net/skbuff: WARN if kmalloc_reserve() fails to allocate memory.

2021-06-09 Thread Evgenii Shatokhin
y Ryabinin Added to VZ8 in the scope of https://jira.sw.ru/browse/PSBM-127844. Signed-off-by: Evgenii Shatokhin --- net/core/skbuff.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index a3bc8b2b1689..f9e50eb3bf69 100644 --- a/net/cor

[Devel] [PATCH RH8 1/2] net/skbuff: Don't waste memory reserves

2021-06-09 Thread Evgenii Shatokhin
C only when such socket is present in the system. https://pmc.acronis.com/browse/VSTOR-21390 Signed-off-by: Andrey Ryabinin Ported to VZ8 in scope of https://jira.sw.ru/browse/PSBM-127844. Signed-off-by: Evgenii Shatokhin --- include/linux/skbuff.h | 19 ++- include/net/sock

Re: [Devel] [PATCH 5/7] target: use to_stat_tgt_port() to handle files in scsi_tgt_port/

2021-06-02 Thread Evgenii Shatokhin
On 02.06.2021 18:59, Alexander Mikhalitsyn wrote: From: Andrei Vagin Currently we use to_stat_port(), but it has to be used only for files in scsi_port/. https://pmc.acronis.com/browse/VSTOR-13021 The bug and the patch are for the in-kernel iSCSI target interface, which is no longer used

[Devel] [PATCH RH8] ve/sunrpc: enable rpc_pipefs mounts inside non-init user namespaces

2021-05-20 Thread Evgenii Shatokhin
: it is better to allow mounts only from the init userns of a container rather than from just any userns. Done in the scope of https://jira.sw.ru/browse/PSBM-127830. Signed-off-by: Evgenii Shatokhin --- net/sunrpc/rpc_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

[Devel] [PATCH RH8] xfs: allow to mount XFS in non-init userns

2021-05-20 Thread Evgenii Shatokhin
d of FS_USERNS_MOUNT: it is better to allow mounts only from the init userns of a container rather than from just any userns. Done in the scope of https://jira.sw.ru/browse/PSBM-127830. Signed-off-by: Evgenii Shatokhin --- fs/xfs/xfs_super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Devel] [PATCH RH8] sched: Uninline css_tg()

2021-05-05 Thread Evgenii Shatokhin
avenrun_tg(struct task_group *tg, unsigned long *loads, unsigned long offset, int shift); . Looks good to me. Thanks, Kirill! IMO, marking a non-local function inline is almost always a bad practice. Let the compiler decide if and when to inline it. Reviewed-by: Evgenii

[Devel] [PATCH RH8] silence nfscache allocation warnings with kvzalloc

2021-05-05 Thread Evgenii Shatokhin
for drc_hashtbl allocation to fallback to vmalloc() in case of high order page is not available at the moment. = Done in the scope of https://jira.sw.ru/browse/PSBM-127830. Signed-off-by: Evgenii Shatokhin --- fs/nfsd/nfscache.c | 12 1 file changed, 4 insertions(+), 8 de

[Devel] [PATCH RH8] ve/cgroup: remove rcu_read_lock from cgroup_get_ve_root

2021-04-29 Thread Evgenii Shatokhin
;f8168436b4eb ve/cgroup: remove rcu_read_lock from cgroup_get_ve_root" was skipped, so here it is. cgroup_get_ve_root1() does not dereference RCU-protected pointers, cgroup_parent() does not do that do that either, so rcu_read_lock/unlock are not needed. Done in the scope of https://jira.sw.ru/browse/

[Devel] [PATCH RH8] ve/proc/net/nr_cpus: cut lines in /proc/net/softnet_stat to number of vcpus in CT

2021-04-23 Thread Evgenii Shatokhin
in the scope of https://jira.sw.ru/browse/PSBM-127794. Signed-off-by: Evgenii Shatokhin --- net/core/net-procfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 7083d708db3b..ff0da3fe7597 100644 --- a/net/core/net-procfs.c +++ b/net

[Devel] [PATCH RH8 0/3] KVM: x86/vPMU: ignore access to LBR-related MSRs (PSBM-75679)

2021-04-21 Thread Evgenii Shatokhin
it yet, by the way. I'd stick with the VZ-specific patches for now, they are less invasive. Signed-off-by: Evgenii Shatokhin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH RH8 3/3] KVM: x86/vPMU: ignore access to LBR-related MSRs

2021-04-21 Thread Evgenii Shatokhin
and some follow-up fixes. It is likely it has not been tested very thoroughly in production yet, esp. with Windows guests. The kernels 4.18.0-240.* from RHEL8 do not have it yet, by the way. I'd stick with the VZ-specific patches for now, they are less invasive. Signed-off-by: Evgenii Shatokhin

[Devel] [PATCH RH8 1/3] perf/x86/intel: move LBR-related data into a separate structure

2021-04-21 Thread Evgenii Shatokhin
to the second patch ("perf/x86/intel: make LBR initialization reusable"). Apart from that, it was mostly context changes. Done in the scope of https://jira.sw.ru/browse/PSBM-127794. Signed-off-by: Evgenii Shatokhin --- arch/x86/events/intel/core.c | 38 +-

[Devel] [PATCH RH8 2/3] perf/x86/intel: make LBR initialization reusable

2021-04-21 Thread Evgenii Shatokhin
init(). It will be needed then to update __intel_pmu_lbr_fill() accordingly. Done in the scope of https://jira.sw.ru/browse/PSBM-127794. Signed-off-by: Evgenii Shatokhin --- arch/x86/events/intel/core.c | 34 +-- arch/x86/events/intel/lbr.c | 153 ++ arch/x86/event

[Devel] [PATCH RH7 2/2] cpufreq: intel_pstate: Make reasons for failure more visible

2021-02-23 Thread Evgenii Shatokhin
is not very convenient. pr_info() messages are also easy to miss. Let us make all these more visible in dmesg. Added in the scope of https://jira.sw.ru/browse/PSBM-126007. Signed-off-by: Evgenii Shatokhin --- drivers/cpufreq/intel_pstate.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions

[Devel] [PATCH RH7 1/2] ms/cpufreq: intel_pstate: Add reasons for failure and debug messages

2021-02-23 Thread Evgenii Shatokhin
inor fixups ] Signed-off-by: Rafael J. Wysocki Commit 076b862c7e4409d2dcacfda19f7eaf8d07ab9200 in the mainline kernel. Added in the scope of https://jira.sw.ru/browse/PSBM-126007 Signed-off-by: Evgenii Shatokhin --- drivers/cpufreq/intel_pstate.c | 27 +-- 1 file changed

[Devel] [PATCH RH7 0/2] intel_pstate: add prints to record why the driver refused to work (PSBM-126007)

2021-02-23 Thread Evgenii Shatokhin
On some nodes ( https://pmc.acronis.com/browse/VSTOR-41067, https://jira.sw.ru/browse/PSBM-125953) pcc-cpufreq is used as the cpufreq driver rather than intel_pstate, which is suspicious: pcc-cpufreq is generally not recommended. It looks like intel_pstate silently fails to initialize in such

Re: [Devel] [PATCH RH7] ploop: Fix crash in purge_lru_warn()

2020-11-10 Thread Evgenii Shatokhin
On 10.11.2020 17:47, Kirill Tkhai wrote: do_div() works wrong in case of the second argument is long. We don't need remainder, so we don't need do_div() at all. https://jira.sw.ru/browse/PSBM-122035 Reported-by: Evgenii Shatokhin Signed-off-by: Kirill Tkhai --- drivers/block/ploop

[Devel] [PATCH RH8 3/3] vt: selection, push sel_lock up

2020-10-13 Thread Evgenii Shatokhin
"vt: selection, close sel_buffer race") Cc: stable Link: https://lore.kernel.org/r/20200228115406.5735-2-jsl...@suse.cz Signed-off-by: Greg Kroah-Hartman https://jira.sw.ru/browse/PSBM-120640 This is a backport of mainline commit e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2: the affected c

[Devel] [PATCH RH8 2/3] vt: selection, push console lock down

2020-10-13 Thread Evgenii Shatokhin
93e81e982f: * speakup-related hunk was dropped because that driver does not use set_selection(): it is not exported in this kernel version; * the affected code is in set_selection() rather than set_selection_kernel(). Signed-off-by: Evgenii Shatokhin --- drivers/tty/vt/selection.c | 13 - driv

[Devel] [PATCH RH8 1/3] vt: selection, close sel_buffer race

2020-10-13 Thread Evgenii Shatokhin
of mainline commit 07e6124a1a46b4b5a9b3cacc0c306b50da87abf5: the affected code is in set_selection() rather than set_selection_kernel(). Signed-off-by: Evgenii Shatokhin --- drivers/tty/vt/selection.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git

[Devel] [PATCH RH8 0/3] Fixes for CVE-2020-8648

2020-10-13 Thread Evgenii Shatokhin
ther two are needed to prevent a potential deadlock introduced by that fix. https://jira.sw.ru/browse/PSBM-120640 Signed-off-by: Evgenii Shatokhin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH RH7 2/2] vt: selection, push sel_lock up

2020-10-13 Thread Evgenii Shatokhin
"vt: selection, close sel_buffer race") Cc: stable Link: https://lore.kernel.org/r/20200228115406.5735-2-jsl...@suse.cz Signed-off-by: Greg Kroah-Hartman https://jira.sw.ru/browse/PSBM-121234 This is a backport of mainline commit e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2: the affected c

[Devel] [PATCH RH7 0/2] Follow-up fixes for CVE-2020-8648

2020-10-13 Thread Evgenii Shatokhin
lem in VZ7 though but the code does look problematic without these fixes. https://jira.sw.ru/browse/PSBM-121234 Signed-off-by: Evgenii Shatokhin ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH RH7 1/2] vt: selection, push console lock down

2020-10-13 Thread Evgenii Shatokhin
93e81e982f: * speakup-related hunk was dropped because that driver does not use set_selection(): it is not exported in this kernel version; * the affected code is in set_selection() rather than set_selection_kernel(). Signed-off-by: Evgenii Shatokhin --- drivers/tty/vt/selection.c | 13 - driv

[Devel] [PATCH RH7] bcache: fix NULL pointer deref in blk_add_request_payload

2020-10-09 Thread Evgenii Shatokhin
ts prerequisites, which are rather invasive. Signed-off-by: Evgenii Shatokhin --- drivers/md/bcache/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c index d285cd49104c..4482c0982e8f 100644 --- a/drivers/md/bcache/io.c +++ b/d

[Devel] [PATCH RH8] mm/tcache: restore missing rcu_read_lock() in tcache_detach_page()

2020-10-02 Thread Evgenii Shatokhin
__do_page_fault+0x25d/0x550 do_page_fault+0x38/0x290 do_async_page_fault+0x5b/0xe0 async_page_fault+0x1e/0x30 Let us restore rcu_read_lock(). https://jira.sw.ru/browse/PSBM-120802 Signed-off-by: Evgenii Shatokhin --- mm/tcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

Re: [Devel] [PATCH RH7] ipset: enable memory accounting for ipset memory allocations

2020-09-23 Thread Evgenii Shatokhin
On 23.09.2020 15:54, Vasily Averin wrote: currently root inside non-trusted network namespace can consume all node's memory for ipset hashtable. https://jira.sw.ru/browse/PSBM-108091 Signed-off-by: Vasily Averin --- net/netfilter/ipset/ip_set_core.c | 4 ++-- 1 file changed, 2

Re: [Devel] [PATCH rh7 v2] mm/memcg: fix cache growth above cache.limit_in_bytes

2020-07-30 Thread Evgenii Shatokhin
On 30.07.2020 17:00, Denis V. Lunev wrote: On 7/30/20 4:58 PM, Andrey Ryabinin wrote: Exceeding cache above cache.limit_in_bytes schedules high_work_func() which tries to reclaim 32 pages. If cache generated fast enough or it allows cgroup to steadily grow above cache.limit_in_bytes because we

Re: [Devel] [PATCH rh7 v4] mm/memcg: fix cache growth above cache.limit_in_bytes

2020-07-30 Thread Evgenii Shatokhin
Hi, On 30.07.2020 18:02, Andrey Ryabinin wrote: Exceeding cache above cache.limit_in_bytes schedules high_work_func() which tries to reclaim 32 pages. If cache generated fast enough or it allows cgroup to steadily grow above cache.limit_in_bytes because we don't reclaim enough. Try to reclaim

Re: [Devel] [PATCH 2/2] cgroup, memcg: Rework css_stacks debugging.

2020-05-18 Thread Evgenii Shatokhin
On 18.05.2020 18:14, Andrey Ryabinin wrote: Current css_stacks debugging isn't very usefull, it records only ~128 stacks which is not enough and doesn't allow us to identify the problem. Instead of recording full stacks, record only instruction pointer and the counter of how often we hit it.

[Devel] [PATCH rh8] livepatch: added minimal support for failure injection

2020-04-24 Thread Evgenii Shatokhin
sed in VZ7. However, it can still refuse to load a valid patch with -EBUSY if another patch is currently being processed. Failure injection added here mimics that behaviour. Done in the scope of https://jira.sw.ru/browse/PSBM-102582. Signed-off-by: Evgenii Shatokhin --- kernel/livepatch/c

Re: [Devel] [PATCH RHEL7 COMMIT] nfs: skip bdi_unregister() if inodes are leaked.

2019-09-29 Thread Evgenii Shatokhin
On 06.08.2019 12:35, Konstantin Khorenko wrote: > The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will > appear at https://src.openvz.org/scm/ovz/vzkernel.git > after rh7-3.10.0-957.21.3.vz7.106.7 > --> > commit 160e886e8adc095ac9f01420f66962732ee9683d > Author: Andrey

Re: [Devel] [PATCH RHEL7 COMMIT] nfs: skip bdi_unregister() if inodes are leaked.

2019-09-29 Thread Evgenii Shatokhin
On 06.08.2019 12:35, Konstantin Khorenko wrote: > The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will > appear at https://src.openvz.org/scm/ovz/vzkernel.git > after rh7-3.10.0-957.21.3.vz7.106.7 > --> > commit 160e886e8adc095ac9f01420f66962732ee9683d > Author: Andrey

Re: [Devel] [PATCH rh7] fuse: allow kernel to access "direct_io" files

2019-09-27 Thread Evgenii Shatokhin
On 26.09.2019 18:52, Andrey Ryabinin wrote: > From: Miklos Szeredi > > Allow the kernel read and write on "direct_io" files. This is > necessary for nfs export and execute support. > > The implementation is simple: if an access from the kernel is > detected, don't perform get_user_pages(),

Re: [Devel] [PATCH rh7] mm/page_alloc: fix latency in tracepoint.

2019-03-18 Thread Evgenii Shatokhin
On 06.03.2019 21:38, Denis Lunev wrote: > On 3/6/19 7:12 PM, Andrey Ryabinin wrote: >> Since transition from jiffies to sched_clock(), mm_page_alloc >> garbadge since we substract from jiffies nanoseconds. >> Fix this. >> >> Signed-off-by: Andrey Ryabinin >> --- >> include/trace/events/kmem.h |

Re: [Devel] [PATCH rh7] ms/mm/list_lru.c: avoid error-path NULL pointer deref

2017-06-19 Thread Evgenii Shatokhin
On 19.06.2017 17:14, Konstantin Khorenko wrote: Andrey, thank you! Zhenya, Vasya, please prepare a ReadyKernel patch for it. I'll try to add this fix to the version 23.x of RK patches, work in progress. https://readykernel.com/ -- Best regards, Konstantin Khorenko, Virtuozzo Linux

[Devel] [PATCH 0/1] ms/kprobes/x86: Return correct length in __copy_instruction()

2017-06-01 Thread Evgenii Shatokhin
https://jira.sw.ru/browse/PSBM-66876 If one tries to place a kprobe on an instruction that uses %rip-relative addressing, register_kprobe() fails with -EINVAL because __copy_instruction() from arch/x86/kernel/kprobes/core.c incorrectly returns 0. This makes it harder to use kprobes for the

[Devel] [PATCH] ms/kprobes/x86: Return correct length in __copy_instruction()

2017-06-01 Thread Evgenii Shatokhin
asami.hiramatsu...@hitachi.com> Link: http://lkml.kernel.org/r/20150317100918.28349.94654.stgit@localhost.localdomain Signed-off-by: Ingo Molnar <mi...@kernel.org> https://jira.sw.ru/browse/PSBM-66876 Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- arch/x86/kernel/k

Re: [Devel] [PATCH RHEL7 COMMIT] ms/tcp: avoid infinite loop in tcp_splice_read()

2017-02-27 Thread Evgenii Shatokhin
On 27.02.2017 16:55, Konstantin Khorenko wrote: Please consider this to ReadyKernel. Queued, thanks. https://readykernel.com/ -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 02/27/2017 04:53 PM, Konstantin Khorenko wrote: The commit is pushed to

Re: [Devel] [PATCH RHEL7 COMMIT] fuse: fuse_send_writepage() must check FUSE_S_FAIL_IMMEDIATELY

2016-12-08 Thread Evgenii Shatokhin
On 08.12.2016 18:01, Konstantin Khorenko wrote: Please consider to RK. Queued, thanks. -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 12/08/2016 06:01 PM, Konstantin Khorenko wrote: The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at

[Devel] [PATCH] ve/bridge: br_dev_init: check if "bridge" feature is enabled

2016-07-25 Thread Evgenii Shatokhin
rtnl_newlink rtnl_create_link br_dev_setup register_netdevice br_dev_init ... Let us check the "bridge" feature in br_dev_init() instead, to cover both cases. Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- net/bri

Re: [Devel] [PATCH rh7 1/4] net: ipip: enable in container

2016-06-23 Thread Evgenii Shatokhin
I have checked that they do fix the described problems, at least on my machine. So, for the whole patch series: Tested-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> Regards, Evgenii ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH] ve: mark DEF_PERMS feature deprecated

2016-06-21 Thread Evgenii Shatokhin
Let us mark this feature deprecated, similar to SYSFS and IPGRE features. https://jira.sw.ru/browse/PSBM-40280 Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- include/uapi/linux/vzcalluser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/l

Re: [Devel] [PATCH] fs/locks: Make CAP_LEASE work in containers

2016-04-26 Thread Evgenii Shatokhin
, Evgenii Shatokhin wrote: https://jira.sw.ru/browse/PSBM-46199 Allowing the privileged processes in the containers to set leases on arbitrary files seems to make no harm. Let us make CAP_LEASE work there. Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- fs/locks.c | 2 +-

[Devel] [PATCH] fs/locks: Make CAP_LEASE work in containers

2016-04-25 Thread Evgenii Shatokhin
https://jira.sw.ru/browse/PSBM-46199 Allowing the privileged processes in the containers to set leases on arbitrary files seems to make no harm. Let us make CAP_LEASE work there. Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- fs/locks.c | 2 +- 1 file changed, 1 insertion

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-28 Thread Evgenii Shatokhin
27.01.2016 22:04, Stanislav Kinsburskiу пишет: 27 янв. 2016 г. 5:30 PM пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: 27.01.2016 19:08, Stanislav Kinsburskiy пишет: 27.01.2016 16:02, Evgenii Shatokhin пишет: 27.01.2016 16:38, Igor Sukhih пишет: On 01/27/2016 04

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
27.01.2016 18:23, Igor Sukhih пишет: On 01/27/2016 06:02 PM, Evgenii Shatokhin wrote: 27.01.2016 16:38, Igor Sukhih пишет: On 01/27/2016 04:29 PM, Stanislav Kinsburskiу wrote: 27 янв. 2016 г. 14:24 пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: I created it with vzc

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
27.01.2016 19:08, Stanislav Kinsburskiy пишет: 27.01.2016 16:02, Evgenii Shatokhin пишет: 27.01.2016 16:38, Igor Sukhih пишет: On 01/27/2016 04:29 PM, Stanislav Kinsburskiу wrote: 27 янв. 2016 г. 14:24 пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: I c

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
27.01.2016 15:00, Stanislav Kinsburskiy пишет: 27.01.2016 12:58, Evgenii Shatokhin пишет: 27.01.2016 13:29, Stanislav Kinsburskiу пишет: 27 янв. 2016 г. 11:12 AM пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: Hi, Is there a way to make a partition of a physic

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
27.01.2016 16:38, Igor Sukhih пишет: On 01/27/2016 04:29 PM, Stanislav Kinsburskiу wrote: 27 янв. 2016 г. 14:24 пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: I created it with vzctl set 101 --devnodes sdb1:rw --save The node is now present in the CT. However, if

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
27.01.2016 13:29, Stanislav Kinsburskiу пишет: 27 янв. 2016 г. 11:12 AM пользователь Evgenii Shatokhin <eshatok...@virtuozzo.com> написал: Hi, Is there a way to make a partition of a physical HDD, say, sdb1 directly available to a container, bypassing ploop? Hi, There is

[Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Evgenii Shatokhin
Hi, Is there a way to make a partition of a physical HDD, say, sdb1 directly available to a container, bypassing ploop? In my case, this is only needed to simplify debugging of some issues. 'prlctl --device-add hdd <...>' adds a ploop device anyway, it seems. Regards, Evgenii

[Devel] [PATCH v2] ve/fs: Print a message if a VE reaches its limit on mounts

2016-01-19 Thread Evgenii Shatokhin
the name of the VE rather than its address. Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- fs/namespace.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index fc8ea36..6cfe52f 100644 --- a/fs/namespace.c +++ b/fs/names

[Devel] [PATCH 2/2] ve/fs: Print a message if a VE reaches its limit on mounts

2016-01-12 Thread Evgenii Shatokhin
https://jira.sw.ru/browse/PSBM-42825 This patch is for vzkernel from beta3 (that is, 3.10.0-229.7.2.*). This should help debugging the situations when alloc_vfsmnt() fails. Rate-limiting is used to avoid the flood of such messages if the mount limit is hit often. Signed-off-by: Evgenii

[Devel] [PATCH 1/2] ve/fs: Use comparison of signed integers in ve_mount_allowed()

2016-01-12 Thread Evgenii Shatokhin
d fail as a result. This patch fixes the problem. Signed-off-by: Evgenii Shatokhin <eshatok...@virtuozzo.com> --- include/linux/ve.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ve.h b/include/linux/ve.h index b9374a1..bf04275 100644 --- a/include/linux/

[Devel] [PATCH 0/2] A fix for ve_mount_allowed (PSBM-42825)

2016-01-12 Thread Evgenii Shatokhin
Hi, The following patches are needed to fix a problem in ve_mount_allowed (https://jira.sw.ru/browse/PSBM-42825) and to make debugging of such issues a bit easier. The first patch fixes signed/unsigned mismatch in ve_mount_allowed() that lead to problems. The second one makes sure a message is

[Devel] [PATCH] module: do not taint kernel with TAINT_OOT_MODULE

2015-11-23 Thread Evgenii Shatokhin
, the kernel will be tainted with TAINT_FORCED_MODULE anyway because the signature verification will fail. So it will be clearly visible in the kernel log what is going on. Signed-off-by: Evgenii Shatokhin <eshatok...@odin.com> --- kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [Devel] [PATCH v3] ve/fs: add per-VE limit of mount points

2015-11-13 Thread Evgenii Shatokhin
mb" https://github.com/avagin/ctb/blob/master/mounts/run.sh ends with "cannot allocate memory" and makes no harm. I did not test !CONFIG_VE case though. 13 нояб. 2015 г. 14:01 пользователь Evgenii Shatokhin <eshatok...@odin.com> написал: https://jira.sw.ru/browse/PSBM-34438

[Devel] [PATCH v3] ve/fs: add per-VE limit of mount points

2015-11-13 Thread Evgenii Shatokhin
and another VE unmounts it seem to be of no concern. If so, it is OK not to alter struct mount: the mount counter for a VE may become unbalanced but this is acceptable here. * The sysctl knob is now defined alongside other VE sysctls. Signed-off-by: Evgenii Shatokhin <eshatok...@odin.

Re: [Devel] [PATCH v2] ve/fs: add per-VE limit of mount points

2015-11-12 Thread Evgenii Shatokhin
will address this in v.3 of the patch. Thanks! 11.11.2015 10:33, Evgenii Shatokhin пишет: https://jira.sw.ru/browse/PSBM-34438 (This fix was adapted from PCS6.) It is possible for a container to create lots of mount points, which may make operations with them slower. As some

[Devel] [PATCH v2] ve/fs: add per-VE limit of mount points

2015-11-11 Thread Evgenii Shatokhin
: the mount counter for a VE may become unbalanced but this is acceptable here. * The sysctl knob is now defined alongside other VE sysctls. Signed-off-by: Evgenii Shatokhin <eshatok...@odin.com> --- fs/namespace.c | 22 -- include/linux/ve.h | 6 ++ kernel/v

Re: [Devel] [PATCH] acct: Allow process accounting in containers

2015-11-09 Thread Evgenii Shatokhin
09.11.2015 17:39, Andrew Vagin пишет: On Mon, Nov 09, 2015 at 02:27:42PM +0300, Evgenii Shatokhin wrote: https://jira.sw.ru/browse/PSBM-40587 Without this patch, process accounting (see accton tool from psacct package) does not work in the containers. However, it is nice to have. Does

[Devel] [PATCH] acct: Allow process accounting in containers

2015-11-09 Thread Evgenii Shatokhin
https://jira.sw.ru/browse/PSBM-40587 Without this patch, process accounting (see accton tool from psacct package) does not work in the containers. However, it is nice to have. Signed-off-by: Evgenii Shatokhin <eshatok...@odin.com> --- kernel/acct.c | 2 +- 1 file changed, 1 insertion

Re: [Devel] [PATCH] ve/fs: add per-VE limit of mount points

2015-11-05 Thread Evgenii Shatokhin
hopefully it will never used => less time spent to rework. And we currently really don't need it to be per-CT. -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 11/05/2015 10:35 AM, Evgenii Shatokhin wrote: 02.11.2015 18:47, Stanislav Kinsburskiy пишет: Yet again these sys

Re: [Devel] [PATCH] ve/fs: add per-VE limit of mount points

2015-11-04 Thread Evgenii Shatokhin
02.11.2015 18:47, Stanislav Kinsburskiy пишет: Yet again these sysctl handles...((( I have some questions. Please, see inlined. 02.11.2015 16:11, Evgenii Shatokhin пишет: https://jira.sw.ru/browse/PSBM-34438 (This fix was adapted from PCS6.) It is possible for a container to create lots

[Devel] [PATCH] ve/fs: add per-VE limit of mount points

2015-11-02 Thread Evgenii Shatokhin
. Let us limit the maximum number of mount points a VE may create. The limit can be customized via /proc/sys/fs/ve-mount-nr knob. Signed-off-by: Evgenii Shatokhin <eshatok...@odin.com> --- fs/mount.h| 2 ++ fs/namespace.c

[Devel] [PATCH] ve: Revisit the Makefiles to allow Kpatch-based builds too

2015-09-30 Thread Evgenii Shatokhin
, same for the modules in kernel/ve/dummy/. As long as these modules are loaded using modprobe and without explicit paths, it should be OK. https://jira.sw.ru/browse/PSBM-40069 Signed-off-by: Evgenii Shatokhin <eshatok...@odin.com> --- kernel/ve/Makefile | 6 ++ kernel/ve/dummy/Make