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


 308 #define CONV_CNOTE_PR_FLAGS_BUFSIZE     254
 309 typedef union {
 310         Conv_inv_buf_t                  inv_buf;
 311         char                            buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
 312 } Conv_cnote_pr_flags_buf_t;
 313 
 314 /* conv_cnote_old_pr_flags() */
 315 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
 316 typedef union {
 317         Conv_inv_buf_t                  inv_buf;
 318         char                            buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
 319 } Conv_cnote_old_pr_flags_buf_t;
 320 
 321 /* conv_cnote_proc_flag() */
 322 #define CONV_CNOTE_PROC_FLAG_BUFSIZE    39
 323 typedef union {
 324         Conv_inv_buf_t                  inv_buf;
 325         char                            buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
 326 } Conv_cnote_proc_flag_buf_t;
 327 






 328 
 329 /* conv_cnote_sigset() */
 330 #define CONV_CNOTE_SIGSET_BUFSIZE       639
 331 typedef union {
 332         Conv_inv_buf_t                  inv_buf;
 333         char                            buf[CONV_CNOTE_SIGSET_BUFSIZE];
 334 } Conv_cnote_sigset_buf_t;
 335 
 336 /* conv_cnote_fltset() */
 337 #define CONV_CNOTE_FLTSET_BUFSIZE       511
 338 typedef union {
 339         Conv_inv_buf_t                  inv_buf;
 340         char                            buf[CONV_CNOTE_FLTSET_BUFSIZE];
 341 } Conv_cnote_fltset_buf_t;
 342 
 343 /* conv_cnote_sysset() */
 344 #define CONV_CNOTE_SYSSET_BUFSIZE       3195
 345 typedef union {
 346         Conv_inv_buf_t                  inv_buf;
 347         char                            buf[CONV_CNOTE_SYSSET_BUFSIZE];


 805 extern  const char      *conv_cnote_fltset(uint32_t *, int,
 806                             Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
 807 extern  const char      *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
 808                             Conv_cnote_old_pr_flags_buf_t *);
 809 extern  const char      *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
 810                             Conv_inv_buf_t *);
 811 extern  const char      *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
 812                             Conv_cnote_pr_flags_buf_t *);
 813 extern  const char      *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
 814                             Conv_cnote_proc_flag_buf_t *);
 815 extern  const char      *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
 816                             Conv_inv_buf_t *inv_buf);
 817 extern  const char      *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
 818                             Conv_inv_buf_t *);
 819 extern  const char      *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
 820                             Conv_inv_buf_t *);
 821 extern  const char      *conv_cnote_pr_why(short, Conv_fmt_flags_t,
 822                             Conv_inv_buf_t *);
 823 extern  const char      *conv_cnote_priv(int, Conv_fmt_flags_t,
 824                             Conv_inv_buf_t *);


 825 extern  const char      *conv_cnote_psetid(int, Conv_fmt_flags_t,
 826                             Conv_inv_buf_t *);
 827 extern  const char      *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
 828                             Conv_cnote_sa_flags_buf_t *);
 829 extern  const char      *conv_cnote_signal(Word, Conv_fmt_flags_t,
 830                             Conv_inv_buf_t *);
 831 extern  const char      *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
 832                             Conv_inv_buf_t *);
 833 extern  const char      *conv_cnote_sigset(uint32_t *, int,
 834                             Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
 835 extern  const char      *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
 836                             Conv_cnote_ss_flags_buf_t *);
 837 extern  const char      *conv_cnote_syscall(Word, Conv_fmt_flags_t,
 838                             Conv_inv_buf_t *);
 839 extern  const char      *conv_cnote_sysset(uint32_t *, int,
 840                             Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
 841 extern  const char      *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
 842                             char *, size_t);
 843 extern  const char      *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
 844                             char *, size_t);




 308 #define CONV_CNOTE_PR_FLAGS_BUFSIZE     254
 309 typedef union {
 310         Conv_inv_buf_t                  inv_buf;
 311         char                            buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
 312 } Conv_cnote_pr_flags_buf_t;
 313 
 314 /* conv_cnote_old_pr_flags() */
 315 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
 316 typedef union {
 317         Conv_inv_buf_t                  inv_buf;
 318         char                            buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
 319 } Conv_cnote_old_pr_flags_buf_t;
 320 
 321 /* conv_cnote_proc_flag() */
 322 #define CONV_CNOTE_PROC_FLAG_BUFSIZE    39
 323 typedef union {
 324         Conv_inv_buf_t                  inv_buf;
 325         char                            buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
 326 } Conv_cnote_proc_flag_buf_t;
 327 
 328 /* conv_psecflags() */
 329 #define CONV_PSECFLAGS_BUFSIZE          31
 330 typedef union {
 331         Conv_inv_buf_t                  inv_buf;
 332         char                            buf[CONV_PSECFLAGS_BUFSIZE];
 333 } Conv_secflags_buf_t;
 334 
 335 /* conv_cnote_sigset() */
 336 #define CONV_CNOTE_SIGSET_BUFSIZE       639
 337 typedef union {
 338         Conv_inv_buf_t                  inv_buf;
 339         char                            buf[CONV_CNOTE_SIGSET_BUFSIZE];
 340 } Conv_cnote_sigset_buf_t;
 341 
 342 /* conv_cnote_fltset() */
 343 #define CONV_CNOTE_FLTSET_BUFSIZE       511
 344 typedef union {
 345         Conv_inv_buf_t                  inv_buf;
 346         char                            buf[CONV_CNOTE_FLTSET_BUFSIZE];
 347 } Conv_cnote_fltset_buf_t;
 348 
 349 /* conv_cnote_sysset() */
 350 #define CONV_CNOTE_SYSSET_BUFSIZE       3195
 351 typedef union {
 352         Conv_inv_buf_t                  inv_buf;
 353         char                            buf[CONV_CNOTE_SYSSET_BUFSIZE];


 811 extern  const char      *conv_cnote_fltset(uint32_t *, int,
 812                             Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
 813 extern  const char      *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
 814                             Conv_cnote_old_pr_flags_buf_t *);
 815 extern  const char      *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
 816                             Conv_inv_buf_t *);
 817 extern  const char      *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
 818                             Conv_cnote_pr_flags_buf_t *);
 819 extern  const char      *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
 820                             Conv_cnote_proc_flag_buf_t *);
 821 extern  const char      *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
 822                             Conv_inv_buf_t *inv_buf);
 823 extern  const char      *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
 824                             Conv_inv_buf_t *);
 825 extern  const char      *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
 826                             Conv_inv_buf_t *);
 827 extern  const char      *conv_cnote_pr_why(short, Conv_fmt_flags_t,
 828                             Conv_inv_buf_t *);
 829 extern  const char      *conv_cnote_priv(int, Conv_fmt_flags_t,
 830                             Conv_inv_buf_t *);
 831 extern  const char      *conv_psecflags(int, Conv_fmt_flags_t,
 832                             Conv_secflags_buf_t *);
 833 extern  const char      *conv_cnote_psetid(int, Conv_fmt_flags_t,
 834                             Conv_inv_buf_t *);
 835 extern  const char      *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
 836                             Conv_cnote_sa_flags_buf_t *);
 837 extern  const char      *conv_cnote_signal(Word, Conv_fmt_flags_t,
 838                             Conv_inv_buf_t *);
 839 extern  const char      *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
 840                             Conv_inv_buf_t *);
 841 extern  const char      *conv_cnote_sigset(uint32_t *, int,
 842                             Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
 843 extern  const char      *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
 844                             Conv_cnote_ss_flags_buf_t *);
 845 extern  const char      *conv_cnote_syscall(Word, Conv_fmt_flags_t,
 846                             Conv_inv_buf_t *);
 847 extern  const char      *conv_cnote_sysset(uint32_t *, int,
 848                             Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
 849 extern  const char      *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
 850                             char *, size_t);
 851 extern  const char      *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
 852                             char *, size_t);