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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 27 Sep 2017 16:31:06 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Roman Gushchin <guro@...com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        <linux-mm@...ck.org>, Alexander Viro <viro@...iv.linux.org.uk>,
        Ingo Molnar <mingo@...nel.org>, <kernel-team@...com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RESEND] proc, coredump: add CoreDumping flag to
 /proc/pid/status

On Wed, 20 Sep 2017 16:06:34 -0700 Roman Gushchin <guro@...com> wrote:

> Right now there is no convenient way to check if a process is being
> coredumped at the moment.
> 
> It might be necessary to recognize such state to prevent killing
> the process and getting a broken coredump.
> Writing a large core might take significant time, and the process
> is unresponsive during it, so it might be killed by timeout,
> if another process is monitoring and killing/restarting
> hanging tasks.
> 
> To provide an ability to detect if a process is in the state of
> being coreduped, we can expose a boolean CoreDumping flag
> in /proc/pid/status.
> 
> Example:
> $ cat core.sh
>   #!/bin/sh
> 
>   echo "|/usr/bin/sleep 10" > /proc/sys/kernel/core_pattern
>   sleep 1000 &
>   PID=$!
> 
>   cat /proc/$PID/status | grep CoreDumping
>   kill -ABRT $PID
>   sleep 1
>   cat /proc/$PID/status | grep CoreDumping
> 
> $ ./core.sh
>   CoreDumping:	0
>   CoreDumping:	1

I assume you have some real-world use case which benefits from this.

>  fs/proc/array.c | 6 ++++++
>  1 file changed, 6 insertions(+)

A Documentation/ would be appropriate?   Include a brief mention of
*why* someone might want to use this...


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ