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/cmd/sgs/elfdump/common/struct_layout.h
          +++ new/usr/src/cmd/sgs/elfdump/common/struct_layout.h
↓ open down ↓ 200 lines elided ↑ open up ↑
 201  201          sl_field_t              pr_cstime;
 202  202          sl_field_t              pr_sigtrace;
 203  203          sl_field_t              pr_flttrace;
 204  204          sl_field_t              pr_sysentry;
 205  205          sl_field_t              pr_sysexit;
 206  206          sl_field_t              pr_dmodel;
 207  207          sl_field_t              pr_taskid;
 208  208          sl_field_t              pr_projid;
 209  209          sl_field_t              pr_nzomb;
 210  210          sl_field_t              pr_zoneid;
      211 +        sl_field_t              pr_secflags;
 211  212          sl_field_t              pr_lwp;
 212  213  } sl_pstatus_layout_t;
 213  214  
 214  215  /*
 215  216   * Layout description of prstatus_t, from <sys/old_procfs.h>.
 216  217   */
 217  218  typedef struct {
 218  219          sl_field_t              sizeof_struct;
 219  220          sl_field_t              pr_flags;
 220  221          sl_field_t              pr_why;
↓ open down ↓ 298 lines elided ↑ open up ↑
 519  520          sl_field_t              pr_rmajor;
 520  521          sl_field_t              pr_rminor;
 521  522          sl_field_t              pr_ino;
 522  523          sl_field_t              pr_offset;
 523  524          sl_field_t              pr_size;
 524  525          sl_field_t              pr_fileflags;
 525  526          sl_field_t              pr_fdflags;
 526  527          sl_field_t              pr_path;
 527  528  } sl_prfdinfo_layout_t;
 528  529  
      530 +typedef struct {
      531 +        sl_field_t              sizeof_struct;
      532 +        sl_field_t              psf_effective;
      533 +        sl_field_t              psf_inherit;
      534 +} sl_psecflags_layout_t;
      535 +
 529  536  /*
 530  537   * This type collects all of the layout definitions for
 531  538   * a given architecture.
 532  539   */
 533  540  typedef struct {
 534  541          const sl_auxv_layout_t          *auxv;          /* auxv_t */
 535  542          const sl_fltset_layout_t        *fltset;        /* fltset_t */
 536  543          const sl_lwpsinfo_layout_t      *lwpsinfo;      /* lwpsinfo_t */
 537  544          const sl_lwpstatus_layout_t     *lwpstatus;     /* lwpstatus_t */
 538  545          const sl_prcred_layout_t        *prcred;        /* prcred_t */
↓ open down ↓ 5 lines elided ↑ open up ↑
 544  551          const sl_prpsinfo_layout_t      *prpsinfo;      /* prpsinfo_t */
 545  552          const sl_prstatus_layout_t      *prstatus;      /* prstatus_t */
 546  553          const sl_sigaction_layout_t     *sigaction;     /* struct sigaction */
 547  554          const sl_siginfo_layout_t       *siginfo;       /* siginfo_t */
 548  555          const sl_sigset_layout_t        *sigset;        /* sigset_t */
 549  556          const sl_stack_layout_t         *stack;         /* stack_t */
 550  557          const sl_sysset_layout_t        *sysset;        /* sysset_t */
 551  558          const sl_timestruc_layout_t     *timestruc;     /* timestruc_t */
 552  559          const sl_utsname_layout_t       *utsname;       /* struct utsname */
 553  560          const sl_prfdinfo_layout_t      *prfdinfo;      /* prdinfo_t */
      561 +        const sl_psecflags_layout_t     *psecflags;     /* psecflags_t */
 554  562  } sl_arch_layout_t;
 555  563  
 556  564  
 557  565  
 558  566  extern  void            sl_extract_num_field(const char *data, int do_swap,
 559  567                              const sl_field_t *fdesc, sl_data_t *field_data);
 560  568  extern  Word            sl_extract_as_word(const char *data, int do_swap,
 561  569                              const sl_field_t *fdesc);
 562  570  extern  Lword           sl_extract_as_lword(const char *data, int do_swap,
 563  571                              const sl_field_t *fdesc);
↓ open down ↓ 20 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX