Re: [PATCH 21/34] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #12]

2018-12-06 Thread Andrei Vagin
On Sun, Nov 18, 2018 at 08:23:42PM -0800, Andrei Vagin wrote: > On Fri, Sep 21, 2018 at 05:33:01PM +0100, David Howells wrote: > > @@ -1993,57 +2009,53 @@ int cgroup_setup_root(struct cgroup_root *root, u16 > > ss_mask, int ref_flags) > > return ret; > >

[PATCH] include: replace tsk to task in linux/sched/signal.h

2018-11-29 Thread Andrei Vagin
This file uses "task" 85 times and "tsk" 25 times. It should be better to choose one of these variants. Signed-off-by: Andrei Vagin --- include/linux/sched/signal.h | 51 ++-- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a

Re: [PATCH] ptrace: take into account saved_sigmask in PTRACE_{GET,SET}SIGMASK

2018-11-26 Thread Andrei Vagin
On Thu, Nov 22, 2018 at 12:47:52PM +0100, Oleg Nesterov wrote: > On 11/19, Andrei Vagin wrote: > > > > case PTRACE_SETSIGMASK: { > > sigset_t new_set; > > @@ -962,6 +971,8 @@ int ptrace_request(struct task_struct *child, long > > request, > &g

[PATCH] ptrace: take into account saved_sigmask in PTRACE_{GET,SET}SIGMASK

2018-11-19 Thread Andrei Vagin
set. PTRACE_SETSIGMASK drops the TIF_RESTORE_SIGMASK flag. Cc: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Andrew Morton Fixes: 29000caecbe8 ("ptrace: add ability to get/set signal-blocked mask") Signed-off-by: Andrei Vagin --- include/linux/sched/signal.h | 18

Re: [PATCH 21/34] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #12]

2018-11-18 Thread Andrei Vagin
On Fri, Sep 21, 2018 at 05:33:01PM +0100, David Howells wrote: > Make kernfs support superblock creation/mount/remount with fs_context. > > This requires that sysfs, cgroup and intel_rdt, which are built on kernfs, > be made to support fs_context also. > > Notes: > > (1) A kernfs_fs_context

linux-next: Unable to mount a cgroup file system

2018-11-17 Thread Andrei Vagin
Hello, We run CRIU tests on linux-next kernels. Today, I found that our test robot hangs up on mounting a cgroup file system. https://travis-ci.org/avagin/linux/jobs/455732006 632 ?Ssl0:00 /usr/bin/containerd 843 ?Sl 0:00 \_ containerd-shim -namespace moby -workdir

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-10-31 Thread Andrei Vagin
On Mon, Oct 29, 2018 at 09:33:14PM +0100, Thomas Gleixner wrote: > Andrei, > > On Sat, 20 Oct 2018, Andrei Vagin wrote: > > When a container is migrated to another host, we have to restore its > > monotonic and boottime clocks, but we still expect that the container &g

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-10-20 Thread Andrei Vagin
On Sat, Oct 20, 2018 at 06:41:23PM -0700, Andrei Vagin wrote: > On Fri, Sep 28, 2018 at 07:03:22PM +0200, Eric W. Biederman wrote: > > Thomas Gleixner writes: > > > > > On Wed, 26 Sep 2018, Eric W. Biederman wrote: > > >> Reading the code the calling sequence

Re: [RFC 00/20] ns: Introduce Time Namespace

2018-10-20 Thread Andrei Vagin
On Fri, Sep 28, 2018 at 07:03:22PM +0200, Eric W. Biederman wrote: > Thomas Gleixner writes: > > > On Wed, 26 Sep 2018, Eric W. Biederman wrote: > >> Reading the code the calling sequence there is: > >> tick_sched_do_timer > >>tick_do_update_jiffies64 > >> update_wall_time > >>

Re: [PATCH v6 1/1] ns: add binfmt_misc to the user namespace

2018-10-16 Thread Andrei Vagin
t. > > Signed-off-by: Laurent Vivier Acked-by: Andrei Vagin Thanks, Andrei > --- > fs/binfmt_misc.c | 111 - > include/linux/user_namespace.h | 15 + > kernel/user.c | 14 + > kernel/user_namespace.

Re: [PATCH] ptrace: zero out siginfo_t in ptrace_peek_siginfo()

2018-10-10 Thread Andrei Vagin
On Wed, Sep 26, 2018 at 05:17:25PM +0200, Alexander Potapenko wrote: > KMSAN reported the following infoleak: > > == > BUG: KMSAN: kernel-infoleak in _copy_to_user+0x15d/0x1f0 > ... > Call Trace: > __dump_stack lib/dump_stack.c:77 >

Re: [RFC v4 1/1] ns: add binfmt_misc to the user namespace

2018-10-07 Thread Andrei Vagin
On Sat, Oct 06, 2018 at 09:35:46PM +0200, Laurent Vivier wrote: > This patch allows to have a different binfmt_misc configuration > for each new user namespace. By default, the binfmt_misc configuration > is the one of the previous level, but if the binfmt_misc filesystem is > mounted in the new

Re: [RFC v3 1/1] ns: add binfmt_misc to the user namespace

2018-10-06 Thread Andrei Vagin
On Thu, Oct 04, 2018 at 12:50:22AM +0200, Laurent Vivier wrote: > This patch allows to have a different binfmt_misc configuration > for each new user namespace. By default, the binfmt_misc configuration > is the one of the host, but if the binfmt_misc filesystem is mounted > in the new namespace a

Re: [REVIEW][PATCH 2/6] signal: Fail sigqueueinfo if si_signo != sig

2018-10-05 Thread Andrei Vagin
On Tue, Sep 25, 2018 at 07:19:02PM +0200, Eric W. Biederman wrote: > The kernel needs to validate that the contents of struct siginfo make > sense as siginfo is copied into the kernel, so that the proper union > members can be put in the appropriate locations. The field si_signo > is a

Re: [PATCH 7/7] aio: implement io_pgetevents

2018-07-09 Thread Andrei Vagin
On Sun, Jul 08, 2018 at 10:44:00PM +0200, Christoph Hellwig wrote: > On Wed, Jul 04, 2018 at 04:21:16PM +0200, Adrian Reber wrote: > > In file included from /usr/include/linux/signal.h:5, > > from /usr/include/linux/aio_abi.h:32, > > from include.c:2: > >

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-27 Thread Andrei Vagin
On Tue, Jun 26, 2018 at 09:57:07AM +0100, David Howells wrote: > Andrei Vagin wrote: > > > > > > - mnt = kern_mount_data(_fs_type, ns, 0); > > > > > > Here ns->user_ns and get_current_cred()->user_ns are not always equal > &

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-26 Thread Andrei Vagin
On Mon, Jun 25, 2018 at 11:13:20PM -0700, Andrei Vagin wrote: > On Mon, Jun 18, 2018 at 08:34:50PM -0700, Andrei Vagin wrote: > > Hi David, > > > > We run CRIU tests for vfs/for-next, and today a few of these test failed. I > > found that the problem appears after t

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-26 Thread Andrei Vagin
On Mon, Jun 18, 2018 at 08:34:50PM -0700, Andrei Vagin wrote: > Hi David, > > We run CRIU tests for vfs/for-next, and today a few of these test failed. I > found that the problem appears after this patch.. > > > int pid_ns_prepare_proc(struct pid_namespace *ns)

Re: [16/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #8]

2018-06-22 Thread Andrei Vagin
On Fri, Jun 22, 2018 at 08:30:29AM -0700, Andrei Vagin wrote: > On Fri, Jun 22, 2018 at 01:52:16PM +0100, David Howells wrote: > > Andrei Vagin wrote: > > > > > ret = 0; > > > + ctx->root = root; > > >

Re: [16/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #8]

2018-06-22 Thread Andrei Vagin
On Fri, Jun 22, 2018 at 01:52:16PM +0100, David Howells wrote: > Andrei Vagin wrote: > > > ret = 0; > > + ctx->root = root; > > goto out_unlock; > > Okay, I can see that. > > >

Re: [16/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #8]

2018-06-21 Thread Andrei Vagin
On Fri, May 25, 2018 at 01:07:08AM +0100, David Howells wrote: ... > @@ -1972,57 +1957,51 @@ int cgroup_setup_root(struct cgroup_root *root, u16 > ss_mask, int ref_flags) > return ret; > } > > -struct dentry *cgroup_do_mount(struct file_system_type *fs_type, int flags, > -

Re: [12/24] proc: Add fs_context support to procfs [ver #7]

2018-06-18 Thread Andrei Vagin
Hi David, We run CRIU tests for vfs/for-next, and today a few of these test failed. I found that the problem appears after this patch.. https://travis-ci.org/avagin/linux/jobs/393766778 The reproducer is attached. It creates a process in a new set of namespaces (user, mount, etc) and then this

Re: [v5, 03/31] kconfig: reference environment variables directly and remove 'option env='

2018-06-08 Thread Andrei Vagin
Hi Masahiro, localyesconfig doesn't work and git bisect points on this patch. [avagin@laptop linux]$ make localyesconfig using config: '.config' Can't open arch/$(SRCARCH)/Kconfig at ./scripts/kconfig/streamline_config.pl line 174, <$kinfile> line 8. make[1]: *** [scripts/kconfig/Makefile:45:

Re: possible deadlock in sk_diag_fill

2018-05-15 Thread Andrei Vagin
On Tue, May 15, 2018 at 07:19:39AM +0200, Dmitry Vyukov wrote: > On Mon, May 14, 2018 at 8:00 PM, Andrei Vagin <ava...@virtuozzo.com> wrote: > >> >> Hello, > >> >> > >> >> syzbot found the following crash on: > >> >&g

Re: possible deadlock in sk_diag_fill

2018-05-14 Thread Andrei Vagin
On Sat, May 12, 2018 at 09:46:25AM +0200, Dmitry Vyukov wrote: > On Fri, May 11, 2018 at 8:33 PM, Andrei Vagin <ava...@virtuozzo.com> wrote: > > On Sat, May 05, 2018 at 10:59:02AM -0700, syzbot wrote: > >> Hello, > >> > >> syzbot found the following crash

Re: possible deadlock in sk_diag_fill

2018-05-11 Thread Andrei Vagin
On Sat, May 05, 2018 at 10:59:02AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:c1c07416cdd4 Merge tag 'kbuild-fixes-v4.17' of git://git.k.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12164c9780 >

Re: [v2] mm: access to uninitialized struct page

2018-05-04 Thread Andrei Vagin
nk you, > Pavel > On Fri, May 4, 2018 at 4:27 AM Andrei Vagin <ava...@virtuozzo.com> wrote: > > > Hello, > > > We have a robot which runs criu tests on linux-next kernels. > > > All tests passed on 4.17.0-rc3-next-20180502. > > > But the 4.17.0

Re: [v2] mm: access to uninitialized struct page

2018-05-04 Thread Andrei Vagin
Hello, We have a robot which runs criu tests on linux-next kernels. All tests passed on 4.17.0-rc3-next-20180502. But the 4.17.0-rc3-next-20180504 kernel didn't boot. git bisect points on this patch. On Thu, Apr 26, 2018 at 04:26:19PM -0400, Pavel Tatashin wrote: > The following two bugs were

[PATCH] scsi: qla2xxx: remove the unused tcm_qla2xxx_cmd_wq

2018-05-02 Thread Andrei Vagin
Signed-off-by: Andrei Vagin <ava...@openvz.org> --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index aadfeaac3898..b63440fec18e 100644 --- a/drivers/scsi/q

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Andrei Vagin
On Wed, Apr 04, 2018 at 02:23:40PM -0700, Andrei Vagin wrote: > Hi Dan, > > I catch the following bug on the linux-next 20180404. git bisect brought me > to this commit: The next patch fixes the problem: diff --git a/drivers/dax/super.c b/drivers/dax/super.c index 5b13da127982..

Re: [v8, 11/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2018-04-04 Thread Andrei Vagin
Hi Dan, I catch the following bug on the linux-next 20180404. git bisect brought me to this commit: commit 8e4d1ccc5286d2c3da6515b92323a3529aa64496 (HEAD, refs/bisect/bad) Author: Dan Williams Date: Sat Oct 21 14:41:13 2017 -0700 mm, dax: enable filesystems to

Re: [PATCH] autofs4: use wake_up() instead of wake_up_interruptible

2018-04-01 Thread Andrei Vagin
On Sun, Apr 01, 2018 at 10:01:41AM +0800, Ian Kent wrote: > On 01/04/18 09:31, Ian Kent wrote: > > On 31/03/18 10:28, Andrei Vagin wrote: > >> In "autofs4: use wait_event_killable", wait_event_interruptible() was > >> replaced by wait_event_killable(), but in

Re: [03/10] genksyms: generate lexer and parser during build instead of shipping

2018-03-30 Thread Andrei Vagin
On Sat, Mar 31, 2018 at 11:20:22AM +0900, Masahiro Yamada wrote: > 2018-03-31 7:21 GMT+09:00 Andrei Vagin <ava...@virtuozzo.com>: > > On Fri, Mar 30, 2018 at 10:40:22AM -0700, Andrei Vagin wrote: > >> On Fri, Mar 23, 2018 at 10:04:32PM +0900, Masahiro Yamada wrote: > >

[PATCH] autofs4: use wake_up() instead of wake_up_interruptible

2018-03-30 Thread Andrei Vagin
rew Morton <a...@linux-foundation.org> Cc: Stephen Rothwell <s...@canb.auug.org.au> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- fs/autofs4/waitq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c index c160e9b3aa0f..be9c

Re: [PATCH v5 0/4] vm: add a syscall to map a process memory into a pipe

2018-02-28 Thread Andrei Vagin
On Wed, Feb 28, 2018 at 10:12:55AM +0300, Pavel Emelyanov wrote: > On 02/27/2018 05:18 AM, Dmitry V. Levin wrote: > > On Mon, Feb 26, 2018 at 12:02:25PM +0300, Pavel Emelyanov wrote: > >> On 02/21/2018 03:44 AM, Andrew Morton wrote: > >>> On Tue, 9 Jan 2018 08:30:49 +0200 Mike Rapoport > >>>

Re: [PATCH v5 0/4] vm: add a syscall to map a process memory into a pipe

2018-02-27 Thread Andrei Vagin
On Tue, Feb 27, 2018 at 05:18:18AM +0300, Dmitry V. Levin wrote: > On Mon, Feb 26, 2018 at 12:02:25PM +0300, Pavel Emelyanov wrote: > > On 02/21/2018 03:44 AM, Andrew Morton wrote: > > > On Tue, 9 Jan 2018 08:30:49 +0200 Mike Rapoport > > > wrote: > > > > > >> This

Re: [tip:x86/boot] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-13 Thread Andrei Vagin
On Tue, Feb 13, 2018 at 12:02:49PM +0300, Kirill A. Shutemov wrote: > On Tue, Feb 13, 2018 at 12:41:22AM -0800, Andrei Vagin wrote: > > On Tue, Feb 13, 2018 at 11:08:16AM +0300, Kirill A. Shutemov wrote: > > > On Mon, Feb 12, 2018 at 10:51:56PM -0800, Andrei Vagin wrote:

Re: [tip:x86/boot] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-13 Thread Andrei Vagin
On Tue, Feb 13, 2018 at 11:08:16AM +0300, Kirill A. Shutemov wrote: > On Mon, Feb 12, 2018 at 10:51:56PM -0800, Andrei Vagin wrote: > > Hi Kirill, > > > > Something is wrong in this patch. > > Was it bisected to exactly this patch? Is the previous one fine? Yes. Y

Re: [tip:x86/boot] x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G

2018-02-12 Thread Andrei Vagin
Hi Kirill, Something is wrong in this patch. We regularly run CRIU tests on linux-next, and yesterday I found that a kernel didn't boot. We run this tests in Travis-CI, and we don't have access to kernel logs. I tried to reproduce the problem localy, but I failed. In Travis-CI, we build kernel,

Re: [PATCH v2 00/31] Replacing net_mutex with rw_semaphore

2018-01-18 Thread Andrei Vagin
al 0m17,007s > user 0m5,311s > sys 0m11,779 > > (5.8 times faster) Good job! Acked-by: Andrei Vagin <ava...@virtuozzo.com> > --- > > Kirill Tkhai (31): > net: Assign net to net_namespace_list in setup_net() > net: Cleanup c

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Andrei Vagin
On Thu, Jan 18, 2018 at 01:06:52AM +0100, Andrew Lunn wrote: > > What is the idea to have two separate counters? Can a delta between them > > be a bigger than 1? > > Yes, it can. > > These counters are incremented in netif_carrier_on() / > netif_carrier_off(). They are not always called in pairs

Re: [PATCH net-next] net: core: Expose number of link up/down transitions

2018-01-17 Thread Andrei Vagin
On Wed, Jan 17, 2018 at 03:06:57PM -0800, Florian Fainelli wrote: > From: David Decotigny > > Expose the number of times the link has been going UP or DOWN, and > update the "carrier_changes" counter to be the sum of these two events. > While at it, also update the

Re: [PATCH v2 03/31] net: Introduce net_sem for protection of pernet_list

2018-01-17 Thread Andrei Vagin
On Mon, Nov 20, 2017 at 09:32:34PM +0300, Kirill Tkhai wrote: > Curently mutex is used to protect pernet operations list. It makes > cleanup_net() to execute ->exit methods of the same operations set, > which was used on the time of ->init, even after net namespace is > unlinked from

Re: [PATCH v2 05/31] net: Allow pernet_operations to be executed in parallel

2018-01-17 Thread Andrei Vagin
On Mon, Nov 20, 2017 at 09:32:55PM +0300, Kirill Tkhai wrote: > This adds new pernet_operations::async flag to indicate operations, > which ->init(), ->exit() and ->exit_batch() methods are allowed > to be executed in parallel with the methods of any other pernet_operations. > > When there are

Re: [v7, 05/11] x86/retpoline/entry: Convert entry assembler indirect jumps

2018-01-09 Thread Andrei Vagin
On Tue, Jan 09, 2018 at 08:39:21PM -0800, Dave Hansen wrote: > On 01/09/2018 08:30 PM, Andi Kleen wrote: > > On Tue, Jan 09, 2018 at 07:54:08PM -0800, Andrei Vagin wrote: > >> > >> In my test environment, the kernel with this patch crashes. > > > > I po

Re: [v7, 05/11] x86/retpoline/entry: Convert entry assembler indirect jumps

2018-01-09 Thread Andrei Vagin
Hi, In my test environment, the kernel with this patch crashes. https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/pti=f3433c1010c6af61c9897f0f0447f81b991feac1 My config and a kernel log are attached. [1.985901] Freeing unused kernel memory: 524K [1.987505]

Re: general protection fault in __netlink_ns_capable

2018-01-04 Thread Andrei Vagin
On Thu, Jan 04, 2018 at 01:01:17PM +0100, Dmitry Vyukov wrote: > On Wed, Jan 3, 2018 at 8:37 AM, Andrei Vagin <ava...@virtuozzo.com> wrote: > >> > Hello, > >> > > >> > syzkaller hit the following crash on > >> > 75aa5540627fdb3d8f86229776ea

Re: general protection fault in __netlink_ns_capable

2018-01-02 Thread Andrei Vagin
On Tue, Jan 02, 2018 at 04:35:11PM -0800, Andrei Vagin wrote: > On Tue, Jan 02, 2018 at 10:58:01AM -0800, syzbot wrote: > > Hello, > > > > syzkaller hit the following crash on > > 75aa5540627fdb3d8f86229776ea87f995275351 > > git://git.cmpxchg.org/linux-mmots.

Re: general protection fault in __netlink_ns_capable

2018-01-02 Thread Andrei Vagin
On Tue, Jan 02, 2018 at 10:58:01AM -0800, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 75aa5540627fdb3d8f86229776ea87f995275351 > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C

Re: [V181,22/54] x86/cpu_entry_area: Move it out of fixmap

2017-12-21 Thread Andrei Vagin
Hi Thomas, The kernel with this patch doesn't boot, if CONFIG_KASAN is set: [0.00] Linux version 4.14.0-00142-g8604322546c0 (avagin@laptop) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #11 SMP Thu Dec 21 18:38:44 PST 2017 [0.00] Command line: root=/dev/vda2 ro debug

Re: virtio: make VIRTIO a menuconfig to ease disabling it all

2017-12-20 Thread Andrei Vagin
On Sat, Dec 09, 2017 at 04:26:57PM +0100, Vincent Legoll wrote: > No need to get into the submenu to disable all VIRTIO-related > config entries. > > This makes it easier to disable all VIRTIO config options > without entering the submenu. It will also enable one > to see that en/dis-abled state

[PATCH] mm: don't use the same value for MAP_FIXED_SAFE and MAP_SYNC

2017-12-18 Thread Andrei Vagin
Cc: Michal Hocko <mho...@kernel.org> Fixes: ("fs, elf: drop MAP_FIXED usage from elf_map") Signed-off-by: Andrei Vagin <ava...@openvz.org> --- include/uapi/asm-generic/mman-common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm-ge

Re: [2/2] fs, elf: drop MAP_FIXED usage from elf_map

2017-12-18 Thread Andrei Vagin
On Mon, Dec 18, 2017 at 10:13:02AM +0100, Michal Hocko wrote: > On Fri 15-12-17 16:49:28, Andrei Vagin wrote: > > Hi Michal, > > > > We run CRIU tests for linux-next and the 4.15.0-rc3-next-20171215 kernel > > doesn't boot: > > > > [3.4925

Re: [2/2] fs, elf: drop MAP_FIXED usage from elf_map

2017-12-15 Thread Andrei Vagin
Hi Michal, We run CRIU tests for linux-next and the 4.15.0-rc3-next-20171215 kernel doesn't boot: [3.492549] Freeing unused kernel memory: 1640K [3.494547] Write protecting the kernel read-only data: 18432k [3.498781] Freeing unused kernel memory: 2016K [3.503330] Freeing unused

BUG: unable to handle kernel NULL pointer dereference in fdb_find_rcu

2017-12-15 Thread Andrei Vagin
Hi, We run criu tests for linux-next and today we get this bug: The kernel version is 4.15.0-rc3-next-20171215 [ 235.397328] BUG: unable to handle kernel NULL pointer dereference at 000c [ 235.398624] IP: fdb_find_rcu+0x3c/0x130 [ 235.399365] PGD 51970067 P4D 51970067 PUD

[PATCH] target: don't call an unmap callback if a range length is zero

2017-12-13 Thread Andrei Vagin
let) returns EINVAL, if len is zero. It means that file_operations->fallocate() isn't obligated to handle zero ranges too. Signed-off-by: Andrei Vagin <ava...@openvz.org> --- drivers/target/target_core_sbc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dr

Re: proc: fix /proc/*/map_files lookup

2017-11-29 Thread Andrei Vagin
On Wed, Nov 29, 2017 at 02:56:03PM -0800, Andrew Morton wrote: > On Mon, 27 Nov 2017 21:29:25 -0800 Andrei Vagin <ava...@virtuozzo.com> wrote: > > > On Tue, Nov 21, 2017 at 12:27:06AM +0300, Alexey Dobriyan wrote: > > > Current code does: > > > > > &g

Re: [PATCH v4 2/4] vm: add a syscall to map a process memory into a pipe

2017-11-28 Thread Andrei Vagin
On Mon, Nov 27, 2017 at 03:42:49PM -0800, Andrew Morton wrote: > On Mon, 27 Nov 2017 09:19:39 +0200 Mike Rapoport <r...@linux.vnet.ibm.com> > wrote: > > > From: Andrei Vagin <ava...@virtuozzo.com> > > > > It is a hybrid of process_vm_readv() and vmsplice()

[tip:perf/core] perf trace: Fix an exit code of trace__symbols_init

2017-11-28 Thread tip-bot for Andrei Vagin
Commit-ID: 35c33633abc14b906e84b7b0115ede6df6830120 Gitweb: https://git.kernel.org/tip/35c33633abc14b906e84b7b0115ede6df6830120 Author: Andrei Vagin <ava...@openvz.org> AuthorDate: Tue, 7 Nov 2017 16:22:46 -0800 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitD

Re: proc: fix /proc/*/map_files lookup

2017-11-27 Thread Andrei Vagin
On Tue, Nov 21, 2017 at 12:27:06AM +0300, Alexey Dobriyan wrote: > Current code does: > > if (sscanf(dentry->d_name.name, "%lx-%lx", start, end) != 2) > > However sscanf() is broken garbage. > > It silently accepts whitespace between format specifiers > (did you know that?). > > It

[tip:perf/core] perf trace: Fix an exit code of trace__symbols_init

2017-11-18 Thread tip-bot for Andrei Vagin
Commit-ID: cbd5c1787bab4643e5959522275b46de94eba5ac Gitweb: https://git.kernel.org/tip/cbd5c1787bab4643e5959522275b46de94eba5ac Author: Andrei Vagin <ava...@openvz.org> AuthorDate: Tue, 7 Nov 2017 16:22:46 -0800 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitD

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Andrei Vagin
On Tue, Nov 14, 2017 at 10:00:59AM -0800, Eric Dumazet wrote: > On Tue, 2017-11-14 at 09:44 -0800, Andrei Vagin wrote: > > On Tue, Nov 14, 2017 at 04:53:33PM +0300, Kirill Tkhai wrote: > > > Curently mutex is used to protect pernet operations list. It makes > > > clea

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Andrei Vagin
On Tue, Nov 14, 2017 at 09:04:06PM +0300, Kirill Tkhai wrote: > On 14.11.2017 20:44, Andrei Vagin wrote: > > On Tue, Nov 14, 2017 at 04:53:33PM +0300, Kirill Tkhai wrote: > >> Curently mutex is used to protect pernet operations list. It makes > >> cleanup_net(

Re: [PATCH] net: Convert net_mutex into rw_semaphore and down read it on net->init/->exit

2017-11-14 Thread Andrei Vagin
On Tue, Nov 14, 2017 at 04:53:33PM +0300, Kirill Tkhai wrote: > Curently mutex is used to protect pernet operations list. It makes > cleanup_net() to execute ->exit methods of the same operations set, > which was used on the time of ->init, even after net namespace is > unlinked from

Re: [PATCH 1/3] x86/entry: Fix idtentry unwind hint

2017-11-13 Thread Andrei Vagin
Hi Josh, On Thu, Oct 26, 2017 at 8:24 AM, Josh Poimboeuf <jpoim...@redhat.com> wrote: > On Wed, Oct 25, 2017 at 02:07:38PM -0700, Andrei Vagin wrote: >> Hi Josh, >> >> Here is one more warning: >> [5.852094] WARNING: can't dereference iret registe

[tip:perf/urgent] perf trace: Call machine__exit() at exit

2017-11-11 Thread tip-bot for Andrei Vagin
Commit-ID: 33974a414ce2324554f75dbd204ff0868f499e32 Gitweb: https://git.kernel.org/tip/33974a414ce2324554f75dbd204ff0868f499e32 Author: Andrei Vagin <ava...@openvz.org> AuthorDate: Tue, 7 Nov 2017 16:22:45 -0800 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitDate

[PATCH 1/2] perf/trace: call machine__exit() at exiting

2017-11-07 Thread Andrei Vagin
alho de Melo <a...@kernel.org> Cc: Alexander Shishkin <alexander.shish...@linux.intel.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Namhyung Kim <namhy...@kernel.org> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- tools/perf/builtin-trace.c | 10 ++ 1 file changed,

[PATCH 2/2] perf/trace: fix an exit code of trace__symbols_init

2017-11-07 Thread Andrei Vagin
n <alexander.shish...@linux.intel.com> Cc: Jiri Olsa <jo...@redhat.com> Cc: Namhyung Kim <namhy...@kernel.org> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- tools/perf/builtin-trace.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/bu

Re: lost path_put in perf_fill_ns_link_info

2017-11-07 Thread Andrei Vagin
On Tue, Nov 07, 2017 at 11:03:18AM -0800, Andrei Vagin wrote: > Hi Vasily and all, > > The patch looks correct for me. I tried to reproduce this issue and > checked that this patch fixes it. Bellow you can find my test program > and a command line to run it. The problem st

Re: lost path_put in perf_fill_ns_link_info

2017-11-07 Thread Andrei Vagin
Hi Vasily and all, The patch looks correct for me. I tried to reproduce this issue and checked that this patch fixes it. Bellow you can find my test program and a command line to run it. The problem still exists even with this patch. $ cat test.c #define _GNU_SOURCE #include int main(int argc,

[PATCH v2] pid: restore the old behaviour of the ns_last_pid sysctl

2017-11-06 Thread Andrei Vagin
cked-by: Oleg Nesterov <o...@redhat.com> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- kernel/pid_namespace.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index fea2c24fa460..0b53eef7d34b 100644 ---

[PATCH] pid: restore the old behaviour of the ns_last_pid sysctl

2017-11-03 Thread Andrei Vagin
ite to ns_last_pid, a process will get the pid . This patch restores the old behaviour. fixes: ("pid: replace pid bitmap implementation with IDR API") Cc: Gargi Sharma <gs051...@gmail.com> Cc: Oleg Nesterov <o...@redhat.com> Signed-off-by: Andrei Vagin <av

Re: [PATCH] [RFC] vm: add a syscall to map a process memory into a pipe

2017-11-01 Thread Andrei Vagin
Hi Michael, On Mon, Oct 30, 2017 at 01:47:31PM +0100, Michael Kerrisk (man-pages) wrote: > On 10 August 2017 at 20:46, Andrei Vagin <ava...@openvz.org> wrote: > > It is a hybrid of process_vm_readv() and vmsplice(). > > > > vmsplice can map memory from a curren

Re: [PATCH 1/3] x86/entry: Fix idtentry unwind hint

2017-10-26 Thread Andrei Vagin
On Thu, Oct 26, 2017 at 10:24:29AM -0500, Josh Poimboeuf wrote: > On Wed, Oct 25, 2017 at 02:07:38PM -0700, Andrei Vagin wrote: > > Hi Josh, > > > > Here is one more warning: > > [5.852094] WARNING: can't dereference iret registers at > > b6ce01b7ffe0 for

[PATCH 2/3] x86: Write up the process_vmsplice syscall

2017-10-25 Thread Andrei Vagin
Signed-off-by: Andrei Vagin <ava...@openvz.org> --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index 448ac2

[PATCH 1/3] [v2] vm: add a syscall to map a process memory into a pipe

2017-10-25 Thread Andrei Vagin
...@joshtriplett.org> Cc: Jann Horn <ja...@google.com> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- fs/splice.c | 223 ++ include/linux/compat.h| 3 + include/linux/syscalls.h | 4 + inclu

[PATCH 3/3] test: add a test for the process_vmsplice syscall

2017-10-25 Thread Andrei Vagin
This test checks that process_vmsplice() can splice pages from a remote process and returns EFAULT, if process_vmsplice() tries to splice pages by an unaccessiable address. Signed-off-by: Andrei Vagin <ava...@openvz.org> --- tools/testing/selftests/process_vmsplice/Makefile

Re: [PATCH 1/3] x86/entry: Fix idtentry unwind hint

2017-10-25 Thread Andrei Vagin
is dependent on whether the exception has an > error code. > > Reported-and-tested-by: Andrei Vagin <ava...@virtuozzo.com> > Fixes: 8c1f75587a18 ("x86/entry/64: Add unwind hint annotations") > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> > --- > ar

Re: [RFC] net/unix_diag: Provide UDIAG_SHOW_VFS2 attribute to fetch complete inode number

2017-10-24 Thread Andrei Vagin
On Wed, Oct 25, 2017 at 12:48:14AM +0300, Cyrill Gorcunov wrote: > Currently unix_diag_vfs structure reports unix socket inode > as u32 value which of course doesn't fit to ino_t type and BTW: As far as I understand, it is not a problem right now, because get_next_ino returns int. And I'm agree

Re: [v6,1/2] pid: Replace pid bitmap implementation with IDR API

2017-10-20 Thread Andrei Vagin
On Fri, Oct 20, 2017 at 05:06:47PM +0100, Gargi Sharma wrote: > On Thu, Oct 19, 2017 at 5:18 PM, Oleg Nesterov <o...@redhat.com> wrote: > > On 10/19, Andrei Vagin wrote: > >> > >> Hi Gargi, > >> > >> This patch break

Re: [2/2] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in kconfig for 64-bit

2017-10-20 Thread Andrei Vagin
On Thu, Oct 19, 2017 at 08:28:04PM -0500, Josh Poimboeuf wrote: > On Thu, Oct 19, 2017 at 03:35:22PM -0700, Andrei Vagin wrote: > > On Thu, Oct 19, 2017 at 01:16:55PM -0500, Josh Poimboeuf wrote: > > > On Thu, Oct 19, 2017 at 09:51:04AM -0700, Andrei Vagin wrote: > > >

Re: [2/2] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in kconfig for 64-bit

2017-10-19 Thread Andrei Vagin
On Thu, Oct 19, 2017 at 03:35:22PM -0700, Andrei Vagin wrote: > On Thu, Oct 19, 2017 at 01:16:55PM -0500, Josh Poimboeuf wrote: > > On Thu, Oct 19, 2017 at 09:51:04AM -0700, Andrei Vagin wrote: > > > Hi, > > > > > > We run CRIU tests for tip/auto-late

Re: [2/2] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in kconfig for 64-bit

2017-10-19 Thread Andrei Vagin
On Thu, Oct 19, 2017 at 01:16:55PM -0500, Josh Poimboeuf wrote: > On Thu, Oct 19, 2017 at 09:51:04AM -0700, Andrei Vagin wrote: > > Hi, > > > > We run CRIU tests for tip/auto-latest regularly, and a few days ago our > > test job started to detect t

Re: [2/2] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in kconfig for 64-bit

2017-10-19 Thread Andrei Vagin
Hi, We run CRIU tests for tip/auto-latest regularly, and a few days ago our test job started to detect this warning in a kernel log: [ 44.235786] WARNING: can't dereference iret registers at 8801c5f17fe0 for ip 95f0d94b What does it mean? How critical is it? Our test job fails

Re: [v6,1/2] pid: Replace pid bitmap implementation with IDR API

2017-10-19 Thread Andrei Vagin
Hi Gargi, This patch breaks CRIU, because it changes a meaning of ns_last_pid. == Run zdtm/static/env00 in h == DEP env00.d CCenv00.o LINK env00 Start test ./env00 --pidfile=env00.pid --outfile=env00.out --envname=ENV_00_TEST

Re: [1/2,v2] fdmap(2)

2017-10-12 Thread Andrei Vagin
On Wed, Oct 11, 2017 at 09:12:34PM +0300, Alexey Dobriyan wrote: > On Tue, Oct 10, 2017 at 03:08:06PM -0700, Andrei Vagin wrote: > > On Sun, Sep 24, 2017 at 11:06:20PM +0300, Alexey Dobriyan wrote: > > > From: Aliaksandr Patseyenak <aliaksandr_patseyen...@epam.com> >

Re: [1/2,v2] fdmap(2)

2017-10-10 Thread Andrei Vagin
On Sun, Sep 24, 2017 at 11:06:20PM +0300, Alexey Dobriyan wrote: > From: Aliaksandr Patseyenak > > Implement system call for bulk retrieveing of opened descriptors > in binary form. > > Some daemons could use it to reliably close file descriptors > before

Re: [PATCH] kcmp: Drop branch leftover typo

2017-09-18 Thread Andrei Vagin
Acked-by: Andrei Vagin <ava...@virtuozzo.com> Fixes: 0791e3644e5e ("kcmp: add KCMP_EPOLL_TFD mode to compare epoll target files") On Sun, Sep 17, 2017 at 07:58:38PM +0300, Cyrill Gorcunov wrote: > The else branch been leftover and escaped the source > code refresh. No

Re: [PATCH] x86/idt: Fix the X86_TRAP_BP gate

2017-09-01 Thread Andrei Vagin
On Fri, Sep 01, 2017 at 10:26:30AM +0200, Ingo Molnar wrote: > > Hi Andrei, > > * Andrei Vagin <ava...@virtuozzo.com> wrote: > > > Hi Thomas, > > > > We run CRIU tests for linux-next and today they detected an issue. I've > > bisected this problem

Re: [tip:x86/apic] x86/idt: Move IST stack based traps to table init

2017-09-01 Thread Andrei Vagin
Hi Thomas, We run CRIU tests for linux-next and today they detected an issue. I've bisected this problem and it looks like a problem is in this patch. [root@fc24 criu]# python ./test/zdtm.py run -t zdtm/static/env00 === Run 1/1 zdtm/static/env00 == Run

Re: [PATCH] [RFC] vm: add a syscall to map a process memory into a pipe

2017-08-12 Thread Andrei Vagin
On Thu, Aug 10, 2017 at 09:42:44PM +0200, Jann Horn wrote: > On Thu, Aug 10, 2017 at 8:46 PM, Andrei Vagin <ava...@openvz.org> wrote: > > It is a hybrid of process_vm_readv() and vmsplice(). > > > > vmsplice can map memory from a current address space into a pipe. &g

[PATCH] [RFC] vm: add a syscall to map a process memory into a pipe

2017-08-10 Thread Andrei Vagin
rtuozzo.com> Cc: Michael Kerrisk <mtk.manpa...@gmail.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Andrew Morton <a...@linux-foundation.org> Signed-off-by: Andrei Vagin <ava...@openvz.org> --- fs/splice.c | 219 +

Re: [PATCH 8/8] signal: Remove kernel interal si_code magic

2017-07-12 Thread Andrei Vagin
On Fri, Jun 30, 2017 at 07:39:06AM -0500, Eric W. Biederman wrote: > struct siginfo is a union and the kernel since 2.4 has been hiding a union > tag in the high 16bits of si_code using the values: > __SI_KILL > __SI_TIMER > __SI_POLL > __SI_FAULT > __SI_CHLD > __SI_RT > __SI_MESGQ > __SI_SYS > >

Re: [CRIU] BUG: Dentry ffff9f795a08fe60{i=af565f, n=lo} still in use (1) [unmount of proc proc]

2017-07-07 Thread Andrei Vagin
On Thu, Jul 06, 2017 at 08:41:00AM -0500, Eric W. Biederman wrote: > Andrei Vagin <ava...@gmail.com> writes: > > > I did a few experiments and found that the bug is reproduced for 6-12 > > hours on the our test server. Then I reverted two patches and the server > >

lockdep reports possible recursive locking for sb_writers from do_iter_write and do_sendfile

2017-07-07 Thread Andrei Vagin
Hello, We run CRIU tests for Linus' tree and today we found this warning: [ 27.131931] [ 27.132008] WARNING: possible recursive locking detected [ 27.132085] 4.12.0+ #1 Not tainted [ 27.132158] [

Re: [PATCH] selftests/nsfs: create kconfig fragments

2017-07-05 Thread Andrei Vagin
e_config.sh. > Acked-by: Andrei Vagin <ava...@virtuozzo.com> Thank you. > Signed-off-by: Naresh Kamboju <naresh.kamb...@linaro.org> > --- > tools/testing/selftests/nsfs/config | 3 +++ > 1 file changed, 3 insertions(+) > create mode 100644 tools/testing/selftests/ns

Re: [PATCH] ptrace: Add compat PTRACE_{G,S}ETSIGMASK handlers

2017-07-05 Thread Andrei Vagin
> > If ptrace_request()s code is used userspace will read the most > significant u32 where it expected the least significant. > > Instead of duplicating ptrace_request()s code as a special case in > the arch code, handle it here. > Acked-by: Andrei Vagin <ava...@openvz.o

Re: [CRIU] BUG: Dentry ffff9f795a08fe60{i=af565f, n=lo} still in use (1) [unmount of proc proc]

2017-07-03 Thread Andrei Vagin
On Fri, Jun 30, 2017 at 12:11:07PM -0700, Andrei Vagin wrote: > On Thu, Jun 29, 2017 at 08:42:23PM -0500, Eric W. Biederman wrote: > > Andrei Vagin <ava...@gmail.com> writes: > > > > > On Thu, Jun 29, 2017 at 12:06 PM, Eric W. Biederman > > > <ebied..

Re: [CRIU] BUG: Dentry ffff9f795a08fe60{i=af565f, n=lo} still in use (1) [unmount of proc proc]

2017-06-30 Thread Andrei Vagin
On Thu, Jun 29, 2017 at 08:42:23PM -0500, Eric W. Biederman wrote: > Andrei Vagin <ava...@gmail.com> writes: > > > On Thu, Jun 29, 2017 at 12:06 PM, Eric W. Biederman > > <ebied...@xmission.com> wrote: > >> Andrei Vagin <ava...@gmail.com> writes: &g

Re: BUG: Dentry ffff9f795a08fe60{i=af565f,n=lo} still in use (1) [unmount of proc proc]

2017-06-29 Thread Andrei Vagin
On Thu, Jun 29, 2017 at 12:06 PM, Eric W. Biederman <ebied...@xmission.com> wrote: > Andrei Vagin <ava...@gmail.com> writes: > >> Hello, >> >> We run CRIU tests on linus' tree and today we found this issue. >> >> CRIU tests are the set of small prog

  1   2   3   >