]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/bsd_init.c
xnu-4570.61.1.tar.gz
[apple/xnu.git] / bsd / kern / bsd_init.c
index 25395d3521da0ba40d17502f814a512be3433e4e..36b5db056159d5c07df36052c0c277b08d4e98be 100644 (file)
@@ -94,6 +94,7 @@
 #include <sys/time.h>
 #include <sys/systm.h>
 #include <sys/mman.h>
+#include <sys/kasl.h>
 
 #include <security/audit/audit.h>
 
@@ -292,6 +293,9 @@ void bsd_exec_setup(int);
 #if __arm64__
 __private_extern__ int bootarg_no64exec = 0;
 #endif
+#if __x86_64__
+__private_extern__ int bootarg_no32exec = 0;
+#endif
 __private_extern__ int bootarg_vnode_cache_defeat = 0;
 
 #if CONFIG_JETSAM && (DEVELOPMENT || DEBUG)
@@ -711,6 +715,9 @@ bsd_init(void)
                        panic("bsd_init: Failed to allocate bsd pageable map");
        }
 
+       bsd_init_kprintf("calling fpxlog_init\n");
+       fpxlog_init();
+
        /*
         * Initialize buffers and hash links for buffers
         *
@@ -1191,6 +1198,11 @@ parse_bsd_args(void)
        if (PE_parse_boot_argn("-no64exec", namep, sizeof (namep)))
                bootarg_no64exec = 1;
 #endif
+#if __x86_64__
+       /* disable 32 bit grading */
+       if (PE_parse_boot_argn("-no32exec", namep, sizeof (namep)))
+               bootarg_no32exec = 1;
+#endif
 
        /* disable vnode_cache_is_authorized() by setting vnode_cache_defeat */
        if (PE_parse_boot_argn("-vnode_cache_defeat", namep, sizeof (namep)))