Print this page
uts: Allow for address space randomisation.
Randomise the base addresses of shared objects, non-fixed mappings, the
stack and the heap.  Introduce a service, svc:/system/process-security,
and a tool psecflags(1) to control and observe it

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/procfs.h
          +++ new/usr/src/uts/common/sys/procfs.h
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57  #include <sys/time_impl.h>
  58   58  #include <sys/signal.h>
  59   59  #include <sys/siginfo.h>
  60   60  #include <sys/fault.h>
  61   61  #include <sys/syscall.h>
  62   62  #include <sys/pset.h>
  63   63  #include <sys/procfs_isa.h>
  64   64  #include <sys/priv.h>
  65   65  #include <sys/stat.h>
  66   66  #include <sys/param.h>
       67 +#include <sys/secflags.h>
  67   68  
  68   69  /*
  69   70   * System call interfaces for /proc.
  70   71   */
  71   72  
  72   73  /*
  73   74   * Control codes (long values) for messages written to ctl and lwpctl files.
  74   75   */
  75   76  #define PCNULL   0L     /* null request, advance to next message */
  76   77  #define PCSTOP   1L     /* direct process or lwp to stop and wait for stop */
↓ open down ↓ 96 lines elided ↑ open up ↑
 173  174          sigset_t pr_sigtrace;   /* set of traced signals */
 174  175          fltset_t pr_flttrace;   /* set of traced faults */
 175  176          sysset_t pr_sysentry;   /* set of system calls traced on entry */
 176  177          sysset_t pr_sysexit;    /* set of system calls traced on exit */
 177  178          char    pr_dmodel;      /* data model of the process (see below) */
 178  179          char    pr_pad[3];
 179  180          taskid_t pr_taskid;     /* task id */
 180  181          projid_t pr_projid;     /* project id */
 181  182          int     pr_nzomb;       /* number of zombie lwps in the process */
 182  183          zoneid_t pr_zoneid;     /* zone id */
 183      -        int     pr_filler[15];  /* reserved for future use */
      184 +        psecflags_t pr_secflags; /* security flags */
      185 +        int     pr_filler[13];  /* reserved for future use */
 184  186          lwpstatus_t pr_lwp;     /* status of the representative lwp */
 185  187  } pstatus_t;
 186  188  
 187  189  /*
 188  190   * pr_flags (same values appear in both pstatus_t and lwpstatus_t pr_flags).
 189  191   *
 190  192   * These flags do *not* apply to psinfo_t.pr_flag or lwpsinfo_t.pr_flag
 191  193   * (which are both deprecated).
 192  194   */
 193  195  /* The following flags apply to the specific or representative lwp */
↓ open down ↓ 436 lines elided ↑ open up ↑
 630  632          sigset_t pr_sigtrace;   /* set of traced signals */
 631  633          fltset_t pr_flttrace;   /* set of traced faults */
 632  634          sysset_t pr_sysentry;   /* set of system calls traced on entry */
 633  635          sysset_t pr_sysexit;    /* set of system calls traced on exit */
 634  636          char    pr_dmodel;      /* data model of the process */
 635  637          char    pr_pad[3];
 636  638          id32_t  pr_taskid;      /* task id */
 637  639          id32_t  pr_projid;      /* project id */
 638  640          int     pr_nzomb;       /* number of zombie lwps in the process */
 639  641          id32_t  pr_zoneid;      /* zone id */
 640      -        int     pr_filler[15];  /* reserved for future use */
      642 +        psecflags_t pr_secflags; /* security flags */
      643 +        int     pr_filler[13];  /* reserved for future use */
 641  644          lwpstatus32_t pr_lwp;   /* status of the representative lwp */
 642  645  } pstatus32_t;
 643  646  
 644  647  /*
 645  648   * _ILP32 lwp ps(1) information file.  /proc/<pid>/lwp/<lwpid>/lwpsinfo
 646  649   */
 647  650  typedef struct lwpsinfo32 {
 648  651          int     pr_flag;        /* lwp flags */
 649  652          id32_t  pr_lwpid;       /* lwp id */
 650  653          caddr32_t pr_addr;      /* internal address of lwp */
↓ open down ↓ 211 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX