Print this page
7029 want per-process exploit mitigation features (secflags)
7030 want basic address space layout randomization (aslr)
7031 noexec_user_stack should be a secflag
7032 want a means to forbid mappings around NULL.

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man4/proc.4
          +++ new/usr/src/man/man4/proc.4
   1    1  '\" te
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
   4    4  .\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
   5    5  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   6    6  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   7    7  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   8      -.TH PROC 4 "Mar 31, 2013"
        8 +.TH PROC 4 "Jul 23, 2015"
   9    9  .SH NAME
  10   10  proc \- /proc, the process file system
  11   11  .SH DESCRIPTION
  12      -.sp
  13   12  .LP
  14   13  \fB/proc\fR is a file system that provides access to the state of each process
  15   14  and light-weight process (lwp) in the system. The name of each entry in the
  16   15  \fB/proc\fR directory is a decimal number corresponding to a process-ID. These
  17   16  entries are themselves subdirectories. Access to process state is provided by
  18   17  additional files contained within each subdirectory; the hierarchy is described
  19   18  more completely below. In this document, ``\fB/proc\fR file'' refers to a
  20   19  non-directory file within the hierarchy rooted at \fB/proc\fR. The owner of
  21   20  each \fB/proc\fR file and subdirectory is determined by the user-ID of the
  22   21  process.
↓ open down ↓ 144 lines elided ↑ open up ↑
 167  166  process. The \fBpr_dmodel\fR field of the \fBstatus\fR files indicates the
 168  167  target process's data model.
 169  168  .sp
 170  169  .LP
 171  170  To help deal with system data structures that are read from 32-bit processes, a
 172  171  64-bit controlling program can be compiled with the C preprocessor symbol
 173  172  \fB_SYSCALL32\fR defined before system header files are included. This makes
 174  173  explicit 32-bit fixed-width data structures (like \fBcstruct stat32\fR) visible
 175  174  to the 64-bit program. See \fBtypes32.h\fR(3HEAD).
 176  175  .SH DIRECTORY STRUCTURE
 177      -.sp
 178  176  .LP
 179  177  At the top level, the directory \fB/proc\fR contains entries each of which
 180  178  names an existing process in the system. These entries are themselves
 181  179  directories. Except where otherwise noted, the files described below can be
 182  180  opened for reading only. In addition, if a process becomes a \fIzombie\fR (one
 183  181  that has exited but whose parent has not yet performed a \fBwait\fR(3C) upon
 184  182  it), most of its associated \fB/proc\fR files disappear from the hierarchy;
 185  183  subsequent attempts to open them, or to read or write files opened before the
 186  184  process exited, will elicit the error \fBENOENT\fR.
 187  185  .sp
↓ open down ↓ 6 lines elided ↑ open up ↑
 194  192  addition, atomicity is not guaranteed for \fBI/O\fR applied to the \fBas\fR
 195  193  (address-space) file for a running process or for a process whose address space
 196  194  contains memory shared by another running process.
 197  195  .sp
 198  196  .LP
 199  197  A number of structure definitions are used to describe the files. These
 200  198  structures may grow by the addition of elements at the end in future releases
 201  199  of the system and it is not legitimate for a program to assume that they will
 202  200  not.
 203  201  .SH STRUCTURE OF \fB/proc/\fR\fIpid\fR
 204      -.sp
 205  202  .LP
 206  203  A given directory \fB/proc/\fR\fIpid\fR contains the following entries. A
 207  204  process can use the invisible alias \fB/proc/self\fR if it wishes to open one
 208  205  of its own \fB/proc\fR files (invisible in the sense that the name ``self''
 209  206  does not appear in a directory listing of \fB/proc\fR obtained from
 210  207  \fBls\fR(1), \fBgetdents\fR(2), or \fBreaddir\fR(3C)).
 211  208  .SS "contracts"
 212      -.sp
 213  209  .LP
 214  210  A directory containing references to the contracts held by the process. Each
 215  211  entry is a symlink to the contract's directory under \fB/system/contract\fR.
 216  212  See \fBcontract\fR(4).
 217  213  .SS "as"
 218      -.sp
 219  214  .LP
 220  215  Contains the address-space image of the process; it can be opened for both
 221  216  reading and writing. \fBlseek\fR(2) is used to position the file at the virtual
 222  217  address of interest and then the address space can be examined or changed
 223  218  through \fBread\fR(2) or \fBwrite\fR(2) (or by using \fBpread\fR(2) or
 224  219  \fBpwrite\fR(2) for the combined operation).
 225  220  .SS "ctl"
 226      -.sp
 227  221  .LP
 228  222  A write-only file to which structured messages are written directing the system
 229  223  to change some aspect of the process's state or control its behavior in some
 230  224  way. The seek offset is not relevant when writing to this file. Individual lwps
 231  225  also have associated \fBlwpctl\fR files in the lwp subdirectories. A control
 232  226  message may be written either to the process's \fBctl\fR file or to a specific
 233  227  \fBlwpctl\fR file with operation-specific effects. The effect of a control
 234  228  message is immediately reflected in the state of the process visible through
 235  229  appropriate status and information files. The types of control messages are
 236  230  described in detail later. See \fBCONTROL MESSAGES\fR.
 237  231  .SS "status"
 238      -.sp
 239  232  .LP
 240  233  Contains state information about the process and the representative lwp. The
 241  234  file contains a \fBpstatus\fR structure which contains an embedded
 242  235  \fBlwpstatus\fR structure for the representative lwp, as follows:
 243  236  .sp
 244  237  .in +2
 245  238  .nf
 246  239  typedef struct pstatus {
 247  240       int pr_flags;            /* flags (see below) */
 248  241       int pr_nlwp;             /* number of active lwps in the process */
↓ open down ↓ 608 lines elided ↑ open up ↑
 857  850  .sp
 858  851  .LP
 859  852  SPARC registers, both general and floating-point, as seen by a 64-bit
 860  853  controlling process are the V9 versions of the registers, even if the target
 861  854  process is a 32-bit (V8) process. V8 registers are a subset of the V9
 862  855  registers.
 863  856  .sp
 864  857  .LP
 865  858  If the lwp is not stopped, all register values are undefined.
 866  859  .SS "psinfo"
 867      -.sp
 868  860  .LP
 869  861  Contains miscellaneous information about the process and the representative lwp
 870  862  needed by the \fBps\fR(1) command. \fBpsinfo\fR remains accessible after a
 871  863  process becomes a \fIzombie\fR. The file contains a \fBpsinfo\fR structure
 872  864  which contains an embedded \fBlwpsinfo\fR structure for the representative lwp,
 873  865  as follows:
 874  866  .sp
 875  867  .in +2
 876  868  .nf
 877  869  typedef struct psinfo {
↓ open down ↓ 98 lines elided ↑ open up ↑
 976  968  .sp
 977  969  .LP
 978  970  \fBpr_pctcpu\fR is a 16-bit binary fraction, as described above. It represents
 979  971  the \fBCPU\fR time used by the specific lwp. On a multi-processor machine, the
 980  972  maximum value is 1/N, where N is the number of \fBCPU\fRs.
 981  973  .sp
 982  974  .LP
 983  975  \fBpr_contract\fR is the id of the process contract of which the process is a
 984  976  member. See \fBcontract\fR(4) and \fBprocess\fR(4).
 985  977  .SS "cred"
 986      -.sp
 987  978  .LP
 988  979  Contains a description of the credentials associated with the process:
 989  980  .sp
 990  981  .in +2
 991  982  .nf
 992  983  typedef struct prcred {
 993  984          uid_t pr_euid;      /* effective user id */
 994  985          uid_t pr_ruid;      /* real user id */
 995  986          uid_t pr_suid;      /* saved user id (from exec) */
 996  987          gid_t pr_egid;      /* effective group id */
↓ open down ↓ 6 lines elided ↑ open up ↑
1003  994  .in -2
1004  995  .sp
1005  996  
1006  997  .sp
1007  998  .LP
1008  999  The array of associated supplementary groups in \fBpr_groups\fR is of variable
1009 1000  length; the \fBcred\fR file contains all of the supplementary groups.
1010 1001  \fBpr_ngroups\fR indicates the number of supplementary groups. (See also the
1011 1002  \fBPCSCRED\fR and \fBPCSCREDX\fR control operations.)
1012 1003  .SS "priv"
1013      -.sp
1014 1004  .LP
1015 1005  Contains a description of the privileges associated with the process:
1016 1006  .sp
1017 1007  .in +2
1018 1008  .nf
1019 1009  typedef struct prpriv {
1020 1010       uint32_t        pr_nsets;      /* number of privilege set */
1021 1011       uint32_t        pr_setsize;    /* size of privilege set */
1022 1012       uint32_t        pr_infosize;   /* size of supplementary data */
1023 1013       priv_chunk_t    pr_sets[1];    /* array of sets */
↓ open down ↓ 12 lines elided ↑ open up ↑
1036 1026  .in -2
1037 1027  
1038 1028  .sp
1039 1029  .LP
1040 1030  which is followed by additional information about the process state
1041 1031  \fBpr_infosize\fR bytes in size.
1042 1032  .sp
1043 1033  .LP
1044 1034  The full size of the structure can be computed using
1045 1035  \fBPRIV_PRPRIV_SIZE\fR(\fBprpriv_t *\fR).
1046      -.SS "sigact"
     1036 +.SS "secflags"
     1037 +.LP
     1038 +This file contains the security-flags of the process.  It contains a
     1039 +description of the security flags associated with the process.
1047 1040  .sp
     1041 +.in +2
     1042 +.nf
     1043 +typedef struct prsecflags {
     1044 +        uint32_t pr_version;            /* ABI Versioning of this structure */
     1045 +        secflagset_t pr_effective;      /* Effective flags */
     1046 +        secflagset_t pr_inherit;        /* Inheritable flags */
     1047 +        secflagset_t pr_lower;          /* Lower flags */
     1048 +        secflagset_t pr_upper;          /* Upper flags */
     1049 +} prsecflags_t;
     1050 +.in -2
     1051 +
     1052 +.sp
     1053 +.LP
     1054 +The \fBpr_version\fR field is a version number for the structure, currently
     1055 +\fBPRSECFLAGS_VERSION_1\fR.
     1056 +.SS "sigact"
1048 1057  .LP
1049 1058  Contains an array of \fBsigaction structures\fR describing the current
1050 1059  dispositions of all signals associated with the traced process (see
1051 1060  \fBsigaction\fR(2)). Signal numbers are displaced by 1 from array indices, so
1052 1061  that the action for signal number \fIn\fR appears in position \fIn\fR-1 of the
1053 1062  array.
1054 1063  .SS "auxv"
1055      -.sp
1056 1064  .LP
1057 1065  Contains the initial values of the process's aux vector in an array of
1058 1066  \fBauxv_t\fR structures (see \fB<sys/auxv.h>\fR). The values are those that
1059 1067  were passed by the operating system as startup information to the dynamic
1060 1068  linker.
1061 1069  .SS "ldt"
1062      -.sp
1063 1070  .LP
1064 1071  This file exists only on x86-based machines. It is non-empty only if the
1065 1072  process has established a local descriptor table (\fBLDT\fR). If non-empty, the
1066 1073  file contains the array of currently active \fBLDT\fR entries in an array of
1067 1074  elements of type \fBstruct ssd\fR, defined in \fB<sys/sysi86.h>\fR, one element
1068 1075  for each active \fBLDT\fR entry.
1069 1076  .SS "map, xmap"
1070      -.sp
1071 1077  .LP
1072 1078  Contain information about the virtual address map of the process. The map file
1073 1079  contains an array of \fBprmap\fR structures while the xmap file contains an
1074 1080  array of \fBprxmap\fR structures. Each structure describes a contiguous virtual
1075 1081  address region in the address space of the traced process:
1076 1082  .sp
1077 1083  .in +2
1078 1084  .nf
1079 1085  typedef struct prmap {
1080 1086          uintptr_tpr_vaddr;         /* virtual address of mapping */
↓ open down ↓ 147 lines elided ↑ open up ↑
1228 1234  .LP
1229 1235  \fBpr_locked\fR is the number of locked pages for the mapping. Pages which are
1230 1236  locked are always resident in memory.
1231 1237  .sp
1232 1238  .LP
1233 1239  \fBpr_hatpagesize\fR is the size, in bytes, of the \fBHAT\fR (\fBMMU\fR)
1234 1240  translation for the mapping. \fBpr_hatpagesize\fR may be different than
1235 1241  \fBpr_pagesize.\fR The possible values are hardware architecture specific, and
1236 1242  may change over a mapping's lifetime.
1237 1243  .SS "rmap"
1238      -.sp
1239 1244  .LP
1240 1245  Contains information about the reserved address ranges of the process. The file
1241 1246  contains an array of \fBprmap\fR structures, as defined above for the \fBmap\fR
1242 1247  file. Each structure describes a contiguous virtual address region in the
1243 1248  address space of the traced process that is reserved by the system in the sense
1244 1249  that an \fBmmap\fR(2) system call that does not specify \fBMAP_FIXED\fR will
1245 1250  not use any part of it for the new mapping. Examples of such reservations
1246 1251  include the address ranges reserved for the process stack and the individual
1247 1252  thread stacks of a multi-threaded process.
1248 1253  .SS "cwd"
1249      -.sp
1250 1254  .LP
1251 1255  A symbolic link to the process's current working directory. See \fBchdir\fR(2).
1252 1256  A \fBreadlink\fR(2) of \fB/proc/\fIpid\fR/cwd\fR yields a null string. However,
1253 1257  it can be opened, listed, and searched as a directory, and can be the target of
1254 1258  \fBchdir\fR(2).
1255 1259  .SS "root"
1256      -.sp
1257 1260  .LP
1258 1261  A symbolic link to the process's root directory.
1259 1262  \fB/proc/\fR\fIpid\fR\fB/root\fR can differ from the system root directory if
1260 1263  the process or one of its ancestors executed \fBchroot\fR(2) as super user. It
1261 1264  has the same semantics as \fB/proc/\fR\fIpid\fR\fB/cwd\fR.
1262 1265  .SS "fd"
1263      -.sp
1264 1266  .LP
1265 1267  A directory containing references to the open files of the process. Each entry
1266 1268  is a decimal number corresponding to an open file descriptor in the process.
1267 1269  .sp
1268 1270  .LP
1269 1271  If an entry refers to a regular file, it can be opened with normal file system
1270 1272  semantics but, to ensure that the controlling process cannot gain greater
1271 1273  access than the controlled process, with no file access modes other than its
1272 1274  read/write open modes in the controlled process. If an entry refers to a
1273 1275  directory, it can be accessed with the same semantics as
1274 1276  \fB/proc/\fIpid\fR/cwd\fR. An attempt to open any other type of entry fails
1275 1277  with \fBEACCES\fR.
1276 1278  .SS "object"
1277      -.sp
1278 1279  .LP
1279 1280  A directory containing read-only files with names corresponding to the
1280 1281  \fBpr_mapname\fR entries in the \fBmap\fR and \fBpagedata\fR files. Opening
1281 1282  such a file yields a file descriptor for the underlying mapped file associated
1282 1283  with an address-space mapping in the process. The file name \fBa.out\fR appears
1283 1284  in the directory as an alias for the process's executable file.
1284 1285  .sp
1285 1286  .LP
1286 1287  The \fBobject\fR directory makes it possible for a controlling process to gain
1287 1288  access to the object file and any shared libraries (and consequently the symbol
1288 1289  tables) without having to know the actual path names of the executable files.
1289 1290  .SS "path"
1290      -.sp
1291 1291  .LP
1292 1292  A directory containing symbolic links to files opened by the process. The
1293 1293  directory includes one entry for \fBcwd\fR and \fBroot\fR. The directory also
1294 1294  contains a numerical entry for each file descriptor in the \fBfd\fR directory,
1295 1295  and entries matching those in the \fBobject\fR directory. If this information
1296 1296  is not available, any attempt to read the contents of the symbolic link will
1297 1297  fail. This is most common for files that do not exist in the filesystem
1298 1298  namespace (such as \fBFIFO\fRs and sockets), but can also happen for regular
1299 1299  files. For the file descriptor entries, the path may be different from the one
1300 1300  used by the process to open the file.
1301 1301  .SS "pagedata"
1302      -.sp
1303 1302  .LP
1304 1303  Opening the page data file enables tracking of address space references and
1305 1304  modifications on a per-page basis.
1306 1305  .sp
1307 1306  .LP
1308 1307  A \fBread\fR(2) of the page data file descriptor returns structured page data
1309 1308  and atomically clears the page data maintained for the file by the system. That
1310 1309  is to say, each read returns data collected since the last read; the first read
1311 1310  returns data collected since the file was opened. When the call completes, the
1312 1311  read buffer contains the following structure as its header and thereafter
↓ open down ↓ 61 lines elided ↑ open up ↑
1374 1373  \fBlseek\fR(2) to the page data file descriptor is ineffective; every read
1375 1374  starts from the beginning of the file. Closing the page data file descriptor
1376 1375  terminates the system overhead associated with collecting the data.
1377 1376  .sp
1378 1377  .LP
1379 1378  More than one page data file descriptor for the same process can be opened, up
1380 1379  to a system-imposed limit per traced process. A read of one does not affect the
1381 1380  data being collected by the system for the others. An open of the page data
1382 1381  file will fail with \fBENOMEM\fR if the system-imposed limit would be exceeded.
1383 1382  .SS "watch"
1384      -.sp
1385 1383  .LP
1386 1384  Contains an array of \fBprwatch\fR structures, one for each watched area
1387 1385  established by the \fBPCWATCH\fR control operation. See \fBPCWATCH\fR for
1388 1386  details.
1389 1387  .SS "usage"
1390      -.sp
1391 1388  .LP
1392 1389  Contains process usage information described by a \fBprusage\fR structure which
1393 1390  contains at least the following fields:
1394 1391  .sp
1395 1392  .in +2
1396 1393  .nf
1397 1394  typedef struct prusage {
1398 1395      id_t pr_lwpid;           /* lwp id.  0: process or defunct */
1399 1396      int pr_count;            /* number of contributing lwps */
1400 1397      timestruc_t pr_tstamp;   /* real time stamp, time of read() */
↓ open down ↓ 26 lines elided ↑ open up ↑
1427 1424  .fi
1428 1425  .in -2
1429 1426  
1430 1427  .sp
1431 1428  .LP
1432 1429  Microstate accounting is now continuously enabled. While this information was
1433 1430  previously an estimate, if microstate accounting were not enabled, the current
1434 1431  information is now never an estimate represents time the process has spent in
1435 1432  various states.
1436 1433  .SS "lstatus"
1437      -.sp
1438 1434  .LP
1439 1435  Contains a \fBprheader\fR structure followed by an array of \fBlwpstatus\fR
1440 1436  structures, one for each active lwp in the process (see also
1441 1437  \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR/\fBlwpstatus\fR, below). The
1442 1438  \fBprheader\fR structure describes the number and size of the array entries
1443 1439  that follow.
1444 1440  .sp
1445 1441  .in +2
1446 1442  .nf
1447 1443  typedef struct prheader {
↓ open down ↓ 4 lines elided ↑ open up ↑
1452 1448  .in -2
1453 1449  
1454 1450  .sp
1455 1451  .LP
1456 1452  The \fBlwpstatus\fR structure may grow by the addition of elements at the end
1457 1453  in future releases of the system. Programs must use \fBpr_entsize\fR in the
1458 1454  file header to index through the array. These comments apply to all \fB/proc\fR
1459 1455  files that include a \fBprheader\fR structure (\fBlpsinfo\fR and \fBlusage\fR,
1460 1456  below).
1461 1457  .SS "lpsinfo"
1462      -.sp
1463 1458  .LP
1464 1459  Contains a \fBprheader\fR structure followed by an array of \fBlwpsinfo\fR
1465 1460  structures, one for eachactive and zombie lwp in the process. See also
1466 1461  \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR/\fBlwpsinfo\fR, below.
1467 1462  .SS "lusage"
1468      -.sp
1469 1463  .LP
1470 1464  Contains a \fBprheader\fR structure followed by an array of \fBprusage\fR
1471 1465  structures, one for each active lwp in the process, plus an additional element
1472 1466  at the beginning that contains the summation over all defunct lwps (lwps that
1473 1467  once existed but no longer exist in the process). Excluding the \fBpr_lwpid\fR,
1474 1468  \fBpr_tstamp\fR, \fBpr_create\fR, and \fBpr_term\fR entries, the entry-by-entry
1475 1469  summation over all these structures is the definition of the process usage
1476 1470  information obtained from the \fBusage\fR file. (See also
1477 1471  \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR/\fBlwpusage\fR, below.)
1478 1472  .SS "lwp"
1479      -.sp
1480 1473  .LP
1481 1474  A directory containing entries each of which names an active or zombie lwp
1482 1475  within the process. These entries are themselves directories containing
1483 1476  additional files as described below. Only the \fBlwpsinfo\fR file exists in the
1484 1477  directory of a zombie lwp.
1485 1478  .SH STRUCTURE OF \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR
1486      -.sp
1487 1479  .LP
1488 1480  A given directory \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwpid\fR contains the
1489 1481  following entries:
1490 1482  .SS "lwpctl"
1491      -.sp
1492 1483  .LP
1493 1484  Write-only control file. The messages written to this file affect the specific
1494 1485  lwp rather than the representative lwp, as is the case for the process's
1495 1486  \fBctl\fR file.
1496 1487  .SS "lwpstatus"
1497      -.sp
1498 1488  .LP
1499 1489  lwp-specific state information. This file contains the \fBlwpstatus\fR
1500 1490  structure for the specific lwp as described above for the representative lwp in
1501 1491  the process's \fBstatus\fR file.
1502 1492  .SS "lwpsinfo"
1503      -.sp
1504 1493  .LP
1505 1494  lwp-specific \fBps\fR(1) information. This file contains the \fBlwpsinfo\fR
1506 1495  structure for the specific lwp as described above for the representative lwp in
1507 1496  the process's \fBpsinfo\fR file. The \fBlwpsinfo\fR file remains accessible
1508 1497  after an lwp becomes a zombie.
1509 1498  .SS "lwpusage"
1510      -.sp
1511 1499  .LP
1512 1500  This file contains the \fBprusage\fR structure for the specific lwp as
1513 1501  described above for the process's \fBusage\fR file.
1514 1502  .SS "gwindows"
1515      -.sp
1516 1503  .LP
1517 1504  This file exists only on SPARC based machines. If it is non-empty, it contains
1518 1505  a \fBgwindows_t\fR structure, defined in \fB<sys/regset.h>\fR, with the values
1519 1506  of those SPARC register windows that could not be stored on the stack when the
1520 1507  lwp stopped. Conditions under which register windows are not stored on the
1521 1508  stack are: the stack pointer refers to nonexistent process memory or the stack
1522 1509  pointer is improperly aligned. If the lwp is not stopped or if there are no
1523 1510  register windows that could not be stored on the stack, the file is empty (the
1524 1511  usual case).
1525 1512  .SS "xregs"
1526      -.sp
1527 1513  .LP
1528 1514  Extra state registers. The extra state register set is architecture dependent;
1529 1515  this file is empty if the system does not support extra state registers. If the
1530 1516  file is non-empty, it contains an architecture dependent structure of type
1531 1517  \fBprxregset_t\fR, defined in \fB<procfs.h>\fR, with the values of the lwp's
1532 1518  extra state registers. If the lwp is not stopped, all register values are
1533 1519  undefined. See also the \fBPCSXREG\fR control operation, below.
1534 1520  .SS "asrs"
1535      -.sp
1536 1521  .LP
1537 1522  This file exists only for 64-bit SPARC V9 processes. It contains an
1538 1523  \fBasrset_t\fR structure, defined in <\fBsys/regset.h\fR>, containing the
1539 1524  values of the lwp's platform-dependent ancillary state registers. If the lwp is
1540 1525  not stopped, all register values are undefined. See also the \fBPCSASRS\fR
1541 1526  control operation, below.
1542 1527  .SS "spymaster"
1543      -.sp
1544 1528  .LP
1545 1529  For an agent lwp (see \fBPCAGENT\fR), this file contains a \fBpsinfo_t\fR
1546 1530  structure that corresponds to the process that created the agent lwp at the
1547 1531  time the agent was created. This structure is identical to that retrieved via
1548 1532  the \fBpsinfo\fR file, with one modification: the \fBpr_time\fR field does not
1549 1533  correspond to the CPU time for the process, but rather to the creation time of
1550 1534  the agent lwp.
1551 1535  .SS "templates"
1552      -.sp
1553 1536  .LP
1554 1537  A directory which contains references to the active templates for the lwp,
1555 1538  named by the contract type. Changes made to an active template descriptor do
1556 1539  not affect the original template which was activated, though they do affect the
1557 1540  active template. It is not possible to activate an active template descriptor.
1558 1541  See \fBcontract\fR(4).
1559 1542  .SH CONTROL MESSAGES
1560      -.sp
1561 1543  .LP
1562 1544  Process state changes are effected through messages written to a process's
1563 1545  \fBctl\fR file or to an individual lwp's \fBlwpctl\fR file. All control
1564 1546  messages consist of a \fBlong\fR that names the specific operation followed by
1565 1547  additional data containing the operand, if any.
1566 1548  .sp
1567 1549  .LP
1568 1550  Multiple control messages may be combined in a single \fBwrite\fR(2) (or
1569 1551  \fBwritev\fR(2)) to a control file, but no partial writes are permitted. That
1570 1552  is, each control message, operation code plus operand, if any, must be
1571 1553  presented in its entirety to the \fBwrite\fR(2) and not in pieces over several
1572 1554  system calls. If a control operation fails, no subsequent operations contained
1573 1555  in the same \fBwrite\fR(2) are attempted.
1574 1556  .sp
1575 1557  .LP
1576 1558  Descriptions of the allowable control messages follow. In all cases, writing a
1577 1559  message to a control file for a process or lwp that has terminated elicits the
1578 1560  error \fBENOENT\fR.
1579 1561  .SS "PCSTOP PCDSTOP PCWSTOP PCTWSTOP"
1580      -.sp
1581 1562  .LP
1582 1563  When applied to the process control file, \fBPCSTOP\fR directs all lwps to stop
1583 1564  and waits for them to stop, \fBPCDSTOP\fR directs all lwps to stop without
1584 1565  waiting for them to stop, and \fBPCWSTOP\fR simply waits for all lwps to stop.
1585 1566  When applied to an lwp control file, \fBPCSTOP\fR directs the specific lwp to
1586 1567  stop and waits until it has stopped, \fBPCDSTOP\fR directs the specific lwp to
1587 1568  stop without waiting for it to stop, and \fBPCWSTOP\fR simply waits for the
1588 1569  specific lwp to stop. When applied to an lwp control file, \fBPCSTOP\fR and
1589 1570  \fBPCWSTOP\fR complete when the lwp stops on an event of interest, immediately
1590 1571  if already so stopped; when applied to the process control file, they complete
↓ open down ↓ 28 lines elided ↑ open up ↑
1619 1600  interrupted, the lwp stop directives remain in effect even though the
1620 1601  \fBwrite\fR(2) returns an error. (Use of \fBPCTWSTOP\fR with a non-zero timeout
1621 1602  is recommended over \fBPCWSTOP\fR with an \fBalarm\fR(2).)
1622 1603  .sp
1623 1604  .LP
1624 1605  A system process (indicated by the \fBPR_ISSYS\fR flag) never executes at user
1625 1606  level, has no user-level address space visible through \fB/proc\fR, and cannot
1626 1607  be stopped. Applying one of these operations to a system process or any of its
1627 1608  lwps elicits the error \fBEBUSY\fR.
1628 1609  .SS "PCRUN"
1629      -.sp
1630 1610  .LP
1631 1611  Make an lwp runnable again after a stop. This operation takes a \fBlong\fR
1632 1612  operand containing zero or more of the following flags:
1633 1613  .sp
1634 1614  .ne 2
1635 1615  .na
1636 1616  \fB\fBPRCSIG\fR\fR
1637 1617  .ad
1638 1618  .RS 12n
1639 1619  clears the current signal, if any (see \fBPCCSIG\fR).
↓ open down ↓ 60 lines elided ↑ open up ↑
1700 1680  the operation as described for \fB/proc/\fR\fIpid\fR\fB/status\fR. The
1701 1681  operation fails with \fBEBUSY\fR if the representative lwp is not stopped on an
1702 1682  event of interest or has not been directed to stop or if the agent lwp exists.
1703 1683  If \fBPRSTEP\fR or \fBPRSTOP\fR was requested, the representative lwp is made
1704 1684  runnable and its outstanding directed-stop request is cleared; otherwise all
1705 1685  outstanding directed-stop requests are cleared and, if it was stopped on an
1706 1686  event of interest, the representative lwp is marked \fBPR_REQUESTED\fR. If, as
1707 1687  a consequence, all lwps are in the \fBPR_REQUESTED\fR or \fBPR_SUSPENDED\fR
1708 1688  stop state, all lwps showing \fBPR_REQUESTED\fR are made runnable.
1709 1689  .SS "PCSTRACE"
1710      -.sp
1711 1690  .LP
1712 1691  Define a set of signals to be traced in the process. The receipt of one of
1713 1692  these signals by an lwp causes the lwp to stop. The set of signals is defined
1714 1693  using an operand \fBsigset_t\fR contained in the control message. Receipt of
1715 1694  \fBSIGKILL\fR cannot be traced; if specified, it is silently ignored.
1716 1695  .sp
1717 1696  .LP
1718 1697  If a signal that is included in an lwp's held signal set (the signal mask) is
1719 1698  sent to the lwp, the signal is not received and does not cause a stop until it
1720 1699  is removed from the held signal set, either by the lwp itself or by setting the
1721 1700  held signal set with \fBPCSHOLD\fR.
1722 1701  .SS "PCCSIG"
1723      -.sp
1724 1702  .LP
1725 1703  The current signal, if any, is cleared from the specific or representative lwp.
1726 1704  .SS "PCSSIG"
1727      -.sp
1728 1705  .LP
1729 1706  The current signal and its associated signal information for the specific or
1730 1707  representative lwp are set according to the contents of the operand
1731 1708  \fBsiginfo\fR structure (see \fB<sys/siginfo.h>\fR). If the specified signal
1732 1709  number is zero, the current signal is cleared. The semantics of this operation
1733 1710  are different from those of \fBkill\fR(2) in that the signal is delivered to
1734 1711  the lwp immediately after execution is resumed (even if it is being blocked)
1735 1712  and an additional \fBPR_SIGNALLED\fR stop does not intervene even if the signal
1736 1713  is traced. Setting the current signal to \fBSIGKILL\fR terminates the process
1737 1714  immediately.
1738 1715  .SS "PCKILL"
1739      -.sp
1740 1716  .LP
1741 1717  If applied to the process control file, a signal is sent to the process with
1742 1718  semantics identical to those of \fBkill\fR(2). If applied to an lwp control
1743 1719  file, a directed signal is sent to the specific lwp. The signal is named in a
1744 1720  \fBlong\fR operand contained in the message. Sending \fBSIGKILL\fR terminates
1745 1721  the process immediately.
1746 1722  .SS "PCUNKILL"
1747      -.sp
1748 1723  .LP
1749 1724  A signal is deleted, that is, it is removed from the set of pending signals. If
1750 1725  applied to the process control file, the signal is deleted from the process's
1751 1726  pending signals. If applied to an lwp control file, the signal is deleted from
1752 1727  the lwp's pending signals. The current signal (if any) is unaffected. The
1753 1728  signal is named in a \fBlong\fR operand in the control message. It is an error
1754 1729  (\fBEINVAL\fR) to attempt to delete \fBSIGKILL\fR.
1755 1730  .SS "PCSHOLD"
1756      -.sp
1757 1731  .LP
1758 1732  Set the set of held signals for the specific or representative lwp (signals
1759 1733  whose delivery will be blocked if sent to the lwp). The set of signals is
1760 1734  specified with a \fBsigset_t\fR operand. \fBSIGKILL\fR and \fBSIGSTOP\fR cannot
1761 1735  be held; if specified, they are silently ignored.
1762 1736  .SS "PCSFAULT"
1763      -.sp
1764 1737  .LP
1765 1738  Define a set of hardware faults to be traced in the process. On incurring one
1766 1739  of these faults, an lwp stops. The set is defined via the operand
1767 1740  \fBfltset_t\fR structure. Fault names are defined in \fB<sys/fault.h>\fR and
1768 1741  include the following. Some of these may not occur on all processors; there may
1769 1742  be processor-specific faults in addition to these.
1770 1743  .sp
1771 1744  .ne 2
1772 1745  .na
1773 1746  \fB\fBFLTILL\fR\fR
↓ open down ↓ 104 lines elided ↑ open up ↑
1878 1851  .sp
1879 1852  .LP
1880 1853  When not traced, a fault normally results in the posting of a signal to the lwp
1881 1854  that incurred the fault. If an lwp stops on a fault, the signal is posted to
1882 1855  the lwp when execution is resumed unless the fault is cleared by \fBPCCFAULT\fR
1883 1856  or by the \fBPRCFAULT\fR option of \fBPCRUN\fR. \fBFLTPAGE\fR is an exception;
1884 1857  no signal is posted. The \fBpr_info\fR field in the \fBlwpstatus\fR structure
1885 1858  identifies the signal to be sent and contains machine-specific information
1886 1859  about the fault.
1887 1860  .SS "PCCFAULT"
1888      -.sp
1889 1861  .LP
1890 1862  The current fault, if any, is cleared; the associated signal will not be sent
1891 1863  to the specific or representative lwp.
1892 1864  .SS "PCSENTRY PCSEXIT"
1893      -.sp
1894 1865  .LP
1895 1866  These control operations instruct the process's lwps to stop on entry to or
1896 1867  exit from specified system calls. The set of system calls to be traced is
1897 1868  defined via an operand \fBsysset_t\fR structure.
1898 1869  .sp
1899 1870  .LP
1900 1871  When entry to a system call is being traced, an lwp stops after having begun
1901 1872  the call to the system but before the system call arguments have been fetched
1902 1873  from the lwp. When exit from a system call is being traced, an lwp stops on
1903 1874  completion of the system call just prior to checking for signals and returning
1904 1875  to user level. At this point, all return values have been stored into the lwp's
1905 1876  registers.
1906 1877  .sp
1907 1878  .LP
1908 1879  If an lwp is stopped on entry to a system call (\fBPR_SYSENTRY\fR) or when
1909 1880  sleeping in an interruptible system call (\fBPR_ASLEEP\fR is set), it may be
1910 1881  instructed to go directly to system call exit by specifying the \fBPRSABORT\fR
1911 1882  flag in a \fBPCRUN\fR control message. Unless exit from the system call is
1912 1883  being traced, the lwp returns to user level showing \fBEINTR\fR.
1913 1884  .SS "PCWATCH"
1914      -.sp
1915 1885  .LP
1916 1886  Set or clear a watched area in the controlled process from a \fBprwatch\fR
1917 1887  structure operand:
1918 1888  .sp
1919 1889  .in +2
1920 1890  .nf
1921 1891  typedef struct prwatch {
1922 1892      uintptr_t pr_vaddr;  /* virtual address of watched area */
1923 1893      size_t pr_size;      /* size of watched area in bytes */
1924 1894      int pr_wflags;       /* watch type flags */
↓ open down ↓ 128 lines elided ↑ open up ↑
2053 2023  entered, watchpoint traps occur normally. On SPARC based machines, register
2054 2024  window overflow and underflow will not trigger watchpoint traps, even if the
2055 2025  register window save areas cover watched areas of the stack.
2056 2026  .sp
2057 2027  .LP
2058 2028  Watched areas are not inherited by child processes, even if the traced
2059 2029  process's inherit-on-fork mode, \fBPR_FORK\fR, is set (see \fBPCSET\fR, below).
2060 2030  All watched areas are cancelled when the traced process performs a successful
2061 2031  \fBexec\fR(2).
2062 2032  .SS "PCSET PCUNSET"
2063      -.sp
2064 2033  .LP
2065 2034  \fBPCSET\fR sets one or more modes of operation for the traced process.
2066 2035  \fBPCUNSET\fR unsets these modes. The modes to be set or unset are specified by
2067 2036  flags in an operand \fBlong\fR in the control message:
2068 2037  .sp
2069 2038  .ne 2
2070 2039  .na
2071 2040  \fB\fBPR_FORK\fR\fR
2072 2041  .ad
2073 2042  .RS 13n
↓ open down ↓ 95 lines elided ↑ open up ↑
2169 2138  function using \fB/proc\fR.
2170 2139  .RE
2171 2140  
2172 2141  .sp
2173 2142  .LP
2174 2143  It is an error (\fBEINVAL\fR) to specify flags other than those described above
2175 2144  or to apply these operations to a system process. The current modes are
2176 2145  reported in the \fBpr_flags\fR field of \fB/proc/\fR\fIpid\fR\fB/status\fR and
2177 2146  \fB/proc/\fR\fIpid\fR\fB/lwp/\fR\fIlwp\fR\fB/lwpstatus\fR.
2178 2147  .SS "PCSREG"
2179      -.sp
2180 2148  .LP
2181 2149  Set the general registers for the specific or representative lwp according to
2182 2150  the operand \fBprgregset_t\fR structure.
2183 2151  .sp
2184 2152  .LP
2185 2153  On SPARC based systems, only the condition-code bits of the processor-status
2186 2154  register (R_PSR) of SPARC V8 (32-bit) processes can be modified by
2187 2155  \fBPCSREG\fR. Other privileged registers cannot be modified at all.
2188 2156  .sp
2189 2157  .LP
2190 2158  On x86-based systems, only certain bits of the flags register (EFL) can be
2191 2159  modified by \fBPCSREG\fR: these include the condition codes, direction-bit, and
2192 2160  overflow-bit.
2193 2161  .sp
2194 2162  .LP
2195 2163  \fBPCSREG\fR fails with \fBEBUSY\fR if the lwp is not stopped on an event of
2196 2164  interest.
2197 2165  .SS "PCSVADDR"
2198      -.sp
2199 2166  .LP
2200 2167  Set the address at which execution will resume for the specific or
2201 2168  representative lwp from the operand \fBlong\fR. On SPARC based systems, both
2202 2169  %pc and %npc are set, with %npc set to the instruction following the virtual
2203 2170  address. On x86-based systems, only %eip is set. \fBPCSVADDR\fR fails with
2204 2171  \fBEBUSY\fR if the lwp is not stopped on an event of interest.
2205 2172  .SS "PCSFPREG"
2206      -.sp
2207 2173  .LP
2208 2174  Set the floating-point registers for the specific or representative lwp
2209 2175  according to the operand \fBprfpregset_t\fR structure. An error (\fBEINVAL\fR)
2210 2176  is returned if the system does not support floating-point operations (no
2211 2177  floating-point hardware and the system does not emulate floating-point machine
2212 2178  instructions). \fBPCSFPREG\fR fails with \fBEBUSY\fR if the lwp is not stopped
2213 2179  on an event of interest.
2214 2180  .SS "PCSXREG"
2215      -.sp
2216 2181  .LP
2217 2182  Set the extra state registers for the specific or representative lwp according
2218 2183  to the architecture-dependent operand \fBprxregset_t\fR structure. An error
2219 2184  (\fBEINVAL\fR) is returned if the system does not support extra state
2220 2185  registers. \fBPCSXREG\fR fails with \fBEBUSY\fR if the lwp is not stopped on an
2221 2186  event of interest.
2222 2187  .SS "PCSASRS"
2223      -.sp
2224 2188  .LP
2225 2189  Set the ancillary state registers for the specific or representative lwp
2226 2190  according to the SPARC V9 platform-dependent operand \fBasrset_t\fR structure.
2227 2191  An error (\fBEINVAL\fR) is returned if either the target process or the
2228 2192  controlling process is not a 64-bit SPARC V9 process. Most of the ancillary
2229 2193  state registers are privileged registers that cannot be modified. Only those
2230 2194  that can be modified are set; all others are silently ignored. \fBPCSASRS\fR
2231 2195  fails with \fBEBUSY\fR if the lwp is not stopped on an event of interest.
2232 2196  .SS "PCAGENT"
2233      -.sp
2234 2197  .LP
2235 2198  Create an agent lwp in the controlled process with register values from the
2236 2199  operand \fBprgregset_t\fR structure (see \fBPCSREG\fR, above). The agent lwp is
2237 2200  created in the stopped state showing \fBPR_REQUESTED\fR and with its held
2238 2201  signal set (the signal mask) having all signals except \fBSIGKILL\fR and
2239 2202  \fBSIGSTOP\fR blocked.
2240 2203  .sp
2241 2204  .LP
2242 2205  The \fBPCAGENT\fR operation fails with \fBEBUSY\fR unless the process is fully
2243 2206  stopped via \fB/proc\fR, that is, unless all of the lwps in the process are
↓ open down ↓ 40 lines elided ↑ open up ↑
2284 2247  .sp
2285 2248  .LP
2286 2249  The agent lwp is not allowed to execute any variation of the \fBSYS_fork\fR or
2287 2250  \fBSYS_exec\fR system call traps. Attempts to do so yield \fBENOTSUP\fR to the
2288 2251  agent lwp.
2289 2252  .sp
2290 2253  .LP
2291 2254  Symbolic constants for system call trap numbers like \fBSYS_lwp_exit\fR and
2292 2255  \fBSYS_lwp_create\fR can be found in the header file <\fBsys/syscall.h\fR>.
2293 2256  .SS "PCREAD PCWRITE"
2294      -.sp
2295 2257  .LP
2296 2258  Read or write the target process's address space via a \fBpriovec\fR structure
2297 2259  operand:
2298 2260  .sp
2299 2261  .in +2
2300 2262  .nf
2301 2263  typedef struct priovec {
2302 2264      void *pio_base;      /* buffer in controlling process */
2303 2265      size_t pio_len;      /* size of read/write request in bytes */
2304 2266      off_t pio_offset;    /* virtual address in target process */
↓ open down ↓ 6 lines elided ↑ open up ↑
2311 2273  These operations have the same effect as \fBpread\fR(2) and \fBpwrite\fR(2),
2312 2274  respectively, of the target process's address space file. The difference is
2313 2275  that more than one \fBPCREAD\fR or \fBPCWRITE\fR control operation can be
2314 2276  written to the control file at once, and they can be interspersed with other
2315 2277  control operations in a single write to the control file. This is useful, for
2316 2278  example, when planting many breakpoint instructions in the process's address
2317 2279  space, or when stepping over a breakpointed instruction. Unlike \fBpread\fR(2)
2318 2280  and \fBpwrite\fR(2), no provision is made for partial reads or writes; if the
2319 2281  operation cannot be performed completely, it fails with \fBEIO\fR.
2320 2282  .SS "PCNICE"
2321      -.sp
2322 2283  .LP
2323 2284  The traced process's \fBnice\fR(2) value is incremented by the amount in the
2324 2285  operand \fBlong\fR. Only a process with the {\fBPRIV_PROC_PRIOCNTL\fR}
2325 2286  privilege asserted in its effective set can better a process's priority in this
2326 2287  way, but any user may lower the priority. This operation is not meaningful for
2327 2288  all scheduling classes.
2328 2289  .SS "PCSCRED"
2329      -.sp
2330 2290  .LP
2331 2291  Set the target process credentials to the values contained in the
2332 2292  \fBprcred_t\fR structure operand (see \fB/proc/\fR\fIpid\fR\fB/cred\fR). The
2333 2293  effective, real, and saved user-IDs and group-IDs of the target process are
2334 2294  set. The target process's supplementary groups are not changed; the
2335 2295  \fBpr_ngroups\fR and \fBpr_groups\fR members of the structure operand are
2336 2296  ignored. Only the privileged processes can perform this operation; for all
2337 2297  others it fails with \fBEPERM\fR.
2338 2298  .SS "PCSCREDX"
2339      -.sp
2340 2299  .LP
2341 2300  Operates like \fBPCSCRED\fR but also sets the supplementary groups; the length
2342 2301  of the data written with this control operation should be "sizeof
2343 2302  (\fBprcred_t\fR) + sizeof (\fBgid_t)\fR * (#groups - 1)".
2344 2303  .SS "PCSPRIV"
2345      -.sp
2346 2304  .LP
2347 2305  Set the target process privilege to the values contained in the \fBprpriv_t\fR
2348 2306  operand (see \fB/proc/pid/priv\fR). The effective, permitted, inheritable, and
2349 2307  limit sets are all changed. Privilege flags can also be set. The process is
2350 2308  made privilege aware unless it can relinquish privilege awareness. See
2351 2309  \fBprivileges\fR(5).
2352 2310  .sp
2353 2311  .LP
2354 2312  The limit set of the target process cannot be grown. The other privilege sets
2355 2313  must be subsets of the intersection of the effective set of the calling process
2356 2314  with the new limit set of the target process or subsets of the original values
2357 2315  of the sets in the target process.
2358 2316  .sp
2359 2317  .LP
2360 2318  If any of the above restrictions are not met, \fBEPERM\fR is returned. If the
2361 2319  structure written is improperly formatted, \fBEINVAL\fR is returned.
2362 2320  .SH PROGRAMMING NOTES
2363      -.sp
2364 2321  .LP
2365 2322  For security reasons, except for the \fBpsinfo\fR, \fBusage\fR, \fBlpsinfo\fR,
2366 2323  \fBlusage\fR, \fBlwpsinfo\fR, and \fBlwpusage\fR files, which are
2367 2324  world-readable, and except for privileged processes, an open of a \fB/proc\fR
2368 2325  file fails unless both the user-ID and group-ID of the caller match those of
2369 2326  the traced process and the process's object file is readable by the caller. The
2370 2327  effective set of the caller is a superset of both the inheritable and the
2371 2328  permitted set of the target process. The limit set of the caller is a superset
2372 2329  of the limit set of the target process. Except for the world-readable files
2373 2330  just mentioned, files corresponding to setuid and setgid processes can be
↓ open down ↓ 38 lines elided ↑ open up ↑
2412 2369  requested and returned, either of the polling events \fBPOLLPRI\fR or
2413 2370  \fBPOLLWRNORM\fR indicates that the process or lwp stopped on an event of
2414 2371  interest. Although they cannot be requested, the polling events \fBPOLLHUP\fR,
2415 2372  \fBPOLLERR\fR, and \fBPOLLNVAL\fR may be returned. \fBPOLLHUP\fR indicates that
2416 2373  the process or lwp has terminated. \fBPOLLERR\fR indicates that the file
2417 2374  descriptor has become invalid. \fBPOLLNVAL\fR is returned immediately if
2418 2375  \fBPOLLPRI\fR or \fBPOLLWRNORM\fR is requested on a file descriptor referring
2419 2376  to a system process (see \fBPCSTOP\fR). The requested events may be empty to
2420 2377  wait simply for termination.
2421 2378  .SH FILES
2422      -.sp
2423 2379  .ne 2
2424 2380  .na
2425 2381  \fB\fB/proc\fR\fR
2426 2382  .ad
2427 2383  .sp .6
2428 2384  .RS 4n
2429 2385  directory (list of processes)
2430 2386  .RE
2431 2387  
2432 2388  .sp
↓ open down ↓ 380 lines elided ↑ open up ↑
2813 2769  .ne 2
2814 2770  .na
2815 2771  \fB\fB/proc/\fIpid\fR/lwp/\fIlwpid\fR/spymaster\fR\fR
2816 2772  .ad
2817 2773  .sp .6
2818 2774  .RS 4n
2819 2775  For an agent LWP, the controlling process
2820 2776  .RE
2821 2777  
2822 2778  .SH SEE ALSO
2823      -.sp
2824 2779  .LP
2825 2780  \fBls\fR(1), \fBps\fR(1), \fBchroot\fR(1M), \fBalarm\fR(2), \fBbrk\fR(2),
2826 2781  \fBchdir\fR(2), \fBchroot\fR(2), \fBclose\fR(2), \fBcreat\fR(2), \fBdup\fR(2),
2827 2782  \fBexec\fR(2), \fBfcntl\fR(2), \fBfork\fR(2), \fBfork1\fR(2), \fBfstat\fR(2),
2828 2783  \fBgetdents\fR(2), \fBgetustack\fR(2), \fBkill\fR(2), \fBlseek\fR(2),
2829 2784  \fBmmap\fR(2), \fBnice\fR(2), \fBopen\fR(2), \fBpoll\fR(2), \fBpread\fR(2),
2830 2785  \fBptrace\fR(3C), \fBpwrite\fR(2), \fBread\fR(2), \fBreadlink\fR(2),
2831 2786  \fBreadv\fR(2), \fBshmget\fR(2), \fBsigaction\fR(2), \fBsigaltstack\fR(2),
2832 2787  \fBvfork\fR(2), \fBwrite\fR(2), \fBwritev\fR(2), \fB_stack_grow\fR(3C),
2833 2788  \fBreaddir\fR(3C), \fBpthread_create\fR(3C), \fBpthread_join\fR(3C),
2834 2789  \fBsiginfo.h\fR(3HEAD), \fBsignal.h\fR(3HEAD), \fBthr_create\fR(3C),
2835 2790  \fBthr_join\fR(3C), \fBtypes32.h\fR(3HEAD), \fBucontext.h\fR(3HEAD),
2836 2791  \fBwait\fR(3C), \fBcontract\fR(4), \fBcore\fR(4), \fBprocess\fR(4),
2837      -\fBlfcompile\fR(5), \fBprivileges\fR(5)
     2792 +\fBlfcompile\fR(5), \fBprivileges\fR(5), \fBsecurity-flags\fR(5)
2838 2793  .SH DIAGNOSTICS
2839      -.sp
2840 2794  .LP
2841 2795  Errors that can occur in addition to the errors normally associated with file
2842 2796  system access:
2843 2797  .sp
2844 2798  .ne 2
2845 2799  .na
2846 2800  \fB\fBE2BIG\fR\fR
2847 2801  .ad
2848 2802  .RS 13n
2849 2803  Data to be returned in a \fBread\fR(2) of the page data file exceeds the size
↓ open down ↓ 134 lines elided ↑ open up ↑
2984 2938  sets were not a subset of the effective set of the controlling process or the
2985 2939  limit set of the controlling process is not a superset of limit set of the
2986 2940  controlled process.
2987 2941  .sp
2988 2942  Any of the uids of the target process are 0 or an attempt was made to change
2989 2943  any of the uids to 0 using PCSCRED and the security policy imposed additional
2990 2944  restrictions. See \fBprivileges\fR(5).
2991 2945  .RE
2992 2946  
2993 2947  .SH NOTES
2994      -.sp
2995 2948  .LP
2996 2949  Descriptions of structures in this document include only interesting structure
2997 2950  elements, not filler and padding fields, and may show elements out of order for
2998 2951  descriptive clarity. The actual structure definitions are contained in
2999 2952  \fB<procfs.h>\fR\&.
3000 2953  .SH BUGS
3001      -.sp
3002 2954  .LP
3003 2955  Because the old \fBioctl\fR(2)-based version of \fB/proc\fR is currently
3004 2956  supported for binary compatibility with old applications, the top-level
3005 2957  directory for a process, \fB/proc/\fR\fIpid\fR, is not world-readable, but it
3006 2958  is world-searchable. Thus, anyone can open \fB/proc/\fR\fIpid\fR\fB/psinfo\fR
3007 2959  even though \fBls\fR(1) applied to \fB/proc/\fR\fIpid\fR will fail for anyone
3008 2960  but the owner or an appropriately privileged process. Support for the old
3009 2961  \fBioctl\fR(2)-based version of \fB/proc\fR will be dropped in a future
3010 2962  release, at which time the top-level directory for a process will be made
3011 2963  world-readable.
3012 2964  .sp
3013 2965  .LP
3014 2966  On SPARC based machines, the types \fBgregset_t\fR and \fBfpregset_t\fR defined
3015 2967  in <\fBsys/regset.h\fR> are similar to but not the same as the types
3016 2968  \fBprgregset_t\fR and \fBprfpregset_t\fR defined in <\fBprocfs.h\fR>.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX