]> git.cameronkatri.com Git - apple_cmds.git/commitdiff
bootstrap_cmds: Update to 121.100.1
authorCameron Katri <me@cameronkatri.com>
Thu, 20 May 2021 20:23:47 +0000 (16:23 -0400)
committerCameron Katri <me@cameronkatri.com>
Thu, 20 May 2021 20:23:47 +0000 (16:23 -0400)
bootstrap_cmds/.apple_version
bootstrap_cmds/migcom.tproj/server.c
bootstrap_cmds/migcom.tproj/user.c

index ca285c2197ca11c1afc006cb5d4050b2d7d78022..8e50c9181642a0061f38f5ef3d1185f1cdec322d 100644 (file)
@@ -1 +1 @@
-116.100.1
+121.100.1
index 7bbed5332d9eb767dba46a4195da07183f31b2bf..5b22b4646ba5ee685419a38533cb3a553024abf8 100644 (file)
@@ -921,6 +921,8 @@ static void
 WriteCheckMsgSize(FILE *file, argument_t *arg)
 {
   routine_t *rt = arg->argRoutine;
+  ipc_type_t *it = arg->argType;
+  ipc_type_t *btype = it->itElement;
 
   if (arg->argCount && !arg->argSameCount)
     WriteRequestNDRConvertIntRepOneArgUse(file, arg->argCount);
@@ -928,7 +930,8 @@ WriteCheckMsgSize(FILE *file, argument_t *arg)
     fprintf(file, "#if\t__MigTypeCheck\n");
 
     /* verify that the user-code-provided count does not exceed the maximum count allowed by the type. */
-    fprintf(file, "\t" "if ( In%dP->%s > %d )\n", arg->argCount->argRequestPos, arg->argCount->argMsgField, arg->argType->itNumber);
+    fprintf(file, "\t" "if ( In%dP->%s > %d )\n", arg->argCount->argRequestPos,
+           arg->argCount->argMsgField, it->itNumber/btype->itNumber);
     fputs("\t\t" "return MIG_BAD_ARGUMENTS;\n", file);
     /* ...end... */
 
@@ -955,7 +958,8 @@ WriteCheckMsgSize(FILE *file, argument_t *arg)
     fprintf(file, "#if\t__MigTypeCheck\n");
 
     /* verify that the user-code-provided count does not exceed the maximum count allowed by the type. */
-    fprintf(file, "\t" "if ( In%dP->%s > %d )\n", arg->argCount->argRequestPos, arg->argCount->argMsgField, arg->argType->itNumber);
+    fprintf(file, "\t" "if ( In%dP->%s > %d )\n", arg->argCount->argRequestPos,
+         arg->argCount->argMsgField, it->itNumber/btype->itNumber);
     fputs("\t\t" "return MIG_BAD_ARGUMENTS;\n", file);
     /* ...end... */
 
index 839732dce76822434b60e33c7f7b3ea6c09fd131..6e9d27c7dd7efe867e54626d1f799447397e7a9d 100644 (file)
 #include "utils.h"
 #include "global.h"
 
-#ifndef DISABLE_SPECIAL_REPLY_PORT_IN_CHROOT
-#define DISABLE_SPECIAL_REPLY_PORT_IN_CHROOT 1
-#endif
-
-#ifndef DISABLE_SPECIAL_REPLY_PORT_IN_SIMULATOR
-#define DISABLE_SPECIAL_REPLY_PORT_IN_SIMULATOR 1
-#endif
-
 #ifndef USE_IMMEDIATE_SEND_TIMEOUT
 #define USE_IMMEDIATE_SEND_TIMEOUT 0
 #endif
@@ -196,29 +188,9 @@ WriteMyIncludes(FILE *file, statement_t *stats)
     fprintf(file, "\n");
     fprintf(file, "#include <TargetConditionals.h>\n");
     fprintf(file, "#include <mach/mach_sync_ipc.h>\n");
-#if DISABLE_SPECIAL_REPLY_PORT_IN_SIMULATOR
-    fprintf(file, "#ifndef __MigCanUseSpecialReplyPort\n");
-    fprintf(file, "#if TARGET_OS_SIMULATOR\n");
-    fprintf(file, "#define __MigCanUseSpecialReplyPort 0\n");
-    fprintf(file, "#define mig_get_special_reply_port() MACH_PORT_DEAD\n");
-    fprintf(file, "#define mig_dealloc_special_reply_port(port) __builtin_trap()\n");
-    fprintf(file, "#endif\n");
-    fprintf(file, "#endif /* __MigCanUseSpecialReplyPort */\n");
-#endif
-#if DISABLE_SPECIAL_REPLY_PORT_IN_CHROOT
-    fprintf(file, "#ifndef __MigCanUseSpecialReplyPort\n");
-    fprintf(file, "#if TARGET_OS_OSX\n");
-    fprintf(file, "extern _Bool _os_xbs_chrooted;\n");
-    fprintf(file, "#define __MigCanUseSpecialReplyPort (!_os_xbs_chrooted)\n");
-    fprintf(file, "#endif\n");
-    fprintf(file, "#endif /* __MigCanUseSpecialReplyPort */\n");
-#endif
-    fprintf(file, "#ifndef __MigCanUseSpecialReplyPort\n");
-    fprintf(file, "#define __MigCanUseSpecialReplyPort 1\n");
-    fprintf(file, "#endif /* __MigCanUseSpecialReplyPort */\n");
     fprintf(file, "#ifndef __MigSpecialReplyPortMsgOption\n");
-    fprintf(file, "#define __MigSpecialReplyPortMsgOption (__MigCanUseSpecialReplyPort ? "
-      "(MACH_SEND_SYNC_OVERRIDE|MACH_SEND_SYNC_USE_THRPRI|MACH_RCV_SYNC_WAIT) : MACH_MSG_OPTION_NONE)\n");
+    fprintf(file, "#define __MigSpecialReplyPortMsgOption "
+      "(MACH_SEND_SYNC_OVERRIDE|MACH_SEND_SYNC_USE_THRPRI|MACH_RCV_SYNC_WAIT)\n");
     fprintf(file, "#endif /* __MigSpecialReplyPortMsgOption */\n");
   }
   /*
@@ -256,11 +228,7 @@ WriteOneMachErrorDefine(FILE *file, char *name, boolean_t timeout, boolean_t Spe
   fprintf(file, "\tcase MACH_SEND_INVALID_DATA: \\\n");
   fprintf(file, "\tcase MACH_SEND_INVALID_DEST: \\\n");
   fprintf(file, "\tcase MACH_SEND_INVALID_HEADER: \\\n");
-  if (SpecialReplyPort) {
-    fprintf(file, "\t\tif (!__MigCanUseSpecialReplyPort) { \\\n");
-    fprintf(file, "\t\t\tmig_put_reply_port(InP->Head.msgh_reply_port); \\\n");
-    fprintf(file, "\t\t} \\\n");
-  } else {
+  if (!SpecialReplyPort) {
     fprintf(file, "\t\tmig_put_reply_port(InP->Head.msgh_reply_port); \\\n");
   }
   fprintf(file, "\t\tbreak; \\\n");
@@ -270,11 +238,7 @@ WriteOneMachErrorDefine(FILE *file, char *name, boolean_t timeout, boolean_t Spe
   }
   fprintf(file, "\tdefault: \\\n");
   if (SpecialReplyPort) {
-    fprintf(file, "\t\tif (__MigCanUseSpecialReplyPort) { \\\n");
-    fprintf(file, "\t\t\tmig_dealloc_special_reply_port(InP->Head.msgh_reply_port); \\\n");
-    fprintf(file, "\t\t} else { \\\n");
-    fprintf(file, "\t\t\tmig_dealloc_reply_port(InP->Head.msgh_reply_port); \\\n");
-    fprintf(file, "\t\t} \\\n");
+    fprintf(file, "\t\tmig_dealloc_special_reply_port(InP->Head.msgh_reply_port); \\\n");
   } else {
     fprintf(file, "\t\tmig_dealloc_reply_port(InP->Head.msgh_reply_port); \\\n");
   }
@@ -392,7 +356,7 @@ WriteRequestHead(FILE *file, routine_t *rt)
   else if (rt->rtOneWay)
     fprintf(file, "\tInP->%s = MACH_PORT_NULL;\n", rt->rtReplyPort->argMsgField);
   else if (rt->rtUseSpecialReplyPort)
-    fprintf(file, "\tInP->%s = __MigCanUseSpecialReplyPort ? mig_get_special_reply_port() : mig_get_reply_port();\n", rt->rtReplyPort->argMsgField);
+    fprintf(file, "\tInP->%s = mig_get_special_reply_port();\n", rt->rtReplyPort->argMsgField);
   else
     fprintf(file, "\tInP->%s = mig_get_reply_port();\n", rt->rtReplyPort->argMsgField);
 
@@ -1967,6 +1931,8 @@ static void
 WriteCheckMsgSize(FILE *file, argument_t *arg)
 {
   routine_t *rt = arg->argRoutine;
+  ipc_type_t *it = arg->argType;
+  ipc_type_t *btype = it->itElement;
 
   /* If there aren't any more Out args after this, then
      we can use the msgh_size_delta value directly in
@@ -1981,7 +1947,8 @@ WriteCheckMsgSize(FILE *file, argument_t *arg)
     /*
      * emit code to verify that the server-code-provided count does not exceed the maximum count allowed by the type.
      */
-    fprintf(file, "\t" "if ( Out%dP->%s > %d )\n", arg->argCount->argReplyPos, arg->argCount->argMsgField, arg->argType->itNumber);
+    fprintf(file, "\t" "if ( Out%dP->%s > %d )\n", arg->argCount->argReplyPos,
+           arg->argCount->argMsgField, it->itNumber/btype->itNumber);
     fputs("\t\t" "return MIG_TYPE_ERROR;\n", file);
     /* ...end... */
 
@@ -2010,7 +1977,8 @@ WriteCheckMsgSize(FILE *file, argument_t *arg)
     /*
      * emit code to verify that the server-code-provided count does not exceed the maximum count allowed by the type.
      */
-    fprintf(file, "\t" "if ( Out%dP->%s > %d )\n", arg->argCount->argReplyPos, arg->argCount->argMsgField, arg->argType->itNumber);
+    fprintf(file, "\t" "if ( Out%dP->%s > %d )\n", arg->argCount->argReplyPos,
+         arg->argCount->argMsgField, it->itNumber/btype->itNumber);
     fputs("\t\t" "return MIG_TYPE_ERROR;\n", file);
     /* ...end... */