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] [day] [month] [year] [list]
Date:   Wed, 9 May 2018 19:34:07 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: test /proc/*/fd a bit (+ PF_KTHREAD is ABI!)

On Tue, May 08, 2018 at 03:39:20PM -0700, Andrew Morton wrote:
> On Sat, 5 May 2018 03:04:14 +0300 Alexey Dobriyan <adobriyan@...il.com> wrote:

> > This field is struct task_struct::flags in decimal!
> > Check is done by testing PF_KTHREAD flags like we do in kernel.
> > 
> > 	PF_KTREAD value is a part of userspace ABI !!!
> 
> erk.  Well if there's a need the we could export and support some
> stable interface.  I wonder how ps determines this.

Turned out ps (from procps-ng) reads /proc/*/cmdline and if read()
returns 0 prints [] brackets. This is unreliable as

	execve("", NULL, NULL);

exists and processes can empty their argv/envp area.

It can do sorting based on "flags" field, so we hopefully can just mask
most of the bits.

At least it deals with ->comm containing ')' right.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ