Print this page
OS-5462 lxbrand kernel should be lint clean
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
OS-3554 lx brand: node.js test test-fs-append-file.js hangs on 64-bit
OS-3209 javac futex problem when dtrace probes enabled - dtrace_systrace_syscall32 only passes 6 args
OS-3217 brandsys syscall takes 7 parameters, not 6

@@ -21,11 +21,11 @@
 
 /*
  * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2012 Milan Jurik. All rights reserved.
  * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc.
+ * Copyright 2016 Joyent, Inc.
  */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
 /*        All Rights Reserved   */
 

@@ -59,12 +59,11 @@
  */
 
 int     access(char *, int);
 int     alarm(int);
 int     auditsys(struct auditcalls *, rval_t *);
-int64_t brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t,
-    uintptr_t);
+int64_t brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
 int     brk(caddr_t);
 int     chdir(char *);
 int     chmod(char *, int);
 int     chown(char *, uid_t, gid_t);
 int     chroot(char *);

@@ -644,11 +643,11 @@
          */
         /* 175 */ IF_LP64(
                         SYSENT_NOSYS(),
                         SYSENT_C("llseek",      llseek32,       4)),
         /* 176 */ SYSENT_LOADABLE(),            /* inst_sync */
-        /* 177 */ SYSENT_CI("brandsys",         brandsys,       6),
+        /* 177 */ SYSENT_CI("brandsys",         brandsys,       5),
         /* 178 */ SYSENT_LOADABLE(),            /* kaio */
         /* 179 */ SYSENT_LOADABLE(),            /* cpc */
         /* 180 */ SYSENT_CI("lgrpsys",          lgrpsys,        3),
         /* 181 */ SYSENT_CI("rusagesys",        rusagesys,      5),
         /* 182 */ SYSENT_LOADABLE(),            /* portfs */

@@ -999,11 +998,11 @@
         /* 172 */ SYSENT_CI("lwp_cond_broadcast", lwp_cond_broadcast,   1),
         /* 173 */ SYSENT_CI("pread",            pread32,                4),
         /* 174 */ SYSENT_CI("pwrite",           pwrite32,               4),
         /* 175 */ SYSENT_C("llseek",            llseek32,       4),
         /* 176 */ SYSENT_LOADABLE32(),          /* inst_sync */
-        /* 177 */ SYSENT_CI("brandsys",         brandsys,       6),
+        /* 177 */ SYSENT_CI("brandsys",         brandsys,       5),
         /* 178 */ SYSENT_LOADABLE32(),          /* kaio */
         /* 179 */ SYSENT_LOADABLE32(),          /* cpc */
         /* 180 */ SYSENT_CI("lgrpsys",          lgrpsys,        3),
         /* 181 */ SYSENT_CI("rusagesys",        rusagesys,      5),
         /* 182 */ SYSENT_LOADABLE32(),          /* portfs */

@@ -1091,30 +1090,33 @@
  */
 char **syscallnames;
 
 systrace_sysent_t *systrace_sysent;
 void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t,
-    uintptr_t, uintptr_t, uintptr_t, uintptr_t);
+    uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
 
 /*ARGSUSED*/
 void
 systrace_stub(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
-    uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
+    uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5,
+    uintptr_t arg6, uintptr_t arg7)
 {}
 
 /*ARGSUSED*/
 int64_t
 dtrace_systrace_syscall(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
-    uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
+    uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6,
+    uintptr_t arg7)
 {
         systrace_sysent_t *sy = &systrace_sysent[curthread->t_sysnum];
         dtrace_id_t id;
         int64_t rval;
         proc_t *p;
 
         if ((id = sy->stsy_entry) != DTRACE_IDNONE)
-                (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5);
+                (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5,
+                    arg6, arg7);
 
         /*
          * We want to explicitly allow DTrace consumers to stop a process
          * before it actually executes the meat of the syscall.
          */

@@ -1124,18 +1126,19 @@
                 curthread->t_dtrace_stop = 0;
                 stop(PR_REQUESTED, 0);
         }
         mutex_exit(&p->p_lock);
 
-        rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5);
+        rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5,
+            arg6, arg7);
 
         if (ttolwp(curthread)->lwp_errno != 0)
                 rval = -1;
 
         if ((id = sy->stsy_return) != DTRACE_IDNONE)
                 (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval,
-                    (uintptr_t)((int64_t)rval >> 32), 0, 0, 0);
+                    (uintptr_t)((int64_t)rval >> 32), 0, 0, 0, 0, 0);
 
         return (rval);
 }
 
 #ifdef _SYSCALL32_IMPL

@@ -1143,19 +1146,21 @@
 systrace_sysent_t *systrace_sysent32;
 
 /*ARGSUSED*/
 int64_t
 dtrace_systrace_syscall32(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
-    uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
+    uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6,
+    uintptr_t arg7)
 {
         systrace_sysent_t *sy = &systrace_sysent32[curthread->t_sysnum];
         dtrace_id_t id;
         int64_t rval;
         proc_t *p;
 
         if ((id = sy->stsy_entry) != DTRACE_IDNONE)
-                (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5);
+                (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5, arg6,
+                    arg7);
 
         /*
          * We want to explicitly allow DTrace consumers to stop a process
          * before it actually executes the meat of the syscall.
          */

@@ -1165,18 +1170,19 @@
                 curthread->t_dtrace_stop = 0;
                 stop(PR_REQUESTED, 0);
         }
         mutex_exit(&p->p_lock);
 
-        rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5);
+        rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5, arg6,
+            arg7);
 
         if (ttolwp(curthread)->lwp_errno != 0)
                 rval = -1;
 
         if ((id = sy->stsy_return) != DTRACE_IDNONE)
                 (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval,
-                    (uintptr_t)((uint64_t)rval >> 32), 0, 0, 0);
+                    (uintptr_t)((uint64_t)rval >> 32), 0, 0, 0, 0, 0);
 
         return (rval);
 }
 
 #endif

@@ -1200,7 +1206,7 @@
                 sy = &systrace_sysent32[curthread->t_sysnum];
 #endif
         }
 
         if ((id = sy->stsy_return) != DTRACE_IDNONE)
-                (*systrace_probe)(id, 0, 0, 0, 0, 0, 0);
+                (*systrace_probe)(id, 0, 0, 0, 0, 0, 0, 0, 0);
 }