[Bug 198431] Vnode info not provided for memory mapped tmpfs files in various places
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Mar 8 17:51:44 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198431
Bug ID: 198431
Summary: Vnode info not provided for memory mapped tmpfs files
in various places
Product: Base System
Version: 10.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: eric at badgerio.us
Created attachment 154029
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=154029&action=edit
Proposed patch
Since r250030, when a superfluous VM object for tmpfs VREG files was
eliminated, various interfaces (e.g. procfs, KERN_PROC sysctl) that return info
about memory maps for processes stopped returning vnode info for tmpfs files.
Instead, the mappings would appear as swap type with no further detail. This
prevents tools using this information (e.g. dtrace's pid provider) from working
correctly.
Attached a proposed patch. It will, in cases where a VM object with type
OBJT_SWAP and OBJ_TMPFS flag is found, populate the vnode pointer appropriately
so the vnode information can be extracted. It will also (where applicable) set
the memory mapping to appear as a vnode type (this matches FreeBSD 9 behavior,
and, per advice from jhb@ and kib@, is desirable because it hides
implementation details). In the case where the VM object has the OBJ_TMPFS_NODE
but not OBJ_TMPFS flag (i.e. vnode has been recycled), the mapping is still
returned as a vnode type, but the vnode pointer is not populated.
The proposed patch covers procstat (-v), procfs, linprocfs, pmc (pmcstat), and
ptrace (PT_VM_ENTRY).
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list