Print this page
OS-208 DTrace needs to use zone_did to match zone-limited enablings
OS-192 zone_create() warning on headnode

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/zone.h
          +++ new/usr/src/uts/common/sys/zone.h
↓ open down ↓ 109 lines elided ↑ open up ↑
 110  110  #define ZONE_ATTR_BOOTARGS      10
 111  111  #define ZONE_ATTR_BRAND         11
 112  112  #define ZONE_ATTR_PHYS_MCAP     12
 113  113  #define ZONE_ATTR_SCHED_CLASS   13
 114  114  #define ZONE_ATTR_FLAGS         14
 115  115  #define ZONE_ATTR_HOSTID        15
 116  116  #define ZONE_ATTR_FS_ALLOWED    16
 117  117  #define ZONE_ATTR_NETWORK       17
 118  118  #define ZONE_ATTR_INITNORESTART 20
 119  119  #define ZONE_ATTR_SECFLAGS      21
      120 +#define ZONE_ATTR_DID           22
 120  121  
 121  122  /* Start of the brand-specific attribute namespace */
 122  123  #define ZONE_ATTR_BRAND_ATTRS   32768
 123  124  
 124  125  #define ZONE_FS_ALLOWED_MAX     1024
 125  126  
 126  127  #define ZONE_EVENT_CHANNEL      "com.sun:zones:status"
 127  128  #define ZONE_EVENT_STATUS_CLASS "status"
 128  129  #define ZONE_EVENT_STATUS_SUBCLASS      "change"
 129  130  
↓ open down ↓ 60 lines elided ↑ open up ↑
 190  191          size32_t zone_privssz;
 191  192          caddr32_t rctlbuf;
 192  193          size32_t rctlbufsz;
 193  194          caddr32_t extended_error;
 194  195          caddr32_t zfsbuf;
 195  196          size32_t  zfsbufsz;
 196  197          int match;                      /* match level */
 197  198          uint32_t doi;                   /* DOI for label */
 198  199          caddr32_t label;                /* label associated with zone */
 199  200          int flags;
      201 +        zoneid_t zone_did;              /* zone debug ID */
 200  202  } zone_def32;
 201  203  #endif
 202  204  typedef struct {
 203  205          const char *zone_name;
 204  206          const char *zone_root;
 205  207          const struct priv_set *zone_privs;
 206  208          size_t zone_privssz;
 207  209          const char *rctlbuf;
 208  210          size_t rctlbufsz;
 209  211          int *extended_error;
 210  212          const char *zfsbuf;
 211  213          size_t zfsbufsz;
 212  214          int match;                      /* match level */
 213  215          uint32_t doi;                   /* DOI for label */
 214  216          const bslabel_t *label;         /* label associated with zone */
 215  217          int flags;
      218 +        zoneid_t zone_did;              /* zone debug ID */
 216  219  } zone_def;
 217  220  
 218  221  /* extended error information */
 219  222  #define ZE_UNKNOWN      0       /* No extended error info */
 220  223  #define ZE_CHROOTED     1       /* tried to zone_create from chroot */
 221  224  #define ZE_AREMOUNTS    2       /* there are mounts within the zone */
 222  225  #define ZE_LABELINUSE   3       /* label is already in use by some other zone */
 223  226  
 224  227  /*
 225  228   * zone_status values
↓ open down ↓ 229 lines elided ↑ open up ↑
 455  458           *      zone_zsd
 456  459           *      zone_pfexecd
 457  460           */
 458  461          kmutex_t        zone_lock;
 459  462          /*
 460  463           * zone_linkage is the zone's linkage into the active or
 461  464           * death-row list.  The field is protected by zonehash_lock.
 462  465           */
 463  466          list_node_t     zone_linkage;
 464  467          zoneid_t        zone_id;        /* ID of zone */
      468 +        zoneid_t        zone_did;       /* persistent debug ID of zone */
 465  469          uint_t          zone_ref;       /* count of zone_hold()s on zone */
 466  470          uint_t          zone_cred_ref;  /* count of zone_hold_cred()s on zone */
 467  471          /*
 468  472           * Fixed-sized array of subsystem-specific reference counts
 469  473           * The sum of all of the counts must be less than or equal to zone_ref.
 470  474           * The array is indexed by the counts' subsystems' zone_ref_subsys_t
 471  475           * constants.
 472  476           */
 473  477          uint_t          zone_subsys_ref[ZONE_REF_NUM_SUBSYS];
 474  478          list_t          zone_ref_list;  /* list of zone_ref_t structs */
↓ open down ↓ 182 lines elided ↑ open up ↑
 657  661  extern void zone_cred_hold(zone_t *);
 658  662  extern void zone_cred_rele(zone_t *);
 659  663  extern void zone_task_hold(zone_t *);
 660  664  extern void zone_task_rele(zone_t *);
 661  665  extern zone_t *zone_find_by_id(zoneid_t);
 662  666  extern zone_t *zone_find_by_label(const ts_label_t *);
 663  667  extern zone_t *zone_find_by_name(char *);
 664  668  extern zone_t *zone_find_by_any_path(const char *, boolean_t);
 665  669  extern zone_t *zone_find_by_path(const char *);
 666  670  extern zoneid_t getzoneid(void);
      671 +extern zoneid_t getzonedid(void);
 667  672  extern zone_t *zone_find_by_id_nolock(zoneid_t);
 668  673  extern int zone_datalink_walk(zoneid_t, int (*)(datalink_id_t, void *), void *);
 669  674  extern int zone_check_datalink(zoneid_t *, datalink_id_t);
 670  675  extern void zone_loadavg_update();
 671  676  
 672  677  /*
 673  678   * Zone-specific data (ZSD) APIs
 674  679   */
 675  680  /*
 676  681   * The following is what code should be initializing its zone_key_t to if it
↓ open down ↓ 213 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX