]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/sysctl.h
xnu-792.22.5.tar.gz
[apple/xnu.git] / bsd / sys / sysctl.h
index e7e11acccdeff53d6610bc9aea72362fe48782e5..32d9a4fe8334b2aa5d880bdfb3c9600857ae865c 100644 (file)
@@ -356,8 +356,10 @@ SYSCTL_DECL(_user);
 #define        KERN_PANICINFO          41      /* node: panic UI information */
 #define        KERN_SYSV               42      /* node: System V IPC information */
 #define KERN_AFFINITY          43      /* xxx */
 #define        KERN_PANICINFO          41      /* node: panic UI information */
 #define        KERN_SYSV               42      /* node: System V IPC information */
 #define KERN_AFFINITY          43      /* xxx */
-#define KERN_CLASSIC           44      /* xxx */
-#define KERN_CLASSICHANDLER    45      /* xxx */
+#define KERN_TRANSLATE         44      /* xxx */
+#define KERN_CLASSIC           KERN_TRANSLATE  /* XXX backwards compat */
+#define KERN_EXEC              45      /* xxx */
+#define KERN_CLASSICHANDLER    KERN_EXEC /* XXX backwards compatibility */
 #define        KERN_AIOMAX             46      /* int: max aio requests */
 #define        KERN_AIOPROCMAX         47      /* int: max aio requests per process */
 #define        KERN_AIOTHREADS         48      /* int: max aio worker threads */
 #define        KERN_AIOMAX             46      /* int: max aio requests */
 #define        KERN_AIOPROCMAX         47      /* int: max aio requests per process */
 #define        KERN_AIOTHREADS         48      /* int: max aio worker threads */
@@ -373,8 +375,12 @@ SYSCTL_DECL(_user);
 #define        KERN_LOW_PRI_WINDOW     56      /* int: set/reset throttle window - milliseconds */
 #define        KERN_LOW_PRI_DELAY      57      /* int: set/reset throttle delay - milliseconds */
 #define        KERN_POSIX              58      /* node: posix tunables */
 #define        KERN_LOW_PRI_WINDOW     56      /* int: set/reset throttle window - milliseconds */
 #define        KERN_LOW_PRI_DELAY      57      /* int: set/reset throttle delay - milliseconds */
 #define        KERN_POSIX              58      /* node: posix tunables */
-#define        KERN_USRSTACK64 59      /* LP64 user stack query */
-#define        KERN_MAXID              60      /* number of valid kern ids */
+#define        KERN_USRSTACK64         59      /* LP64 user stack query */
+#define KERN_NX_PROTECTION     60      /* int: whether no-execute protection is enabled */
+#define        KERN_TFP                61      /* Task for pid settings */
+#define        KERN_PROCNAME           62      /* setup process program  name(2*MAXCOMLEN) */
+#define        KERN_THALTSTACK         63      /* setup process to have per thread sigaltstack */
+#define        KERN_MAXID              64      /* number of valid kern ids */
 
 #if defined(__LP64__)
 #define        KERN_USRSTACK KERN_USRSTACK64
 
 #if defined(__LP64__)
 #define        KERN_USRSTACK KERN_USRSTACK64
@@ -382,6 +388,16 @@ SYSCTL_DECL(_user);
 #define        KERN_USRSTACK KERN_USRSTACK32
 #endif
 
 #define        KERN_USRSTACK KERN_USRSTACK32
 #endif
 
+/* KERN_TFP types */
+#define KERN_TFP_POLICY                1
+#define KERN_TFP_READ_GROUP    2
+#define KERN_TFP_RW_GROUP              3
+
+/* KERN_TFP_POLICY values . All policies allow task port for self */
+#define KERN_TFP_POLICY_DENY           0       /* Deny Mode: None allowed except privileged */
+#define KERN_TFP_POLICY_PERMISSIVE     1       /* Permissive Mode: related ones allowed or privileged */
+#define KERN_TFP_POLICY_RESTRICTED     2       /* Restricted Mode: privileged or setgid and realted */
+
 /* KERN_KDEBUG types */
 #define KERN_KDEFLAGS          1
 #define KERN_KDDFLAGS          2
 /* KERN_KDEBUG types */
 #define KERN_KDEFLAGS          1
 #define KERN_KDDFLAGS          2
@@ -475,7 +491,7 @@ SYSCTL_DECL(_user);
        { "sysv", CTLTYPE_NODE }, \
        { "dummy", CTLTYPE_INT }, \
        { "dummy", CTLTYPE_INT }, \
        { "sysv", CTLTYPE_NODE }, \
        { "dummy", CTLTYPE_INT }, \
        { "dummy", CTLTYPE_INT }, \
-       { "dummy", CTLTYPE_INT }, \
+       { "exec", CTLTYPE_NODE }, \
        { "aiomax", CTLTYPE_INT }, \
        { "aioprocmax", CTLTYPE_INT }, \
        { "aiothreads", CTLTYPE_INT }, \
        { "aiomax", CTLTYPE_INT }, \
        { "aioprocmax", CTLTYPE_INT }, \
        { "aiothreads", CTLTYPE_INT }, \
@@ -488,7 +504,12 @@ SYSCTL_DECL(_user);
        { "proc_low_pri_io", CTLTYPE_INT }, \
        { "low_pri_window", CTLTYPE_INT }, \
        { "low_pri_delay", CTLTYPE_INT }, \
        { "proc_low_pri_io", CTLTYPE_INT }, \
        { "low_pri_window", CTLTYPE_INT }, \
        { "low_pri_delay", CTLTYPE_INT }, \
-       { "posix", CTLTYPE_NODE } \
+       { "posix", CTLTYPE_NODE }, \
+       { "usrstack64", CTLTYPE_QUAD }, \
+       { "nx", CTLTYPE_INT }, \
+       { "tfp", CTLTYPE_NODE }, \
+       { "procname", CTLTYPE_STRING }, \
+       { "threadsigaltstack", CTLTYPE_INT } \
 }
 
 /*
 }
 
 /*
@@ -570,10 +591,6 @@ struct kinfo_proc {
  * WARNING - keep in sync with _pcred
  */
 
  * WARNING - keep in sync with _pcred
  */
 
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=natural
-#endif
-
 struct user_pcred {
        char    pc_lock[72];            /* opaque content */
        user_addr_t     pc_ucred;       /* Current credentials. */
 struct user_pcred {
        char    pc_lock[72];            /* opaque content */
        user_addr_t     pc_ucred;       /* Current credentials. */
@@ -581,7 +598,7 @@ struct user_pcred {
        uid_t   p_svuid;                /* Saved effective user id. */
        gid_t   p_rgid;                 /* Real group id. */
        gid_t   p_svgid;                /* Saved effective group id. */
        uid_t   p_svuid;                /* Saved effective user id. */
        gid_t   p_rgid;                 /* Real group id. */
        gid_t   p_svgid;                /* Saved effective group id. */
-       int     p_refcnt;               /* Number of references. */
+       int     p_refcnt __attribute((aligned(8)));             /* Number of references. */
 };
 
 /* LP64 version of kinfo_proc.  all pointers 
 };
 
 /* LP64 version of kinfo_proc.  all pointers 
@@ -601,7 +618,7 @@ struct user_kinfo_proc {
                short   e_jobc;                 /* job control counter */
                dev_t   e_tdev;                 /* controlling tty dev */
                pid_t   e_tpgid;                /* tty process group id */
                short   e_jobc;                 /* job control counter */
                dev_t   e_tdev;                 /* controlling tty dev */
                pid_t   e_tpgid;                /* tty process group id */
-               user_addr_t     e_tsess;        /* tty session pointer */
+               user_addr_t     e_tsess __attribute((aligned(8)));      /* tty session pointer */
                char    e_wmesg[WMESGLEN+1];    /* wchan message */
                segsz_t e_xsize;                /* text size */
                short   e_xrssize;              /* text rss */
                char    e_wmesg[WMESGLEN+1];    /* wchan message */
                segsz_t e_xsize;                /* text size */
                short   e_xrssize;              /* text rss */
@@ -613,10 +630,6 @@ struct user_kinfo_proc {
        } kp_eproc;
 };
 
        } kp_eproc;
 };
 
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=reset
-#endif
-
 #endif /* BSD_KERNEL_PRIVATE */
 
 #endif /* __APPLE_API_UNSTABLE */
 #endif /* BSD_KERNEL_PRIVATE */
 
 #endif /* __APPLE_API_UNSTABLE */
@@ -677,18 +690,11 @@ extern struct loadavg averunnable;
 // LP64todo - should this move?
 #ifdef BSD_KERNEL_PRIVATE
 
 // LP64todo - should this move?
 #ifdef BSD_KERNEL_PRIVATE
 
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=natural
-#endif
 struct user_loadavg {
        fixpt_t ldavg[3];
 struct user_loadavg {
        fixpt_t ldavg[3];
-       user_long_t     fscale;
+        user_long_t    fscale __attribute((aligned(8)));
 };
 
 };
 
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=reset
-#endif
-
 #endif /* BSD_KERNEL_PRIVATE */
 #endif /* __APPLE_API_PRIVATE */
 
 #endif /* BSD_KERNEL_PRIVATE */
 #endif /* __APPLE_API_PRIVATE */
 
@@ -805,9 +811,11 @@ struct user_loadavg {
  *   hw.l3cachesize            -
  *
  *
  *   hw.l3cachesize            -
  *
  *
- * These are the selectors for optional processor features.  Selectors that return errors are not support on the system.
- * Supported features will return 1 if they are recommended or 0 if they are supported but are not expected to help performance.
- * Future versions of these selectors may return larger values as necessary so it is best to test for non zero.
+ * These are the selectors for optional processor features for specific processors.  Selectors that return errors are not support 
+ * on the system.  Supported features will return 1 if they are recommended or 0 if they are supported but are not expected to help .
+ * performance.  Future versions of these selectors may return larger values as necessary so it is best to test for non zero.
+ *
+ * For PowerPC:
  *
  *   hw.optional.floatingpoint - Floating Point Instructions
  *   hw.optional.altivec       - AltiVec Instructions
  *
  *   hw.optional.floatingpoint - Floating Point Instructions
  *   hw.optional.altivec       - AltiVec Instructions
@@ -819,6 +827,14 @@ struct user_loadavg {
  *   hw.optional.datastreams   - Data Streams Instructions
  *   hw.optional.dcbtstreams   - Data Cache Block Touch Steams Instruction Form
  *
  *   hw.optional.datastreams   - Data Streams Instructions
  *   hw.optional.dcbtstreams   - Data Cache Block Touch Steams Instruction Form
  *
+ * For x86 Architecture:
+ * 
+ *   hw.optional.floatingpoint - Floating Point Instructions
+ *   hw.optional.mmx           - Original MMX vector instructions
+ *   hw.optional.sse           - Streaming SIMD Extensions
+ *   hw.optional.sse2          - Streaming SIMD Extensions 2
+ *   hw.optional.sse3          - Streaming SIMD Extensions 3
+ *   hw.optional.x86_64        - 64-bit support
  */
 
 
  */