lists.openwall.net   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  linux-cve-announce  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]
Message-ID: <CALCETrV2WZ3m82D4THfxvmASW8AOf1SN7Pu14vE0jMORupO5xw@mail.gmail.com>
Date:	Tue, 25 Jun 2013 15:01:35 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Cyrill Gorcunov <gorcunov@...il.com>
Cc:	Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: Expose /proc/<pid>/task/<tid>/children unconditionally

On Tue, Jun 25, 2013 at 2:52 PM, Cyrill Gorcunov <gorcunov@...il.com> wrote:
> On Tue, Jun 25, 2013 at 02:36:31PM -0700, Andy Lutomirski wrote:
>> On Tue, Jun 25, 2013 at 1:17 PM, Oleg Nesterov <oleg@...hat.com> wrote:
>> > On 06/26, Cyrill Gorcunov wrote:
>> >>
>> >> On Tue, Jun 25, 2013 at 12:51:45PM -0700, Andy Lutomirski wrote:
>> >> > This is currently only available if CONFIG_CHECKPOINT_RESTORE, which
>> >> > is hidden under CONFIG_EXPERT.  It's generally useful functionality,
>> >> > though, so expose it unconditionally.
>> >> >
>> >> > Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
>> >> > Signed-off-by: Andy Lutomirski <luto@...capital.net>
>> >> Acked-by: Cyrill Gorcunov <gorcunov@...nvz.org>
>> >
>> > I didn't see the patch but I guess it is trivial and I agree with intent ;)
>>
>> The patch works, but "children" is only listed under task/<tid>, not
>> under /proc/<pid>.  Is that intentional?  Fixing it would be a
>> one-liner.
>
> Yeah, it's intentional. Here some explanations from Oleg (check out
> the whole thread, it's not that big https://lkml.org/lkml/2011/12/9/220)
> in short this might require some more code, but i'll re-check tomorrow.

This is a little strange.  It looks like ppid (in status) shows the
tgid, but the actual real_parent can refer to a thread (as opposed to
a thread group leader), and task/tid/children respects that.  So the
tree that you get by following task/tid/ children won't be quite the
same as the tree you get by following ppid.

I wonder if the ptid should be added to status.  Is there anything
(other than task/tid/children) that cased which thread is the parent
of a given task?

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ