]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 327561:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 29 Jan 2018 23:43:04 +0000 (23:43 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 29 Jan 2018 23:43:04 +0000 (23:43 +0000)
commit5d161d192120a52069ca56c05c626abf69384034
tree718e0e21c6005fb285a1bb24cfd8e657cf04f36e
parentdd174e2d5d16429c2ce2bf82f156a8154a6cd049
MFC 327561:
Report offset relative to the backing object for kinfo_vmentry structures.

For the pathname reported in kinfo_vmentry structures (kve_path), the
sysctl handlers walk the object chain to find the bottom-most VM object.
This permits a COW mapping of a file with dirty pages to report the
pathname of the originally mapped file.  Do the same for the object
offset (kve_offset) computing a cumulative offset during the same object
walk so that the reported offset is relative to the reported pathname.

Note that ptrace(PT_VM_ENTRY) already returns a cumulative offset
rather than the raw offset of the VM map entry.

Note also that this does not affect procstat -v output (even structured
output) since that output does not include the kve_offset field.

Sponsored by: DARPA / AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/10@328571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_proc.c