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.


  95 /* Default operations for the idl ops vector. */
  96 static void *
  97 Pidle_voidp()
  98 {
  99         errno = ENODATA;
 100         return (NULL);
 101 }
 102 
 103 static int
 104 Pidle_int()
 105 {
 106         errno = ENODATA;
 107         return (-1);
 108 }
 109 
 110 static const ps_ops_t P_idle_ops = {
 111         .pop_pread      = Pread_idle,
 112         .pop_pwrite     = Pwrite_idle,
 113         .pop_cred       = (pop_cred_t)Pidle_int,
 114         .pop_priv       = Ppriv_idle,

 115         .pop_psinfo     = (pop_psinfo_t)Pidle_voidp,
 116         .pop_platform   = (pop_platform_t)Pidle_voidp,
 117         .pop_uname      = (pop_uname_t)Pidle_int,
 118         .pop_zonename   = (pop_zonename_t)Pidle_voidp,
 119 #if defined(__i386) || defined(__amd64)
 120         .pop_ldt        = (pop_ldt_t)Pidle_int
 121 #endif
 122 };
 123 
 124 static int
 125 idle_add_mapping(struct ps_prochandle *P, GElf_Phdr *php, file_info_t *fp)
 126 {
 127         prmap_t pmap;
 128 
 129         dprintf("mapping base %llx filesz %llu memsz %llu offset %llu\n",
 130             (u_longlong_t)php->p_vaddr, (u_longlong_t)php->p_filesz,
 131             (u_longlong_t)php->p_memsz, (u_longlong_t)php->p_offset);
 132 
 133         pmap.pr_vaddr = (uintptr_t)php->p_vaddr;
 134         pmap.pr_size = php->p_filesz;




  95 /* Default operations for the idl ops vector. */
  96 static void *
  97 Pidle_voidp()
  98 {
  99         errno = ENODATA;
 100         return (NULL);
 101 }
 102 
 103 static int
 104 Pidle_int()
 105 {
 106         errno = ENODATA;
 107         return (-1);
 108 }
 109 
 110 static const ps_ops_t P_idle_ops = {
 111         .pop_pread      = Pread_idle,
 112         .pop_pwrite     = Pwrite_idle,
 113         .pop_cred       = (pop_cred_t)Pidle_int,
 114         .pop_priv       = Ppriv_idle,
 115         .pop_secflags   = (pop_secflags_t)Pidle_int,
 116         .pop_psinfo     = (pop_psinfo_t)Pidle_voidp,
 117         .pop_platform   = (pop_platform_t)Pidle_voidp,
 118         .pop_uname      = (pop_uname_t)Pidle_int,
 119         .pop_zonename   = (pop_zonename_t)Pidle_voidp,
 120 #if defined(__i386) || defined(__amd64)
 121         .pop_ldt        = (pop_ldt_t)Pidle_int
 122 #endif
 123 };
 124 
 125 static int
 126 idle_add_mapping(struct ps_prochandle *P, GElf_Phdr *php, file_info_t *fp)
 127 {
 128         prmap_t pmap;
 129 
 130         dprintf("mapping base %llx filesz %llu memsz %llu offset %llu\n",
 131             (u_longlong_t)php->p_vaddr, (u_longlong_t)php->p_filesz,
 132             (u_longlong_t)php->p_memsz, (u_longlong_t)php->p_offset);
 133 
 134         pmap.pr_vaddr = (uintptr_t)php->p_vaddr;
 135         pmap.pr_size = php->p_filesz;