public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kawai, Hidehiro" <hidehiro.kawai.ez@hitachi.com>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	dhowells@redhat.com, holt@sgi.com, alan@lxorguk.ukuu.org.uk,
	masami.hiramatsu.pt@hitachi.com, yumiko.sugita.yf@hitachi.com,
	soshima@redhat.com, haoki@redhat.com
Subject: Re: [PATCH 7/7] documentation for /proc/pid/coredump_filter
Date: Mon, 28 May 2007 20:43:22 +0900	[thread overview]
Message-ID: <465AC05A.80005@hitachi.com> (raw)
In-Reply-To: <20070527181729.e9e6d57c.randy.dunlap@oracle.com>

Hi Randy,

Randy Dunlap wrote:
> Looks good.  Just one typo below.
> 
>  ------------------------------------------------------------------------------
> 
>> Preface
>>@@ -2135,4 +2136,41 @@ those 64-bit counters, process A could s
>> More information about this can be found within the taskstats documentation in
>> Documentation/accounting.
>> 
>>+2.15 /proc/<pid>/coredump_filter - Core dump filtering settings
>>+---------------------------------------------------------------
>>+When a process is dumped, all anonymous memory is written to a core file as
>>+long as the size of the core file isn't limited. But sometimes we don't want
>>+to dump some memory segments, for example, huge shared memory. Conversely,
>>+sometimes we wnat to save file-backed memory segments into a core file, not
> 
>                 want
 
Thank you for your review.  I attached the fixed patch.

Best regards,
-- 
Hidehiro Kawai
Hitachi, Ltd., Systems Development Laboratory


Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
---
 Documentation/filesystems/proc.txt |   38 +++++++++++++++++++++++++++
 1 files changed, 38 insertions(+)

Index: linux-2.6.22-rc2-mm1/Documentation/filesystems/proc.txt
===================================================================
--- linux-2.6.22-rc2-mm1.orig/Documentation/filesystems/proc.txt
+++ linux-2.6.22-rc2-mm1/Documentation/filesystems/proc.txt
@@ -42,6 +42,7 @@ Table of Contents
   2.12	/proc/<pid>/oom_adj - Adjust the oom-killer score
   2.13	/proc/<pid>/oom_score - Display current oom-killer score
   2.14	/proc/<pid>/io - Display the IO accounting fields
+  2.15	/proc/<pid>/coredump_filter - Core dump filtering settings
 
 ------------------------------------------------------------------------------
 Preface
@@ -2135,4 +2136,41 @@ those 64-bit counters, process A could s
 More information about this can be found within the taskstats documentation in
 Documentation/accounting.
 
+2.15 /proc/<pid>/coredump_filter - Core dump filtering settings
+---------------------------------------------------------------
+When a process is dumped, all anonymous memory is written to a core file as
+long as the size of the core file isn't limited. But sometimes we don't want
+to dump some memory segments, for example, huge shared memory. Conversely,
+sometimes we want to save file-backed memory segments into a core file, not
+only the individual files.
+
+/proc/<pid>/coredump_filter allows you to customize which memory segments
+will be dumped when the <pid> process is dumped. coredump_filter is a bitmask
+of memory types. If a bit of the bitmask is set, memory segments of the
+corresponding memory type are dumped, otherwise they are not dumped.
+
+The following 4 memory types are supported:
+  - (bit 0) anonymous private memory
+  - (bit 1) anonymous shared memory
+  - (bit 2) file-backed private memory
+  - (bit 3) file-backed shared memory
+
+  Note that MMIO pages such as frame buffer are never dumped and vDSO pages
+  are always dumped regardless of the bitmask status.
+
+Default value of coredump_filter is 0x3; this means all anonymous memory
+segments are dumped.
+
+If you don't want to dump all shared memory segments attached to pid 1234,
+write 1 to the process's proc file.
+
+  $ echo 0x1 > /proc/1234/coredump_filter
+
+When a new process is created, the process inherits the bitmask status from its
+parent. It is useful to set up coredump_filter before the program runs.
+For example:
+
+  $ echo 0x7 > /proc/self/coredump_filter
+  $ ./some_program
+
 ------------------------------------------------------------------------------



      reply	other threads:[~2007-05-28 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-25 12:52 [PATCH 0/7] coredump: core dump masking support v5 Kawai, Hidehiro
2007-05-25 13:04 ` [PATCH 1/7] bound suid_dumpable sysctl Kawai, Hidehiro
2007-05-25 13:06 ` [PATCH 2/7] reimplementation of dumpable using two flags Kawai, Hidehiro
2007-05-25 13:07 ` [PATCH 3/7] add an interface for core dump filter Kawai, Hidehiro
2007-05-25 13:08 ` [PATCH 4/7] ELF: enable core dump filtering Kawai, Hidehiro
2007-05-25 13:10 ` [PATCH 5/7] ELF-FDPIC: remove an unused argument Kawai, Hidehiro
2007-05-25 13:11 ` [PATCH 6/7] ELF-FDPIC: enable core dump filtering Kawai, Hidehiro
2007-05-25 13:12 ` [PATCH 7/7] documentation for /proc/pid/coredump_filter Kawai, Hidehiro
2007-05-28  1:17   ` Randy Dunlap
2007-05-28 11:43     ` Kawai, Hidehiro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=465AC05A.80005@hitachi.com \
    --to=hidehiro.kawai.ez@hitachi.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dhowells@redhat.com \
    --cc=haoki@redhat.com \
    --cc=holt@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=randy.dunlap@oracle.com \
    --cc=soshima@redhat.com \
    --cc=yumiko.sugita.yf@hitachi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox