Print this page
2916 DTrace in a zone should be able to access fds[]


 900 
 901 typedef struct dtrace_mstate {
 902         uintptr_t dtms_scratch_base;            /* base of scratch space */
 903         uintptr_t dtms_scratch_ptr;             /* current scratch pointer */
 904         size_t dtms_scratch_size;               /* scratch size */
 905         uint32_t dtms_present;                  /* variables that are present */
 906         uint64_t dtms_arg[5];                   /* cached arguments */
 907         dtrace_epid_t dtms_epid;                /* current EPID */
 908         uint64_t dtms_timestamp;                /* cached timestamp */
 909         hrtime_t dtms_walltimestamp;            /* cached wall timestamp */
 910         int dtms_stackdepth;                    /* cached stackdepth */
 911         int dtms_ustackdepth;                   /* cached ustackdepth */
 912         struct dtrace_probe *dtms_probe;        /* current probe */
 913         uintptr_t dtms_caller;                  /* cached caller */
 914         uint64_t dtms_ucaller;                  /* cached user-level caller */
 915         int dtms_ipl;                           /* cached interrupt pri lev */
 916         int dtms_fltoffs;                       /* faulting DIFO offset */
 917         uintptr_t dtms_strtok;                  /* saved strtok() pointer */
 918         uint32_t dtms_access;                   /* memory access rights */
 919         dtrace_difo_t *dtms_difo;               /* current dif object */

 920 } dtrace_mstate_t;
 921 
 922 #define DTRACE_COND_OWNER       0x1
 923 #define DTRACE_COND_USERMODE    0x2
 924 #define DTRACE_COND_ZONEOWNER   0x4
 925 
 926 #define DTRACE_PROBEKEY_MAXDEPTH        8       /* max glob recursion depth */
 927 
 928 /*
 929  * Access flag used by dtrace_mstate.dtms_access.
 930  */
 931 #define DTRACE_ACCESS_KERNEL    0x1             /* the priv to read kmem */
 932 #define DTRACE_ACCESS_PROC      0x2             /* the priv for proc state */
 933 #define DTRACE_ACCESS_ARGS      0x4             /* the priv to examine args */
 934 
 935 /*
 936  * DTrace Activity
 937  *
 938  * Each DTrace consumer is in one of several states, which (for purposes of
 939  * avoiding yet-another overloading of the noun "state") we call the current


1120         int dts_naggregations;                  /* number of aggregations */
1121         dtrace_aggregation_t **dts_aggregations; /* aggregation array */
1122         vmem_t *dts_aggid_arena;                /* arena for aggregation IDs */
1123         uint64_t dts_errors;                    /* total number of errors */
1124         uint32_t dts_speculations_busy;         /* number of spec. busy */
1125         uint32_t dts_speculations_unavail;      /* number of spec unavail */
1126         uint32_t dts_stkstroverflows;           /* stack string tab overflows */
1127         uint32_t dts_dblerrors;                 /* errors in ERROR probes */
1128         uint32_t dts_reserve;                   /* space reserved for END */
1129         hrtime_t dts_laststatus;                /* time of last status */
1130         cyclic_id_t dts_cleaner;                /* cleaning cyclic */
1131         cyclic_id_t dts_deadman;                /* deadman cyclic */
1132         hrtime_t dts_alive;                     /* time last alive */
1133         char dts_speculates;                    /* boolean: has speculations */
1134         char dts_destructive;                   /* boolean: has dest. actions */
1135         int dts_nformats;                       /* number of formats */
1136         char **dts_formats;                     /* format string array */
1137         dtrace_optval_t dts_options[DTRACEOPT_MAX]; /* options */
1138         dtrace_cred_t dts_cred;                 /* credentials */
1139         size_t dts_nretained;                   /* number of retained enabs */

1140 };
1141 
1142 struct dtrace_provider {
1143         dtrace_pattr_t dtpv_attr;               /* provider attributes */
1144         dtrace_ppriv_t dtpv_priv;               /* provider privileges */
1145         dtrace_pops_t dtpv_pops;                /* provider operations */
1146         char *dtpv_name;                        /* provider name */
1147         void *dtpv_arg;                         /* provider argument */
1148         hrtime_t dtpv_defunct;                  /* when made defunct */
1149         struct dtrace_provider *dtpv_next;      /* next provider */
1150 };
1151 
1152 struct dtrace_meta {
1153         dtrace_mops_t dtm_mops;                 /* meta provider operations */
1154         char *dtm_name;                         /* meta provider name */
1155         void *dtm_arg;                          /* meta provider user arg */
1156         uint64_t dtm_count;                     /* no. of associated provs. */
1157 };
1158 
1159 /*




 900 
 901 typedef struct dtrace_mstate {
 902         uintptr_t dtms_scratch_base;            /* base of scratch space */
 903         uintptr_t dtms_scratch_ptr;             /* current scratch pointer */
 904         size_t dtms_scratch_size;               /* scratch size */
 905         uint32_t dtms_present;                  /* variables that are present */
 906         uint64_t dtms_arg[5];                   /* cached arguments */
 907         dtrace_epid_t dtms_epid;                /* current EPID */
 908         uint64_t dtms_timestamp;                /* cached timestamp */
 909         hrtime_t dtms_walltimestamp;            /* cached wall timestamp */
 910         int dtms_stackdepth;                    /* cached stackdepth */
 911         int dtms_ustackdepth;                   /* cached ustackdepth */
 912         struct dtrace_probe *dtms_probe;        /* current probe */
 913         uintptr_t dtms_caller;                  /* cached caller */
 914         uint64_t dtms_ucaller;                  /* cached user-level caller */
 915         int dtms_ipl;                           /* cached interrupt pri lev */
 916         int dtms_fltoffs;                       /* faulting DIFO offset */
 917         uintptr_t dtms_strtok;                  /* saved strtok() pointer */
 918         uint32_t dtms_access;                   /* memory access rights */
 919         dtrace_difo_t *dtms_difo;               /* current dif object */
 920         file_t *dtms_getf;                      /* cached rval of getf() */
 921 } dtrace_mstate_t;
 922 
 923 #define DTRACE_COND_OWNER       0x1
 924 #define DTRACE_COND_USERMODE    0x2
 925 #define DTRACE_COND_ZONEOWNER   0x4
 926 
 927 #define DTRACE_PROBEKEY_MAXDEPTH        8       /* max glob recursion depth */
 928 
 929 /*
 930  * Access flag used by dtrace_mstate.dtms_access.
 931  */
 932 #define DTRACE_ACCESS_KERNEL    0x1             /* the priv to read kmem */
 933 #define DTRACE_ACCESS_PROC      0x2             /* the priv for proc state */
 934 #define DTRACE_ACCESS_ARGS      0x4             /* the priv to examine args */
 935 
 936 /*
 937  * DTrace Activity
 938  *
 939  * Each DTrace consumer is in one of several states, which (for purposes of
 940  * avoiding yet-another overloading of the noun "state") we call the current


1121         int dts_naggregations;                  /* number of aggregations */
1122         dtrace_aggregation_t **dts_aggregations; /* aggregation array */
1123         vmem_t *dts_aggid_arena;                /* arena for aggregation IDs */
1124         uint64_t dts_errors;                    /* total number of errors */
1125         uint32_t dts_speculations_busy;         /* number of spec. busy */
1126         uint32_t dts_speculations_unavail;      /* number of spec unavail */
1127         uint32_t dts_stkstroverflows;           /* stack string tab overflows */
1128         uint32_t dts_dblerrors;                 /* errors in ERROR probes */
1129         uint32_t dts_reserve;                   /* space reserved for END */
1130         hrtime_t dts_laststatus;                /* time of last status */
1131         cyclic_id_t dts_cleaner;                /* cleaning cyclic */
1132         cyclic_id_t dts_deadman;                /* deadman cyclic */
1133         hrtime_t dts_alive;                     /* time last alive */
1134         char dts_speculates;                    /* boolean: has speculations */
1135         char dts_destructive;                   /* boolean: has dest. actions */
1136         int dts_nformats;                       /* number of formats */
1137         char **dts_formats;                     /* format string array */
1138         dtrace_optval_t dts_options[DTRACEOPT_MAX]; /* options */
1139         dtrace_cred_t dts_cred;                 /* credentials */
1140         size_t dts_nretained;                   /* number of retained enabs */
1141         int dts_getf;                           /* number of getf() calls */
1142 };
1143 
1144 struct dtrace_provider {
1145         dtrace_pattr_t dtpv_attr;               /* provider attributes */
1146         dtrace_ppriv_t dtpv_priv;               /* provider privileges */
1147         dtrace_pops_t dtpv_pops;                /* provider operations */
1148         char *dtpv_name;                        /* provider name */
1149         void *dtpv_arg;                         /* provider argument */
1150         hrtime_t dtpv_defunct;                  /* when made defunct */
1151         struct dtrace_provider *dtpv_next;      /* next provider */
1152 };
1153 
1154 struct dtrace_meta {
1155         dtrace_mops_t dtm_mops;                 /* meta provider operations */
1156         char *dtm_name;                         /* meta provider name */
1157         void *dtm_arg;                          /* meta provider user arg */
1158         uint64_t dtm_count;                     /* no. of associated provs. */
1159 };
1160 
1161 /*