Print this page
Code review comments from jeffpc
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.


 823               uint32_t        pr_setsize;    /* size of privilege set */
 824               uint32_t        pr_infosize;   /* size of supplementary data */
 825               priv_chunk_t    pr_sets[1];    /* array of sets */
 826          } prpriv_t;
 827 
 828 
 829 
 830        The actual dimension of the pr_sets[] field is
 831 
 832          pr_sets[pr_nsets][pr_setsize]
 833 
 834 
 835 
 836        which is followed by additional information about the process state
 837        pr_infosize bytes in size.
 838 
 839 
 840        The full size of the structure can be computed using
 841        PRIV_PRPRIV_SIZE(prpriv_t *).
 842 

















 843    sigact
 844        Contains an array of sigaction structures describing the current
 845        dispositions of all signals associated with the traced process (see
 846        sigaction(2)). Signal numbers are displaced by 1 from array indices, so
 847        that the action for signal number n appears in position n-1 of the
 848        array.
 849 
 850    auxv
 851        Contains the initial values of the process's aux vector in an array of
 852        auxv_t structures (see <sys/auxv.h>). The values   are those that were
 853        passed by the operating system as startup information to the dynamic
 854        linker.
 855 
 856    ldt
 857        This file exists only on x86-based machines. It is non-empty only if
 858        the process has established a local descriptor table (LDT). If non-
 859        empty, the file contains the array of currently active LDT entries in
 860        an array of elements of type struct ssd, defined in <sys/sysi86.h>, one
 861        element for each active LDT entry.
 862 


2170        /proc/pid/lwp/lwpid/asrs
2171 
2172            ancillary state registers (SPARC V9 only)
2173 
2174 
2175        /proc/pid/lwp/lwpid/spymaster
2176 
2177            For an agent LWP, the controlling process
2178 
2179 
2180 SEE ALSO
2181        ls(1), ps(1), chroot(1M), alarm(2), brk(2), chdir(2), chroot(2),
2182        close(2), creat(2), dup(2), exec(2), fcntl(2), fork(2), fork1(2),
2183        fstat(2), getdents(2), getustack(2), kill(2), lseek(2), mmap(2),
2184        nice(2), open(2), poll(2), pread(2), ptrace(3C), pwrite(2), read(2),
2185        readlink(2), readv(2), shmget(2), sigaction(2), sigaltstack(2),
2186        vfork(2), write(2), writev(2), _stack_grow(3C), readdir(3C),
2187        pthread_create(3C), pthread_join(3C), siginfo.h(3HEAD),
2188        signal.h(3HEAD), thr_create(3C), thr_join(3C), types32.h(3HEAD),
2189        ucontext.h(3HEAD), wait(3C), contract(4), core(4), process(4),
2190        lfcompile(5), privileges(5)
2191 
2192 DIAGNOSTICS
2193        Errors that can occur in addition to the errors normally associated
2194        with file system access:
2195 
2196        E2BIG
2197                     Data to be returned in a read(2) of the page data file
2198                     exceeds the size of the read buffer provided by the
2199                     caller.
2200 
2201 
2202        EACCES
2203                     An attempt was made to examine a process that ran under a
2204                     different uid than the controlling process and
2205                     {PRIV_PROC_OWNER} was not asserted in the effective set.
2206 
2207 
2208        EAGAIN
2209                     The traced process has performed an exec(2) of a
2210                     setuid/setgid object file or of an object file that it


2303        elements out of order for descriptive clarity. The actual structure
2304        definitions are contained in <procfs.h>.
2305 
2306 BUGS
2307        Because the old ioctl(2)-based version of /proc is currently supported
2308        for binary compatibility with old applications, the top-level directory
2309        for a process, /proc/pid, is not world-readable, but it is world-
2310        searchable. Thus, anyone can open /proc/pid/psinfo even though ls(1)
2311        applied to /proc/pid will fail for anyone but the owner or an
2312        appropriately privileged process. Support for the old ioctl(2)-based
2313        version of /proc will be dropped in a future release, at which time the
2314        top-level directory for a process will be made world-readable.
2315 
2316 
2317        On SPARC based machines, the types gregset_t and fpregset_t defined in
2318        <sys/regset.h> are similar to but not the same as the types prgregset_t
2319        and prfpregset_t defined in <procfs.h>.
2320 
2321 
2322 
2323                                 March 31, 2013                         PROC(4)


 823               uint32_t        pr_setsize;    /* size of privilege set */
 824               uint32_t        pr_infosize;   /* size of supplementary data */
 825               priv_chunk_t    pr_sets[1];    /* array of sets */
 826          } prpriv_t;
 827 
 828 
 829 
 830        The actual dimension of the pr_sets[] field is
 831 
 832          pr_sets[pr_nsets][pr_setsize]
 833 
 834 
 835 
 836        which is followed by additional information about the process state
 837        pr_infosize bytes in size.
 838 
 839 
 840        The full size of the structure can be computed using
 841        PRIV_PRPRIV_SIZE(prpriv_t *).
 842 
 843    secflags
 844        This file contains the security-flags of the process.  It contains a
 845        description of the security flags associated with the process.
 846 
 847          typedef struct prsecflags {
 848               uint32_t pr_version;          /* ABI Versioning of this structure */
 849               secflagset_t pr_effective;    /* Effective flags */
 850               secflagset_t pr_inherit; /* Inheritable flags */
 851               secflagset_t pr_lower;        /* Lower flags */
 852               secflagset_t pr_upper;        /* Upper flags */
 853          } prsecflags_t;
 854 
 855 
 856 
 857        The pr_version field is a version number for the structure, currently
 858        PRSECFLAGS_VERSION_1.
 859 
 860    sigact
 861        Contains an array of sigaction structures describing the current
 862        dispositions of all signals associated with the traced process (see
 863        sigaction(2)). Signal numbers are displaced by 1 from array indices, so
 864        that the action for signal number n appears in position n-1 of the
 865        array.
 866 
 867    auxv
 868        Contains the initial values of the process's aux vector in an array of
 869        auxv_t structures (see <sys/auxv.h>). The values   are those that were
 870        passed by the operating system as startup information to the dynamic
 871        linker.
 872 
 873    ldt
 874        This file exists only on x86-based machines. It is non-empty only if
 875        the process has established a local descriptor table (LDT). If non-
 876        empty, the file contains the array of currently active LDT entries in
 877        an array of elements of type struct ssd, defined in <sys/sysi86.h>, one
 878        element for each active LDT entry.
 879 


2187        /proc/pid/lwp/lwpid/asrs
2188 
2189            ancillary state registers (SPARC V9 only)
2190 
2191 
2192        /proc/pid/lwp/lwpid/spymaster
2193 
2194            For an agent LWP, the controlling process
2195 
2196 
2197 SEE ALSO
2198        ls(1), ps(1), chroot(1M), alarm(2), brk(2), chdir(2), chroot(2),
2199        close(2), creat(2), dup(2), exec(2), fcntl(2), fork(2), fork1(2),
2200        fstat(2), getdents(2), getustack(2), kill(2), lseek(2), mmap(2),
2201        nice(2), open(2), poll(2), pread(2), ptrace(3C), pwrite(2), read(2),
2202        readlink(2), readv(2), shmget(2), sigaction(2), sigaltstack(2),
2203        vfork(2), write(2), writev(2), _stack_grow(3C), readdir(3C),
2204        pthread_create(3C), pthread_join(3C), siginfo.h(3HEAD),
2205        signal.h(3HEAD), thr_create(3C), thr_join(3C), types32.h(3HEAD),
2206        ucontext.h(3HEAD), wait(3C), contract(4), core(4), process(4),
2207        lfcompile(5), privileges(5), security-flags(5)
2208 
2209 DIAGNOSTICS
2210        Errors that can occur in addition to the errors normally associated
2211        with file system access:
2212 
2213        E2BIG
2214                     Data to be returned in a read(2) of the page data file
2215                     exceeds the size of the read buffer provided by the
2216                     caller.
2217 
2218 
2219        EACCES
2220                     An attempt was made to examine a process that ran under a
2221                     different uid than the controlling process and
2222                     {PRIV_PROC_OWNER} was not asserted in the effective set.
2223 
2224 
2225        EAGAIN
2226                     The traced process has performed an exec(2) of a
2227                     setuid/setgid object file or of an object file that it


2320        elements out of order for descriptive clarity. The actual structure
2321        definitions are contained in <procfs.h>.
2322 
2323 BUGS
2324        Because the old ioctl(2)-based version of /proc is currently supported
2325        for binary compatibility with old applications, the top-level directory
2326        for a process, /proc/pid, is not world-readable, but it is world-
2327        searchable. Thus, anyone can open /proc/pid/psinfo even though ls(1)
2328        applied to /proc/pid will fail for anyone but the owner or an
2329        appropriately privileged process. Support for the old ioctl(2)-based
2330        version of /proc will be dropped in a future release, at which time the
2331        top-level directory for a process will be made world-readable.
2332 
2333 
2334        On SPARC based machines, the types gregset_t and fpregset_t defined in
2335        <sys/regset.h> are similar to but not the same as the types prgregset_t
2336        and prfpregset_t defined in <procfs.h>.
2337 
2338 
2339 
2340                                  June 6, 2016                          PROC(4)