]> 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 22a932314ab27056b4c6bc2a857f45314f16c93c..36b5db056159d5c07df36052c0c277b08d4e98be 100644 (file)
@@ -293,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)
@@ -1195,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)))