diff options
author | Jason Baron <jbaron@redhat.com> | 2012-03-23 18:02:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:42 -0400 |
commit | accb61fe7bb0f5c2a4102239e4981650f9048519 (patch) | |
tree | 5e7120b80944d9719684b94e0c419761ba2d59e1 /arch/parisc/include | |
parent | 909af768e88867016f427264ae39d27a57b6a8ed (diff) |
coredump: add VM_NODUMP, MADV_NODUMP, MADV_CLEAR_NODUMP
Since we no longer need the VM_ALWAYSDUMP flag, let's use the freed bit
for 'VM_NODUMP' flag. The idea is is to add a new madvise() flag:
MADV_DONTDUMP, which can be set by applications to specifically request
memory regions which should not dump core.
The specific application I have in mind is qemu: we can add a flag there
that wouldn't dump all of guest memory when qemu dumps core. This flag
might also be useful for security sensitive apps that want to absolutely
make sure that parts of memory are not dumped. To clear the flag use:
MADV_DODUMP.
[akpm@linux-foundation.org: s/MADV_NODUMP/MADV_DONTDUMP/, s/MADV_CLEAR_NODUMP/MADV_DODUMP/, per Roland]
[akpm@linux-foundation.org: fix up the architectures which broke]
Signed-off-by: Jason Baron <jbaron@redhat.com>
Acked-by: Roland McGrath <roland@hack.frob.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/parisc/include')
-rw-r--r-- | arch/parisc/include/asm/mman.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/mman.h b/arch/parisc/include/asm/mman.h index f5b7bf5fba68..12219ebce869 100644 --- a/arch/parisc/include/asm/mman.h +++ b/arch/parisc/include/asm/mman.h | |||
@@ -62,6 +62,10 @@ | |||
62 | #define MADV_HUGEPAGE 67 /* Worth backing with hugepages */ | 62 | #define MADV_HUGEPAGE 67 /* Worth backing with hugepages */ |
63 | #define MADV_NOHUGEPAGE 68 /* Not worth backing with hugepages */ | 63 | #define MADV_NOHUGEPAGE 68 /* Not worth backing with hugepages */ |
64 | 64 | ||
65 | #define MADV_DONTDUMP 69 /* Explicity exclude from the core dump, | ||
66 | overrides the coredump filter bits */ | ||
67 | #define MADV_DODUMP 70 /* Clear the MADV_NODUMP flag */ | ||
68 | |||
65 | /* compatibility flags */ | 69 | /* compatibility flags */ |
66 | #define MAP_FILE 0 | 70 | #define MAP_FILE 0 |
67 | #define MAP_VARIABLE 0 | 71 | #define MAP_VARIABLE 0 |