#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_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
#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
{ "sysv", CTLTYPE_NODE }, \
{ "dummy", CTLTYPE_INT }, \
{ "dummy", CTLTYPE_INT }, \
- { "dummy", CTLTYPE_INT }, \
+ { "exec", CTLTYPE_NODE }, \
{ "aiomax", CTLTYPE_INT }, \
{ "aioprocmax", CTLTYPE_INT }, \
{ "aiothreads", 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 } \
}
/*
* 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. */
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
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 */
} kp_eproc;
};
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=reset
-#endif
-
#endif /* BSD_KERNEL_PRIVATE */
#endif /* __APPLE_API_UNSTABLE */
// LP64todo - should this move?
#ifdef BSD_KERNEL_PRIVATE
-#if __DARWIN_ALIGN_NATURAL
-#pragma options align=natural
-#endif
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 */
* 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.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
*/