Print this page
2915 DTrace in a zone should see "cpu", "curpsinfo", et al
2916 DTrace in a zone should be able to access fds[]
2917 DTrace in a zone should have limited provider access
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Adam Leventhal <ahl@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/sdt_impl.h
          +++ new/usr/src/uts/common/sys/sdt_impl.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
       27 +/*
       28 + * Copyright (c) 2012, Joyent, Inc. All rights reserved.
       29 + */
       30 +
  27   31  #ifndef _SYS_SDT_IMPL_H
  28   32  #define _SYS_SDT_IMPL_H
  29   33  
  30      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  31      -
  32   34  #ifdef  __cplusplus
  33   35  extern "C" {
  34   36  #endif
  35   37  
  36   38  #include <sys/dtrace.h>
  37   39  
  38   40  #if defined(__i386) || defined(__amd64)
  39   41  typedef uint8_t sdt_instr_t;
  40   42  #else
  41   43  typedef uint32_t sdt_instr_t;
  42   44  #endif
  43   45  
  44   46  typedef struct sdt_provider {
  45   47          char                    *sdtp_name;     /* name of provider */
  46   48          char                    *sdtp_prefix;   /* prefix for probe names */
  47   49          dtrace_pattr_t          *sdtp_attr;     /* stability attributes */
       50 +        uint32_t                sdtp_priv;      /* privilege, if any */
  48   51          dtrace_provider_id_t    sdtp_id;        /* provider ID */
  49   52  } sdt_provider_t;
  50   53  
  51   54  extern sdt_provider_t sdt_providers[];          /* array of providers */
  52   55  
  53   56  typedef struct sdt_probe {
  54   57          sdt_provider_t  *sdp_provider;          /* provider */
  55   58          char            *sdp_name;              /* name of probe */
  56   59          int             sdp_namelen;            /* length of allocated name */
  57   60          dtrace_id_t     sdp_id;                 /* probe ID */
↓ open down ↓ 10 lines elided ↑ open up ↑
  68   71  typedef struct sdt_argdesc {
  69   72          const char *sda_provider;               /* provider for arg */
  70   73          const char *sda_name;                   /* name of probe */
  71   74          const int sda_ndx;                      /* argument index */
  72   75          const int sda_mapping;                  /* mapping of argument */
  73   76          const char *sda_native;                 /* native type of argument */
  74   77          const char *sda_xlate;                  /* translated type of arg */
  75   78  } sdt_argdesc_t;
  76   79  
  77   80  extern void sdt_getargdesc(void *, dtrace_id_t, void *, dtrace_argdesc_t *);
       81 +extern int sdt_mode(void *, dtrace_id_t, void *);
  78   82  
  79   83  #ifdef  __cplusplus
  80   84  }
  81   85  #endif
  82   86  
  83   87  #endif  /* _SYS_SDT_IMPL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX