Home | History | Annotate | Download | only in procfs
History log of /src/sys/miscfs/procfs/procfs_map.c
RevisionDateAuthorComments
 1.47  27-Sep-2019  christos Instead of casting to size_t, cast to uintmax_t to prevent truncation
(pointed out by chuq). In all these cases uio_offset can't be negative.
 1.46  26-Sep-2019  christos fix sign-compare issues: uio->uio_offset (off_t) is compared with (size_t):
cast the offset to size_t.
 1.45  17-Oct-2014  christos branches: 1.45.20;
Maps don't change that frequently between reads, so don't give up and
do what linux does (support reading from an offset).
 1.44  18-Mar-2014  riastradh branches: 1.44.4; 1.44.8;
Merge riastradh-drm2 to HEAD.
 1.43  18-Jul-2013  ryo PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM error case in procfs_domap()d
 1.42  06-May-2012  christos branches: 1.42.2; 1.42.4; 1.42.10;
- match format with the linux map printing
- fix PK_32 map printing for linux processes
should fix 32 bit java stack guard setting.
 1.41  16-Oct-2011  hannken branches: 1.41.2; 1.41.6; 1.41.8; 1.41.12; 1.41.14;
VOP_GETATTR() needs a shared lock at least.
 1.40  26-Jul-2011  yamt fix a botch in PRIxVADDR change (rev.1.38)
 1.39  15-Sep-2010  jym Use PRIxVADDR to print vaddr_t elements. Wrap lines.
 1.38  14-Dec-2009  uebayasi branches: 1.38.2; 1.38.4;
gimpy invented PRIxVADDR format specifier.
 1.37  11-Jan-2009  christos merge christos-time_t
 1.36  25-Jul-2008  christos branches: 1.36.2; 1.36.6; 1.36.12;
use bufsize instead of BUFFERSIZE
 1.35  25-Jul-2008  christos Handle files with a large number of mappings gracefully. Reported by Nicholas
Joly.
 1.34  15-Dec-2007  christos branches: 1.34.6; 1.34.10; 1.34.12; 1.34.14; 1.34.16;
use vnode_to_path.
 1.33  26-Nov-2007  pooka branches: 1.33.2; 1.33.6;
Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
 1.32  21-Jul-2007  pooka branches: 1.32.4; 1.32.6; 1.32.12; 1.32.14;
nuke homegrown getcwd_common() decl
 1.31  01-Apr-2007  christos branches: 1.31.4;
Instead of reading and writing little by little, allocate memory and
write the whole map in one shot so that we don't have to deal with the
map changing under us. Fixes the linux emulated jdk-1.6 where it was
losing the last map entry and could not find the stack on startup.
 1.30  18-Feb-2007  ad branches: 1.30.4; 1.30.6;
procfs_map():

- Drop the target's vm_map lock before calling uiomove(). We could
deadlock if inspecting /proc/curproc/map.
- If the vm_map might have changed, restart the operation, but give
up after 250 retries if the map keeps changing. XXX This is not
ideal.
 1.29  17-Feb-2007  pavel Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
 1.28  09-Feb-2007  ad branches: 1.28.2;
Merge newlock2 to head.
 1.27  16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.26  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.25  23-Jul-2006  ad branches: 1.25.4; 1.25.6;
Use the LWP cached credentials where sane.
 1.24  14-May-2006  elad integrate kauth.
 1.23  11-Dec-2005  christos branches: 1.23.4; 1.23.6; 1.23.8; 1.23.10; 1.23.12;
merge ktrace-lwp.
 1.22  30-Aug-2005  xtraeme Remove __P()
 1.21  26-Feb-2005  perry branches: 1.21.4;
nuke trailing whitespace
 1.20  07-Aug-2003  agc branches: 1.20.8; 1.20.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.19  29-Jun-2003  fvdl branches: 1.19.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.18  29-Jun-2003  thorpej Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget(). Turns out
that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
just to appease the above.
 1.17  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.16  07-Nov-2002  thorpej Fix signed/unsigned comparison warnings.
 1.15  10-Nov-2001  lukem add RCSIDs
 1.14  06-Nov-2001  simonb Remove some variables that are set but never used.
 1.13  02-Jun-2001  chs branches: 1.13.2; 1.13.6;
replace vm_map{,_entry}_t with struct vm_map{,_entry} *.
 1.12  02-Apr-2001  pk Cast `field-width' arguments to type `int'.
 1.11  29-Mar-2001  fvdl For -o linux mounts, add some code to emulate /proc/#/maps.
Needs NAMECACHE_ENTER_REVERSE to include filenames.
 1.10  17-Jan-2001  fvdl branches: 1.10.2;
Add a few linux-style files, only enabled when -o linux is specified
for the mount. Currently these are /proc/cpuinfo and /proc/meminfo.
The former only does something on i386 right now.
 1.9  24-Nov-2000  chs remove dead code and other misc cleanup.
 1.8  28-Jun-2000  mrg <vm/vm.h> -> <uvm/uvm_extern.h>
 1.7  27-Jun-2000  mrg remove redudant <vm/pmap.h> includes. <vm/pmap.h> -> <uvm/uvm_pmap.h>
 1.6  25-Jun-2000  mrg remove some redundant <vm/vm_xxx.h> includes
 1.5  10-Apr-1999  drochner branches: 1.5.2; 1.5.12;
remove unneeded <vm/vm_object.h>
 1.4  24-Mar-1999  mrg branches: 1.4.4;
completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.3  03-Feb-1999  msaitoh sprintf->snprintf
 1.2  28-Jan-1999  drochner make it compile with !UVM
 1.1  25-Jan-1999  msaitoh Add /proc/#/map. From FreeBSD.
 1.4.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.5.12.1  30-Mar-2001  he Pull up revision 1.10 (requested by fvdl):
Add some required Linux emulation bits to support the Linux
version of VMware.
 1.5.2.4  21-Apr-2001  bouyer Sync with HEAD
 1.5.2.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.5.2.2  08-Dec-2000  bouyer Sync with HEAD.
 1.5.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.10.2.8  11-Nov-2002  nathanw Catch up to -current
 1.10.2.7  15-Oct-2002  nathanw Make _validfoo() routines go back to taking a proc.
 1.10.2.6  12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.10.2.5  24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.10.2.4  14-Nov-2001  nathanw Catch up to -current.
 1.10.2.3  21-Jun-2001  nathanw Catch up to -current.
 1.10.2.2  09-Apr-2001  nathanw Catch up with -current.
 1.10.2.1  05-Mar-2001  nathanw Initial commit of scheduler activations and lightweight process support.
 1.13.6.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.13.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.19.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.19.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.19.2.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.19.2.4  18-Sep-2004  skrll Sync with HEAD.
 1.19.2.3  24-Aug-2004  skrll Undo part of the ktrace/lwp changes. In particular:
* Remove the "lwp *" argument that was added to vget(). Turns out
that nothing actually used it!
* Remove the "lwp *" arguments that were added to VFS_ROOT(), VFS_VGET(),
and VFS_FHTOVP(); all they did was pass it to vget() (which, as noted
above, didn't use it).
* Remove all of the "lwp *" arguments to internal functions that were added
just to appease the above.
 1.19.2.2  03-Aug-2004  skrll Sync with HEAD
 1.19.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.20.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.20.8.1  29-Apr-2005  kent sync with -current
 1.21.4.6  21-Jan-2008  yamt sync with head
 1.21.4.5  07-Dec-2007  yamt sync with head
 1.21.4.4  03-Sep-2007  yamt sync with head.
 1.21.4.3  26-Feb-2007  yamt sync with head.
 1.21.4.2  30-Dec-2006  yamt sync with head.
 1.21.4.1  21-Jun-2006  yamt sync with head.
 1.23.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.23.10.1  08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.23.8.2  11-Aug-2006  yamt sync with head
 1.23.8.1  24-May-2006  yamt sync with head.
 1.23.6.1  01-Jun-2006  kardel Sync with head.
 1.23.4.1  09-Sep-2006  rpaulo sync with head
 1.25.6.2  10-Dec-2006  yamt sync with head.
 1.25.6.1  22-Oct-2006  yamt sync with head
 1.25.4.1  17-Nov-2006  ad Checkpoint work in progress.
 1.28.2.2  15-Apr-2007  yamt sync with head.
 1.28.2.1  27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.30.6.1  11-Jul-2007  mjf Sync with head.
 1.30.4.2  20-Aug-2007  ad Sync with HEAD.
 1.30.4.1  10-Apr-2007  ad Sync with head.
 1.31.4.1  15-Aug-2007  skrll Sync with HEAD.
 1.32.14.2  21-Jul-2007  pooka nuke homegrown getcwd_common() decl
 1.32.14.1  21-Jul-2007  pooka file procfs_map.c was added on branch matt-mips64 on 2007-07-21 22:47:37 +0000
 1.32.12.2  27-Dec-2007  mjf Sync with HEAD.
 1.32.12.1  08-Dec-2007  mjf Sync with HEAD.
 1.32.6.1  09-Jan-2008  matt sync with HEAD
 1.32.4.1  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.33.6.1  02-Jan-2008  bouyer Sync with HEAD
 1.33.2.1  26-Dec-2007  ad Sync with head.
 1.34.16.1  19-Oct-2008  haad Sync with HEAD.
 1.34.14.1  28-Jul-2008  simonb Sync with head.
 1.34.12.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.34.10.3  09-Oct-2010  yamt sync with head
 1.34.10.2  11-Mar-2010  yamt sync with head
 1.34.10.1  04-May-2009  yamt sync with head.
 1.34.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.34.6.1  28-Sep-2008  mjf Sync with HEAD.
 1.36.12.2  21-Apr-2010  matt sync to netbsd-5
 1.36.12.1  24-Aug-2009  matt Fix some vaddr_t/vaddr_t type droppings.
 1.36.6.2  09-Nov-2008  christos account for major and minor being unsigned long long
 1.36.6.1  25-Jul-2008  christos file procfs_map.c was added on branch christos-time_t on 2008-11-09 02:05:20 +0000
 1.36.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.38.4.1  05-Mar-2011  rmind sync with head
 1.38.2.1  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.41.14.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by ryo in ticket #917):
sys/miscfs/procfs/procfs_map.c: revision 1.43
PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM
error case in procfs_domap()d
 1.41.12.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by ryo in ticket #917):
sys/miscfs/procfs/procfs_map.c: revision 1.43
PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM
error case in procfs_domap()d
 1.41.8.2  06-Jul-2017  snj Pull up following revision(s) (requested by tsutsui in ticket #1434):
sys/miscfs/procfs/procfs_map.c: revision 1.45
Maps don't change that frequently between reads, so don't give up and
do what linux does (support reading from an offset).
 1.41.8.1  29-Jul-2013  msaitoh Pull up following revision(s) (requested by ryo in ticket #917):
sys/miscfs/procfs/procfs_map.c: revision 1.43
PR/48048: Add a missing vm_map_unlock_read() and uvmspace_free() to the ENOMEM error case in procfs_domap()d
 1.41.6.1  02-Jun-2012  mrg sync to latest -current.
 1.41.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.41.2.1  23-May-2012  yamt sync with head.
 1.42.10.1  23-Jul-2013  riastradh sync with HEAD
 1.42.4.1  28-Aug-2013  rmind sync with head
 1.42.2.2  03-Dec-2017  jdolecek update from HEAD
 1.42.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.8.1  13-Mar-2017  skrll Sync with netbsd-7-1-RELEASE
 1.44.4.1  14-Feb-2017  snj Pull up following revision(s) (requested by chs in ticket #1358):
sys/miscfs/procfs/procfs_map.c: revision 1.45
Maps don't change that frequently between reads, so don't give up and
do what linux does (support reading from an offset).
 1.45.20.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed