aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-01-26 00:56:48 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-01-26 13:50:58 -0800
commite5b97dde514f9bd43f9e525451d0a863c4fc8a9a (patch)
treee1096d4446c5dab878b50b7001cd58ab9ce5fa45 /fs/binfmt_elf.c
parentb6558c4a2378af06f2beca6c8a3304e21d1cf135 (diff)
downloadkernel_samsung_smdk4412-e5b97dde514f9bd43f9e525451d0a863c4fc8a9a.tar.gz
kernel_samsung_smdk4412-e5b97dde514f9bd43f9e525451d0a863c4fc8a9a.tar.bz2
kernel_samsung_smdk4412-e5b97dde514f9bd43f9e525451d0a863c4fc8a9a.zip
[PATCH] Add VM_ALWAYSDUMP
This patch adds the VM_ALWAYSDUMP flag for vm_flags in vm_area_struct. This provides a clean explicit way to have a vma always included in core dumps, as is needed for vDSO's. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 7cb28720f90..6fec8bfa6ba 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1178,6 +1178,10 @@ static int dump_seek(struct file *file, loff_t off)
*/
static int maydump(struct vm_area_struct *vma)
{
+ /* The vma can be set up to tell us the answer directly. */
+ if (vma->vm_flags & VM_ALWAYSDUMP)
+ return 1;
+
/* Do not dump I/O mapped devices or special mappings */
if (vma->vm_flags & (VM_IO | VM_RESERVED))
return 0;