Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Mar 2015 17:51:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 198431] Vnode info not provided for memory mapped tmpfs files in various places
Message-ID:  <bug-198431-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
          Reporter: eric@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198431-8>