Line 12:
Line 12:
this mapping is a shared one and should be dumped as such.
this mapping is a shared one and should be dumped as such.
−
It's important to note that this works for both -- anonymous and file shared mappings, as for the
+
It's important to note that the above mechanism works not just for the file-based mappings,
−
former ones kernel creates an invisible through the VFS tree tmpfs-based file, and it's possible
+
but also for the anonymous ones. For an anonymous mapping, kernel actually creates a hidden
−
to works with it just like with any other file (except that it cannot be opened via any path but
+
tmpfs file, and so <code>fstatat()</code> on the <code>/proc/$PID/map_files/</code> entry
−
/proc/pid/map_files/address).
+
works the same way as for other files. The tmpfs file itself is not visible from any tmpfs
+
mounts, but can be opened via its <code>map_files</code> entry.
== Restore ==
== Restore ==