Home | History | Annotate | Download | only in pmap
History log of /src/usr.bin/pmap/main.c
RevisionDateAuthorComments
 1.30  21-Aug-2022  mlelstv Add -t option to print pmap as underlying RB tree.
Report gap/maxgap fields when dumping vm_map structure.
 1.29  04-Nov-2020  chs Restrict to root any command option that prints kernel addresses.
 1.28  22-Mar-2020  ad - Don't copy the entire namecache only to look up a few names. Walk the
data structures like cache_revlookup().

- nchash and mb_map are gone. module_map replaced lkm_map.
 1.27  13-Sep-2019  christos deal with variable length namecache entries.
 1.26  14-Dec-2015  christos branches: 1.26.16;
use ecalloc
 1.25  13-Dec-2015  christos PR/50546: David Binderman: Fix bad sizeof
 1.24  25-Oct-2011  jym Move getuid() out of the loop, uid should not change behind our back. KNF.
 1.23  25-Oct-2011  jym kill(2) might not be a good test after all, users can send signals
to setuid binaries (like SIGINT for ping(8)). So apply the exact same
rights as procfs, and test uid against proc p_uid (real owner of process).

Bail out if we are not root and we attempt to print mappings of a process
that the user does not really own.
 1.22  18-Oct-2011  jym Disallow printing of kernel mappings if we are not root.

pid 0 is a special case for kill(pid, 0), and unlikely to be the
correct test there. This follows the procfs "mem" rights changes that
happened some time ago.
 1.21  23-Jun-2011  christos Don't give out information about processes we can't control.
 1.20  13-Apr-2009  lukem Fix WARNS=4 issues (-Wcast-qual -Wextra -Wsign-compare)
 1.19  17-Jun-2008  christos branches: 1.19.6;
From skd: Delete kernel_floor tests. They don't make sense on amd64.
 1.18  28-Apr-2008  martin branches: 1.18.2;
Remove clause 3 and 4 from TNF licenses
 1.17  02-Jan-2008  yamt branches: 1.17.4;
remove no longer necessary lockdebug hacks.
 1.16  31-Jan-2004  atatat branches: 1.16.24;
Lint police.
 1.15  31-Jan-2004  atatat Unfold the KDEREF() macros a little, and tweak the LOCKDEBUG detection
code, to detect a KDEREF failure instead of simply aborting. If the
KDEREF fails, we're obviously not_using_lockdebug().
 1.14  06-Jan-2004  atatat Find the buf_map symbol, so that the submap can be labeled properly.
 1.13  17-Sep-2003  yamt redo the previous in a different way; use vm_map_min/max macros.
 1.12  17-Sep-2003  yamt update lockdebug detection to follow uvm_map.h rev.1.35.
(vm_map.header.{start,end} was swapped.)
 1.11  31-Jul-2003  yamt remove remaining v_id.
 1.10  24-Jul-2003  atatat Though I cannot reproduce the failure (which I suspect is rather
system dependent), the analysis provided in PR misc/22089 is correct.
Therefore, allocate one more slot and suck one more slot from the
kernel.
 1.9  04-May-2003  atatat Build main.c with LOCKDEBUG defined so that it gets the larger kbit
definition. Since we're now passing it into pmap.c which is already
compiled that way, it would be nice if it was the right size.

Also, fix a memset bug that caused a segmentation fault when printing
the kernel's vm_map.
 1.8  16-Apr-2003  wiz Sort options in usage.
 1.7  04-Apr-2003  atatat Add some more intricate groveler options:

-A address Dumps the vm_amap structure found at address.

-E address Dumps the vm_map_entry structure found at address.

-S address Dumps the vmspace structure found at address.

-V address Dumps the vm_map structure found at address.

This required reorganizing the code a little, which led to some
cleanup (yay!). These new methods are executed without any extra
privileges, so you need read access on /dev/mem or on the kernel core
into which you are digging.

This should be useful for, eg, examining amaps are corrupt when being
destroyed, which can cause a kernel panic (and, hence, are no longer
connected to a map entry, or the map entry is no longer connected to a
vm_map/vmspace).

The options in the man page have also been reorganized.
 1.6  29-Mar-2003  he Introduce a "size_t" variable for use with sysctl(3).
Fixes compile problem observed on evbarm.
 1.5  28-Mar-2003  atatat Add the capability to dump the struct vm_amap and the am_anon,
am_bckptr, am_slots, and am_anon data, if the vm_map_entry has an
amap. This adds three new debug "bits" to the -D argument, so the
namei cache dumping "bit" has been moved up.

Also, change the * that gets emitted with -vv to indicate the number
of pages skipped and the size of the area (in kilobytes).
 1.4  27-Feb-2003  atatat Clean up code in places, add some more (possible) submap names, make
better use of the submap names when dumping the kernel map, clean up
the "interface" between the main and LOCKDEBUG dependent pmap modules,
and make the heap identification work better.
 1.3  16-Jan-2003  atatat Print the string as if it's a string. Don't print the pointer. It's
useless for the non-omniscient (who, by definition, would have no need
for this program anyway).
 1.2  09-Jan-2003  atatat More properly handle the setgid privileges that we have, casting them
out if using them might be unsafe.
 1.1  08-Jan-2003  atatat Make pmap work on LOCKDEBUG *and* non-LOCKDEBUG kernels (previously it
would fail in spectacular ways on LOCKDEBUG kernels) by compiling the
groveler code twice (the second time with LOCKDEBUG defined so that
the appropriate structures get larger in the right way). We currently
decide if we are operating on a kernel with LOCKDEBUG enabled if the
kernel's vm_map has referential integrity between a few pointers
and/or values.

Also, if you use more than one -v, you get a * on a line by itself in
between gaps in entries. It makes finding gaps much easier visually.
 1.16.24.1  09-Jan-2008  matt sync with HEAD
 1.17.4.1  18-May-2008  yamt sync with head.
 1.18.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.6.1  13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.26.16.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed