mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
[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>
This commit is contained in:
parent
b6558c4a23
commit
e5b97dde51
2 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue