[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111214211652.GO2203@ZenIV.linux.org.uk>
Date: Wed, 14 Dec 2011 21:16:52 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: t cheney <cdmalord@...il.com>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 1/1] x86: Add process memory layout to coredump file
On Sat, Dec 10, 2011 at 10:37:02PM +0800, t cheney wrote:
> This patch just add memory layout(same as /proc/pid/maps) to
> coredump file. The layout is appended to corenote segment with
> flag NT_MAPS=7.
> + len = sprintf(buf, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu",
> + start,
> + end,
> + flags & VM_READ ? 'r' : '-',
> + flags & VM_WRITE ? 'w' : '-',
> + flags & VM_EXEC ? 'x' : '-',
> + flags & VM_MAYSHARE ? 's' : 'p',
> + pgoff,
> + MAJOR(dev), MINOR(dev), ino);
Device numbers may be wider than 16 bits.
> + p = d_path(&vma->vm_file->f_path, s, maps_size-1);
What if somebody renames the file (or, better yet, its parent directory)
between two calls of that thing?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists