Re: [PATCH] ELF core dump options

From: Hugh Dickins
Date: Thu Jul 26 2007 - 12:58:37 EST


On Thu, 26 Jul 2007, Roland McGrath wrote:
>
> > hm, I'm now wondering whether testing i_nlink was the best (or official)
> > way of determining whether a MAP_SHARED vma is anonymous or file-backed.
> > Hugh will know.
>
> Well, it doesn't exactly test that it's not "file-backed". (Technically
> anything shared is file-backed, even if by a shmem virtual file.) It tests
> whether the backing file will probably ever be found on disk later. That
> gets shmem regions as well as originally-regular files that were deleted
> while mapped. I think we asked around when this test was put it and it was
> deemed proper at the time. (It doesn't really need to be a formal "what
> does the vm situation mean" guarantee, just a practical "you probably
> wanted that" test.)

Exactly, a rough heuristic which seemed to approximate what the coredump
people wanted when it went into 2.6.12. No absolute justification to it.

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/