Print this page
OS-881 To workaround OS-580 add support to only invalidate mappings from a single process
        
*** 113,129 ****
          case MC_SYNC:
                  /*
                   * MS_SYNC used to be defined to be zero but is now non-zero.
                   * For binary compatibility we still accept zero
                   * (the absence of MS_ASYNC) to mean the same thing.
                   */
                  iarg = (uintptr_t)arg;
                  if ((iarg & ~MS_INVALIDATE) == 0)
                          iarg |= MS_SYNC;
  
!                 if (((iarg & ~(MS_SYNC|MS_ASYNC|MS_INVALIDATE)) != 0) ||
!                     ((iarg & (MS_SYNC|MS_ASYNC)) == (MS_SYNC|MS_ASYNC))) {
                          error = set_errno(EINVAL);
                  } else {
                          error = as_ctl(as, addr, len, cmd, attr, iarg, NULL, 0);
                          if (error) {
                                  (void) set_errno(error);
--- 113,133 ----
          case MC_SYNC:
                  /*
                   * MS_SYNC used to be defined to be zero but is now non-zero.
                   * For binary compatibility we still accept zero
                   * (the absence of MS_ASYNC) to mean the same thing.
+                  * Binary compatibility is not an issue for MS_INVALCURPROC.
                   */
                  iarg = (uintptr_t)arg;
                  if ((iarg & ~MS_INVALIDATE) == 0)
                          iarg |= MS_SYNC;
  
!                 if (((iarg &
!                     ~(MS_SYNC|MS_ASYNC|MS_INVALIDATE|MS_INVALCURPROC)) != 0) ||
!                     ((iarg & (MS_SYNC|MS_ASYNC)) == (MS_SYNC|MS_ASYNC)) ||
!                     ((iarg & (MS_INVALIDATE|MS_INVALCURPROC)) ==
!                     (MS_INVALIDATE|MS_INVALCURPROC))) {
                          error = set_errno(EINVAL);
                  } else {
                          error = as_ctl(as, addr, len, cmd, attr, iarg, NULL, 0);
                          if (error) {
                                  (void) set_errno(error);