On Sun, Nov 15, 2020 at 10:36 AM Hui Su wrote:
>
> timens_on_fork() always return 0, and maybe not
> need to judge the return value in copy_namespaces().
Thank you for cleaning this up. I think we can go even further and
change timens_on_fork to return nothing:
-int timens_on_fork(struct nsproxy
On Sun, Oct 13, 2019 at 9:28 PM kbuild test robot wrote:
>
> Hi Dmitry,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on linus/master]
> [cannot apply to v5.4-rc2 next-20191011]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> i
On Thu, Sep 27, 2018 at 11:41:49PM +0200, Thomas Gleixner wrote:
> On Thu, 27 Sep 2018, Thomas Gleixner wrote:
> > Add time skew via NTP/PTP into the picture and you might have to adjust
> > timers as well, because you need to guarantee that they are not expiring
> > early.
> >
> > I haven't looke
On Mon, Oct 01, 2018 at 11:15:32AM +0200, Eric W. Biederman wrote:
>
> In the context of process migration there is a simpler subproblem that I
> think it is worth exploring if we can do something about.
>
> For a cluster of machines all running with synchronized
> clocks. CLOCK_REALTIME matches.
On Tue, Sep 25, 2018 at 12:02:32AM +0200, Eric W. Biederman wrote:
> Andrey Vagin writes:
>
> > On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote:
> >> Dmitry Safonov writes:
> >>
> >> > Discussions around time virtualization are there
On Fri, Sep 21, 2018 at 02:27:29PM +0200, Eric W. Biederman wrote:
> Dmitry Safonov writes:
>
> > Discussions around time virtualization are there for a long time.
> > The first attempt to implement time namespace was in 2006 by Jeff Dike.
> > From that time, the topic appears on and off in vario
On Thu, Aug 16, 2018 at 06:18:35PM +0300, Cyrill Gorcunov wrote:
> On Thu, Aug 16, 2018 at 09:51:36AM -0500, Eric W. Biederman wrote:
> ...
> >
> > That patch is incorrect as it misses the rcu_read_unlock.
> > >
> > > p.s. Andrew noticed the problem and asked me to notify,
> > > also he has been t
On Thu, Jun 14, 2018 at 07:00:07AM -0400, Jeff Layton wrote:
> On Fri, 2018-06-08 at 17:27 +0300, Konstantin Khorenko wrote:
> > Currently if we face a lock taken by a process invisible in the current
> > pidns we skip the lock completely, but this
> >
> > 1) makes the output not that nice
> >
On Fri, Jun 08, 2018 at 05:27:12PM +0300, Konstantin Khorenko wrote:
> Currently if we face a lock taken by a process invisible in the current
> pidns we skip the lock completely, but this
>
> 1) makes the output not that nice
> (root@vz7)/: cat /proc/${PID_A2}/fdinfo/3
> pos:4
> f
/proc/${PID_A2}/fdinfo/3
> pos:4
> flags: 0212
> mnt_id: 257
> lock: (root@vz7)/:
>
> After the patch:
> ===
> (root@vz7)/:cat /proc/${PID_A2}/fdinfo/3
> pos:4
> flags: 0212
> mnt_id: 295
> lock: 1: FLOCK ADVISORY WRITE $
On Tue, Jan 24, 2017 at 02:03:23PM +1300, Eric W. Biederman wrote:
> Andrei Vagin writes:
>
> > Now a shared group can be only inherited from a source mount.
> > This patch adds an ability to add a mount into an existing shared
> > group.
>
> This sounds like a lot of the discussion on bind mounts
On Tue, Dec 13, 2016 at 11:34 AM, Nikolay Borisov
wrote:
>
>
> On 13.12.2016 20:51, Eric W. Biederman wrote:
>> Nikolay Borisov writes:
>>
>>> So this thing resurfaced again and I took a hard look into the code but
>>> couldn't find anything suspicious. So the allocating and freeing
>>> contexts
On Mon, Oct 24, 2016 at 01:59:59PM +0300, Cyrill Gorcunov wrote:
> Hi Eric! A few days ago we've noticed that our zombie00 test case started
> failing:
> https://ci.openvz.org/job/CRIU/view/All/job/CRIU-linux-next/406/console
> ---
> Run zdtm/static/zombie00 in h
> ==
Hi Cong,
On Thu, Oct 20, 2016 at 10:25 PM, Andrey Vagin wrote:
> On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote:
>> On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote:
>>> No one can see these events, because a network namespace can not be
>>> destroyed, if it has
On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote:
> On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote:
>> No one can see these events, because a network namespace can not be
>> destroyed, if it has sockets.
>>
>
> Are you sure? kobject_uevent_env() seems sending uevents to all
> network namespa
On Thu, Oct 13, 2016 at 2:46 PM, Andrei Vagin wrote:
> On Thu, Oct 13, 2016 at 02:53:46PM -0500, Eric W. Biederman wrote:
>>
>> Adrei Vagin pointed out that time to executue propagate_umount can go
>> non-linear (and take a ludicrious amount of time) when the mount
>> propogation trees of the moun
On Tue, Aug 30, 2016 at 7:41 PM, Serge E. Hallyn wrote:
> On Fri, Aug 26, 2016 at 04:08:08PM -0700, Andrei Vagin wrote:
>> From: Andrey Vagin
>>
>> Return -EPERM if an owning user namespace is outside of a process
>> current user namespace.
>>
>> v2: I
On Tue, Aug 30, 2016 at 7:56 PM, Serge E. Hallyn wrote:
> On Fri, Aug 26, 2016 at 04:08:08PM -0700, Andrei Vagin wrote:
>> +struct ns_common *ns_get_owner(struct ns_common *ns)
>> +{
>> + struct user_namespace *my_user_ns = current_user_ns();
>> + struct user_namespace *owner, *p;
>> +
>>
On Thu, Jul 21, 2016 at 11:48 PM, Michael Kerrisk (man-pages)
wrote:
> Hi Andrey,
>
>
> On 07/21/2016 11:06 PM, Andrew Vagin wrote:
>>
>> On Thu, Jul 21, 2016 at 04:41:12PM +0200, Michael Kerrisk (man-pages)
>> wrote:
>>>
>>> Hi Andrey,
&g
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/Makefile| 1 +
tools/testing/selftests/lookup/.gitignore | 1 +
tools/testing/selftests/lookup/Makefile | 8 +++
tools/testing/selftests/lookup/lookup_at_root.c | 71 +
tools/testing
t;
Cc: Arnd Bergmann
Cc: "J. Bruce Fields"
Cc: Miklos Szeredi
Cc: NeilBrown
Cc: Shuah Khan
Cc: Omar Sandoval
Signed-off-by: Andrey Vagin
Andrey Vagin (3):
namei: add LOOKUP_DFD_ROOT to use dfd as root
fs: allow to use dirfd as root for openat and
and in this case we need these
new flags O_ATROOT or AT_FDROOT.
If O_ATROOT is set for openat() or AT_FDROOT is set for fstatat, linkat,
unlinkat, path_init is executed with the LOOKUP_DFD_ROOT flag.
v2: fix a value of O_ATROOT to not intersect with other constans
Signed-off-by: Andrey Vagin
this we add this new flag.
If LOOKUP_DFD_ROOT is set, path_init() initializes nd->root and nd->path
to the same value.
Changes since v1:
* initialize nd->root_seq (thanks to Omar Sandoval for reporting and
fixing this issue)
Cc: Omar Sandoval
Signed-off-by: Andrey Vagin
---
f
Pid and user namepaces are hierarchical. There is no way to discover
parent-child relationships.
In a future we will use this interface to dump and restore nested
namespaces.
Signed-off-by: Andrey Vagin
---
fs/nsfs.c | 4
include/linux/proc_ns.h | 1 +
include/uapi
, Eric W. Biederman proposed to use ioctl-s for
this purpose.
The NS_GET_USERNS ioctl returns a file descriptor to an owning user
namespace.
It returns EPERM if a target namespace is outside of a current user
namespace.
Link: https://lkml.org/lkml/2016/7/6/158
Signed-off-by: Andrey Vagin
---
fs
ommon.
Originally this idea was suggested by James Bottomley.
Signed-off-by: Andrey Vagin
---
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/tun.c | 4 ++--
fs/mount.h | 1 -
fs/namespace.c | 14 +++--
.
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/nsfs/Makefile | 12 +
tools/testing/selftests/nsfs/owner.c | 91 +++
tools/testing/selftests/nsfs/pidns.c | 74
4 files changed
Return -EPERM if an owning user namespace is outside of a process
current user namespace.
Signed-off-by: Andrey Vagin
---
include/linux/user_namespace.h | 7 +++
kernel/user_namespace.c| 24
2 files changed, 31 insertions(+)
diff --git a/include/linux
Hello,
I forgot to add --cc-cover for git send-email, so everyone who is in
Cc got only a cover letter. All messages were sent in mail lists.
Sorry for inconvenience.
On Thu, Jul 14, 2016 at 11:20 AM, Andrey Vagin wrote:
> Each namespace has an owning user namespace and now there is not
ommon.
Originally this idea was suggested by James Bottomley.
Signed-off-by: Andrey Vagin
---
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/tun.c | 4 ++--
fs/mount.h | 1 -
fs/namespace.c | 14 +++--
Pid and user namepaces are hierarchical. There is no way to discover
parent-child relationships.
In a future we will use this interface to dump and restore nested
namespaces.
Signed-off-by: Andrey Vagin
---
fs/nsfs.c | 4
include/linux/proc_ns.h | 1 +
include/uapi
.
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/nsfs/Makefile | 12 +
tools/testing/selftests/nsfs/owner.c | 91 +++
tools/testing/selftests/nsfs/pidns.c | 74
4 files changed
Return -EPERM if an owning user namespace is outside of a process
current user namespace.
Signed-off-by: Andrey Vagin
---
include/linux/user_namespace.h | 7 +++
kernel/user_namespace.c| 24
2 files changed, 31 insertions(+)
diff --git a/include/linux
, Eric W. Biederman proposed to use ioctl-s for
this purpose.
The NS_GET_USERNS ioctl returns a file descriptor to an owning user
namespace.
It returns EPERM if a target namespace is outside of a current user
namespace.
Link: https://lkml.org/lkml/2016/7/6/158
Signed-off-by: Andrey Vagin
---
fs
Each namespace has an owning user namespace and now there is not way
to discover these relationships.
Pid and user namepaces are hierarchical. There is no way to discover
parent-child relationships too.
Why we may want to know relationships between namespaces?
One use would be visualization, in
On Fri, Jul 1, 2016 at 5:55 PM, Omar Sandoval wrote:
> On Tue, Jun 28, 2016 at 10:38:28AM -0700, Andrey Vagin wrote:
>> The problem is that a pathname can contain absolute symlinks and now
>> they are resolved relative to the current root.
>>
>> If we want to o
this we add this new flag.
If LOOKUP_DFD_ROOT is set, path_init() initializes nd->root and nd->path
to the same value.
Changes since v1:
* initialize nd->root_seq (thanks to Omar Sandoval for reporting and
fixing this issue)
Cc: Omar Sandoval
Signed-off-by: Andrey Vagin
---
f
ink to /run.
Changes since the first version:
- change a value of O_ATROOT to not intersect with other constants.
Cc: Alexander Viro
Cc: "Eric W. Biederman"
Cc: Arnd Bergmann
Cc: "J. Bruce Fields"
Cc: Miklos Szeredi
Cc: NeilBrown
Cc: Shuah Khan
Signed-off-by: Andrey Vag
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/Makefile| 1 +
tools/testing/selftests/lookup/.gitignore | 1 +
tools/testing/selftests/lookup/Makefile | 8 +++
tools/testing/selftests/lookup/lookup_at_root.c | 71 +
tools/testing
and in this case we need these
new flags O_ATROOT or AT_FDROOT.
If O_ATROOT is set for openat() or AT_FDROOT is set for fstatat, linkat,
unlinkat, path_init is executed with the LOOKUP_DFD_ROOT flag.
v2: fix a value of O_ATROOT to not intersect with other constans
Signed-off-by: Andrey Vagin
this we add this new flag.
If LOOKUP_DFD_ROOT is set, path_init() initializes nd->root and nd->path
to the same value.
Signed-off-by: Andrey Vagin
---
fs/namei.c| 12 +++-
include/linux/namei.h | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/fs/n
bed above.
Cc: Pavel Emelyanov
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
Signed-off-by: Andrey Vagin
---
include/uapi/linux/tcp.h | 10 +
net/ipv4/tcp.c | 57 ++
_ATROOT);
close(dirfd);
One more thing is that chroot isn't avaliable for unprivileged users.
We met this problem, when we tryed to dump an ubuntu container and
failed to resolve /proc/PID/root/var/run/mysqld/mysqld.sock, because
/var/run was a symlink to /run.
Cc: Alexander Vir
this we add this new flag.
Signed-off-by: Andrey Vagin
---
fs/namei.c| 12 +++-
include/linux/namei.h | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/fs/namei.c b/fs/namei.c
index 70580ab..5f08b69 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2148,7
namespace and in this case you
can use a new flag O_ATROOT or AT_FDROOT.
Signed-off-by: Andrey Vagin
---
fs/exec.c| 4 +++-
fs/namei.c | 10 ++
fs/open.c| 6 +-
fs/stat.c| 4 +++-
fs/utimes.c
this seq, becuse tcp_sequence() returns false (seq < tp->rcv_nxt).
Cc: Pavel Emelyanov
Cc: "David S. Miller"
Cc: Alexey Kuznetsov
Cc: James Morris
Cc: Hideaki YOSHIFUJI
Cc: Patrick McHardy
Signed-off-by: Andrey Vagin
---
net/ipv4/tcp_output.c | 4
1 file changed, 4 inserti
Hi Stephen,
On Wed, May 4, 2016 at 1:22 PM, Stephen Hemminger
wrote:
> I understand how reading /proc or /sys can be a bottleneck, but this
> proposed method using a system call is the wrong way to do this.
>
> Why not use netlink like other systems do which allows a message
> based response whic
It's going to be used in task_diag
Signed-off-by: Andrey Vagin
---
fs/proc/base.c | 6 +-
fs/proc/internal.h | 6 ++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 614f1d0..9e5fd1c 100644
--- a/fs/proc/base.c
+++ b/fs/proc/b
:
| struct task_diag_vma | filename | ...
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
fs/proc/internal.h | 21
fs/proc/task_diag.c| 279 -
fs/proc/task_mmu.c | 18 +--
include/uapi/linux/task_diag.h | 85
instead of netlink
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
fs/proc/Kconfig| 13 ++
fs/proc/Makefile | 3 +
fs/proc/task_diag.c| 424 +
include/uapi/linux/task_diag.h | 66 +++
4 files changed, 506
This function will be used in task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/array.c| 53 +
fs/proc/internal.h | 3 +++
2 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index b6c00ce
Signed-off-by: Andrey Vagin
---
fs/proc/task_diag.c| 92 ++
include/uapi/linux/task_diag.h | 15 +++
2 files changed, 107 insertions(+)
diff --git a/fs/proc/task_diag.c b/fs/proc/task_diag.c
index cd10374..c8499f2 100644
--- a/fs/proc
Signed-off-by: Andrey Vagin
---
fs/proc/task_diag.c| 79 ++
include/uapi/linux/task_diag.h | 21 +++
2 files changed, 100 insertions(+)
diff --git a/fs/proc/task_diag.c b/fs/proc/task_diag.c
index c8499f2..3dc3617 100644
--- a/fs/proc
If all information about a process don't fit in a message, it's marked
by the TASK_DIAG_FLAG_CONT flag and the next message will describe the
same process.
Signed-off-by: Andrey Vagin
---
fs/proc/task_diag.c| 3 +++
include/uapi/linux/task_diag.h | 2 ++
2 files
Here are two test (example) programs.
task_diag - request information for two processes.
test_diag_all - request information about all processes
v2: Fixes from David Ahern:
* task_diag: Fix 8-byte alignment for vma and vma_stats
Signed-off-by: Andrey Vagin
---
tools/testing/selftests
From: David Ahern
Add option to fork threads as well as processes.
Make the sleep time configurable too so that spawned
tasks exit on their own.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/task_diag/Makefile | 2 ++
tools/testing/selftests/task_diag
Signed-off-by: Andrey Vagin
---
Documentation/accounting/task_diag.txt | 57 ++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/accounting/task_diag.txt
diff --git a/Documentation/accounting/task_diag.txt
b/Documentation/accounting
From: David Ahern
threads of a process share the same VMAs, so when dumping all threads
for all processes only push vma data for group leader.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
fs/proc/task_diag.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion
Now we can dump all task or children, threads of a specified task.
It's an example how this interface can be expanded for different
use-cases.
v2: Fixes from David Ahern
Add missing break in iter_stop
Fix 8-byte alignment issues
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
fs
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/task_diag/_run.sh | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/task_diag/_run.sh
b/tools/testing/selftests/task_diag/_run.sh
index 559f02a..d2e8544 100755
--- a/tools/testing/selftests/task_diag/_run.sh
It will be more convenient when this function will be used in
task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/base.c | 8
fs/proc/internal.h | 4
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index b1755b2..614f1d0 100644
ode that creates netlink sockets suddenly starts capturing
> brand-new rights that didn't exist as part of a netlink socket before.
Cc: Oleg Nesterov
Cc: Andrew Morton
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Cc: Roger Luethi
Cc: Arnd Bergmann
Cc: Arnaldo Carvalho de Melo
Cc: David Ahern
Cc: Andy Lutomirski
Cc: Pavel Odintsov
Signed-off-by: Andrey Vagin
--
2.1.0
fsuid;
__u32 gid;
__u32 egid;
__u32 sgid;
__u32 fsgid;
};
This group is optional and it's filled only if show_flags contains
TASK_DIAG_SHOW_CRED.
Signed-off-by: Andrey Vagin
---
fs/proc/task_diag.c| 50 ++
include/uapi/
From: Andrey Vagin
__vfs_write() returns a negative value in a error case.
Cc: Ian Kent
Signed-off-by: Andrey Vagin
---
fs/autofs4/waitq.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 0146d91..631f155 100644
--- a/fs
0xbb/0x150
[] SyS_mkdir+0x7a/0xe0
[] entry_SYSCALL_64_fastpath+0x12/0x71
[] 0x
Fixes: e48453c386f3 ('block, cgroup: implement policy-specific per-blkcg data')
Signed-off-by: Andrey Vagin
---
block/blk-cgroup.c | 4
1 file changed, 4 insertions(+)
di
M -0700, Andy Lutomirski wrote:
>>> >> On Mon, Jul 6, 2015 at 1:47 AM, Andrey Vagin wrote:
>>> >> > Currently we use the proc file system, where all information are
>>> >> > presented in text files, what is convenient for humans. But if we n
This function will be used in task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/base.c | 43 ---
include/linux/proc_fs.h | 7 +++
kernel/pid.c| 39 +++
3 files changed, 46 insertions(+), 43
;
__u32 suid;
__u32 fsuid;
__u32 gid;
__u32 egid;
__u32 sgid;
__u32 fsgid;
};
This group is optional and it's filled only if show_flags contains
TASK_DIAG_SHOW_CRED.
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h
For that we need to set NLM_F_DUMP. A response contain on a few packets.
Signed-off-by: Andrey Vagin
---
include/linux/taskstats_kern.h | 2 ++
kernel/taskdiag.c | 40
kernel/taskstats.c | 1 +
3 files changed, 43 insertions
This function will be used in task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/array.c | 67 ++---
1 file changed, 40 insertions(+), 27 deletions(-)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index ce065cf..52c4a7b 100644
--- a/fs/proc
Signed-off-by: Andrey Vagin
---
kernel/taskstats.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/taskstats.c b/kernel/taskstats.c
index d70f1e5..0c90d11 100644
--- a/kernel/taskstats.c
+++ b/kernel/taskstats.c
@@ -47,6 +47,7 @@ struct genl_family taskstats_family = {
.name
Currently if we add a new TASKSTATS_ constant, we will chanage all
CGROUPSTATS_ contants and break backward compatibility.
Signed-off-by: Andrey Vagin
---
include/uapi/linux/cgroupstats.h | 15 ---
include/uapi/linux/taskstats.h | 7 +++
2 files changed, 7 insertions(+), 15
Now we can dump all task or children of a specified task.
It's an example how this interface can be expanded for different
use-cases.
v2: Fixes from David Ahern
Add missing break in iter_stop
Fix 8-byte alignment issues
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
include
ask_diag.
Cc: Oleg Nesterov
Cc: Andrew Morton
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Cc: Roger Luethi
Cc: Arnd Bergmann
Cc: Arnaldo Carvalho de Melo
Cc: David Ahern
Cc: Andy Lutomirski
Cc: Pavel Odintsov
Signed-off-by: Andrey Vagin
--
2.1.0
--
To unsubscribe from this list: send the line "
The size of requested per-task data can be bigger that the size of one
netlink skb. Currently we are able to split data into a few netlink
messages.
v2: set NLM_F_MULTI for multipart packets
Signed-off-by: Andrey Vagin
---
kernel/taskdiag.c | 76
They will be used in task_diag
Signed-off-by: Andrey Vagin
---
fs/proc/base.c | 79 ++---
include/linux/proc_fs.h | 4 +++
kernel/pid.c| 76 +++
3 files changed, 82 insertions(+), 77
as:
| struct task_diag_vma | filename | ...
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 54 +
kernel/taskdiag.c | 255 -
2 files changed, 306 insertions(+), 3 deletions(-)
diff --git a/include
If a task has many vma-s, the size of information about them can be too
big to be placed into one skb.
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 1 +
kernel/taskdiag.c | 17 +
2 files changed, 18 insertions(+)
diff --git a/include/uapi/linux
It will be more convenient when this function will be used in
task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/base.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 88cf6ae..af797d9 100644
--- a/fs/proc/base.c
Signed-off-by: Andrey Vagin
---
Documentation/accounting/task_diag.txt | 53 ++
1 file changed, 53 insertions(+)
create mode 100644 Documentation/accounting/task_diag.txt
diff --git a/Documentation/accounting/task_diag.txt
b/Documentation/accounting
From: David Ahern
threads of a process share the same VMAs, so when dumping all threads
for all processes only push vma data for group leader.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
kernel/taskdiag.c | 17 +
1 file changed, 13 insertions(+), 4 deletions
Here are two test (example) programs.
task_diag - request information for two processes.
test_diag_all - request information about all processes
v2: Fixes from David Ahern:
* task_diag: Fix 8-byte alignment for vma and vma_stats
Signed-off-by: Andrey Vagin
---
tools/testing/selftests
Signed-off-by: Andrey Vagin
---
include/linux/taskstats_kern.h | 2 ++
include/uapi/linux/task_diag.h | 2 ++
kernel/taskdiag.c | 30 ++
kernel/taskstats.c | 2 +-
4 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/include/linux
It's going to be used in task_diag.
Signed-off-by: Andrey Vagin
---
fs/proc/array.c | 53 -
include/linux/proc_fs.h | 3 +++
kernel/pid.c| 53 +
3 files changed, 56 inser
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 1 +
kernel/taskdiag.c | 15 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/task_diag.h b/include/uapi/linux/task_diag.h
index 9e4c3c4..e1d09e6 100644
--- a/include
From: David Ahern
Add option to fork threads as well as processes.
Make the sleep time configurable too so that spawned
tasks exit on their own.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/task_diag/Makefile | 2 ++
tools/testing/selftests/task_diag
From: David Ahern
Add TGID attribute and put in every message. This is need for perf for
example when processing messages with maps.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 1 +
kernel/taskdiag.c | 8 +++-
2 files changed
From: David Ahern
New dump strategy to walk all threads of all processes.
Signed-off-by: David Ahern
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 7 +++---
kernel/taskdiag.c | 55 --
2 files changed, 52 insertions
The same information are shown in /proc/self/smaps.
v2: account the task_diag_vma_stat struct in taskdiag_packet_size()
Fix 8-byte alignment for vma and vma_stats // David Ahern
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
fs/proc/task_mmu.c | 14 +
include/linux
This macros will help users to use this interface.
v2: Fix task_diag_for_each_vma to work with libnl // David Ahern
Signed-off-by: Andrey Vagin
---
include/uapi/linux/task_diag.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/uapi/linux/task_diag.h b/include/uapi/linux
Add max attr enum
task diag: Send pid as u32
Change _MSG/msg references to base
Fix 8-byte alignment
Cc: David Ahern
Signed-off-by: Andrey Vagin
---
include/linux/taskstats_kern.h | 7 ++
include/uapi/linux/task_diag.h | 60 +++
include/uapi/linux/taskstats.h | 2
I don't see any reasons to hide them. This information can help to
understand errors.
And this information is required for correct checkpoint/restore of mount
namespaces.
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Cc: Eric W. Biederman
Cc: Alexander Viro
Signed-off-by: Andrey Vagin
--
Currently we check that execveat returns non-positive value
when an error is expected. But we need to check that execveat() doesn't
return zero in such cases too.
Cc: Shuah Khan
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/exec/execveat.c | 2 +-
1 file changed, 1 insertion(
Currently this test always returs zero code and a child process returns
non-zero code only if the last testcase failed.
v2: don't forget to return smth from ksft_exit()
Cc: Michael Ellerman
Cc: Shuah Khan
Cc: Cyrill Gorcunov
Signed-off-by: Andrey Vagin
---
tools/testing/selftests
Cc: Shuah Khan
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/exec/execveat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/exec/execveat.c
b/tools/testing/selftests/exec/execveat.c
index e238c95..6747a3f 100644
--- a/tools/testing
Currently this test always returs zero code and a child process returns
non-zero code only if the last testcase failed.
v2: don't forget to return smth from ksft_exit()
Cc: Michael Ellerman
Cc: Shuah Khan
Cc: Cyrill Gorcunov
Signed-off-by: Andrey Vagin
---
tools/testing/selftests
Currently this test always returs zero code and a child process returns
non-zero code only if the last testcase failed.
Cc: Shuah Khan
Cc: Cyrill Gorcunov
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/kcmp/kcmp_test.c | 16 ++--
tools/testing/selftests/kselftest.h
The main idea of this test is to check that locks are shown correctly
when they can't be placed in a default seq_file buffer due to its size.
Cc: Andrew Morton
Cc: Shuah Khan
Signed-off-by: Andrey Vagin
---
tools/testing/selftests/Makefile| 1 +
tools/testing/selftests/f
Cc: "J. Bruce Fields"
Cc: Andrew Morton
Cc: Cyrill Gorcunov
Cc: Pavel Emelyanov
Signed-off-by: Andrey Vagin
---
Documentation/filesystems/proc.txt | 4
fs/locks.c | 38 ++
fs/proc/fd.c | 27 +
For that we need to set NLM_F_DUMP. Currently here are no
filters. Any suggestions are welcome.
I think we can add request for children, threads, session or group
members.
Signed-off-by: Andrey Vagin
---
kernel/taskdiag.c | 41 +
1 file changed, 41
1 - 100 of 218 matches
Mail list logo