lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Jan 2017 13:07:35 +0100
From:   Oleg Nesterov <>
To:     Pavel Tikhomirov <>
Cc:     Ingo Molnar <>,
        Peter Zijlstra <>,
        Andrew Morton <>,
        Cyrill Gorcunov <>,
        John Stultz <>,
        Thomas Gleixner <>,
        Nicolas Pitre <>,
        Michal Hocko <>,
        Stanislav Kinsburskiy <>,
        Mateusz Guzik <>,,
        Pavel Emelyanov <>,
        Konstantin Khorenko <>
Subject: Re: [PATCH] introduce the walk_process_tree() helper

On 01/23, Oleg Nesterov wrote:
> Add the new helper to walk the process tree, the next patch adds a user.
> Note that it visits the group leaders only, proc_visitor can do
> for_each_thread itself or we can trivially extend walk_process_tree() to
> do this.

Please consider this patch as a preparation for your change, or feel free
to fold this code into your patch.

Now you can simply do

	int xxx(struct task_struct *p, void *data)
		if (p->signal->has_child_subreaper ||
			return 0;
		p->signal->has_child_subreaper = 1;
		return 1;

	walk_process_tree(xxx, NULL);

walk_process_tree() handles the sub-threads correctly, but "p" is always the
leader so is_child_reaper() is fine, but probably we need a new helper anyway.


Powered by blists - more mailing lists