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
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/os/sysent.c
+++ new/usr/src/uts/common/os/sysent.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright 2012 Milan Jurik. All rights reserved.
25 25 * Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
26 - * Copyright (c) 2015, Joyent, Inc.
26 + * Copyright 2016 Joyent, Inc.
27 27 */
28 28
29 29 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
30 30 /* All Rights Reserved */
31 31
32 32 #include <sys/param.h>
33 33 #include <sys/types.h>
34 34 #include <sys/systm.h>
35 35 #include <sys/systrace.h>
36 36 #include <sys/procfs.h>
37 37 #include <sys/mman.h>
38 38 #include <sys/int_types.h>
39 39 #include <c2/audit.h>
40 40 #include <sys/stat.h>
41 41 #include <sys/times.h>
42 42 #include <sys/statfs.h>
43 43 #include <sys/stropts.h>
44 44 #include <sys/statvfs.h>
45 45 #include <sys/utsname.h>
46 46 #include <sys/timex.h>
47 47 #include <sys/socket.h>
48 48 #include <sys/sendfile.h>
49 49
50 50 struct hrtsysa;
51 51 struct mmaplf32a;
52 52
53 53 /*
|
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
54 54 * This table is the switch used to transfer to the appropriate
55 55 * routine for processing a system call. Each row contains the
56 56 * number of arguments expected, a switch that tells systrap()
57 57 * in trap.c whether a setjmp() is not necessary, and a pointer
58 58 * to the routine.
59 59 */
60 60
61 61 int access(char *, int);
62 62 int alarm(int);
63 63 int auditsys(struct auditcalls *, rval_t *);
64 -int64_t brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t,
65 - uintptr_t);
64 +int64_t brandsys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
66 65 int brk(caddr_t);
67 66 int chdir(char *);
68 67 int chmod(char *, int);
69 68 int chown(char *, uid_t, gid_t);
70 69 int chroot(char *);
71 70 int cladm(int, int, void *);
72 71 int close(int);
73 72 int exece(const char *, const char **, const char **);
74 73 int faccessat(int, char *, int, int);
75 74 int fchmodat(int, char *, int, int);
76 75 int fchownat(int, char *, uid_t, gid_t, int);
77 76 int fcntl(int, int, intptr_t);
78 77 int64_t vfork();
79 78 int64_t forksys(int, int);
80 79 int fstat(int, struct stat *);
81 80 int fdsync(int, int);
82 81 int64_t getgid();
83 82 int ucredsys(int, int, void *);
84 83 int64_t getpid();
85 84 int64_t getuid();
86 85 time_t gtime();
87 86 int getloadavg(int *, int);
88 87 int rusagesys(int, void *, void *, void *, void *);
89 88 int getpagesizes(int, size_t *, int);
90 89 int gtty(int, intptr_t);
91 90 #if defined(__i386) || defined(__amd64)
92 91 int hrtsys(struct hrtsysa *, rval_t *);
93 92 #endif /* __i386 || __amd64 */
94 93 int ioctl(int, int, intptr_t);
95 94 int kill();
96 95 int labelsys(int, void *, void *, void *, void *, void *);
97 96 int link(char *, char *);
98 97 int linkat(int, char *, int, char *, int);
99 98 off32_t lseek32(int32_t, off32_t, int32_t);
100 99 off_t lseek64(int, off_t, int);
101 100 int lgrpsys(int, long, void *);
102 101 int mmapobjsys(int, uint_t, mmapobj_result_t *, uint_t *, void *);
103 102 int mknod(char *, mode_t, dev_t);
104 103 int mknodat(int, char *, mode_t, dev_t);
105 104 int mount(long *, rval_t *);
106 105 int nice(int);
107 106 int nullsys();
108 107 int open(char *, int, int);
109 108 int openat(int, char *, int, int);
110 109 int pause();
111 110 long pcsample(void *, long);
112 111 int privsys(int, priv_op_t, priv_ptype_t, void *, size_t, int);
113 112 int profil(unsigned short *, size_t, ulong_t, uint_t);
114 113 ssize_t pread(int, void *, size_t, off_t);
115 114 ssize_t pwrite(int, void *, size_t, off_t);
116 115 ssize_t read(int, void *, size_t);
117 116 int rename(char *, char *);
118 117 int renameat(int, char *, int, char *);
119 118 void rexit(int);
120 119 int semsys();
121 120 int setgid(gid_t);
122 121 int setpgrp(int, int, int);
123 122 int setuid(uid_t);
124 123 uintptr_t shmsys();
125 124 uint64_t sidsys(int, int, int, int);
126 125 int sigprocmask(int, sigset_t *, sigset_t *);
127 126 int sigsuspend(sigset_t);
128 127 int sigaltstack(struct sigaltstack *, struct sigaltstack *);
129 128 int sigaction(int, struct sigaction *, struct sigaction *);
130 129 int sigpending(int, sigset_t *);
131 130 int sigresend(int, siginfo_t *, sigset_t *);
132 131 int sigtimedwait(sigset_t *, siginfo_t *, timespec_t *);
133 132 int getsetcontext(int, void *);
134 133 int stat(char *, struct stat *);
135 134 int fstatat(int, char *, struct stat *, int);
136 135 int stime(time_t);
137 136 int stty(int, intptr_t);
138 137 int syssync();
139 138 int sysacct(char *);
140 139 clock_t times(struct tms *);
141 140 long ulimit(int, long);
142 141 int getrlimit32(int, struct rlimit32 *);
143 142 int setrlimit32(int, struct rlimit32 *);
144 143 int umask(int);
145 144 int umount2(char *, int);
146 145 int unlink(char *);
147 146 int unlinkat(int, char *, int);
148 147 int utimesys(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
149 148 int64_t utssys32(void *, int, int, void *);
150 149 int64_t utssys64(void *, long, int, void *);
151 150 int uucopy(const void *, void *, size_t);
152 151 ssize_t uucopystr(const char *, char *, size_t);
153 152 ssize_t write(int, void *, size_t);
154 153 ssize_t readv(int, struct iovec *, int);
155 154 ssize_t writev(int, struct iovec *, int);
156 155 ssize_t preadv(int, struct iovec *, int, off_t, off_t);
157 156 ssize_t pwritev(int, struct iovec *, int, off_t, off_t);
158 157 int syslwp_park(int, uintptr_t, uintptr_t);
159 158 int rmdir(char *);
160 159 int mkdir(char *, int);
161 160 int mkdirat(int, char *, int);
162 161 int getdents32(int, void *, size_t);
163 162 int statfs32(char *, struct statfs32 *, int32_t, int32_t);
164 163 int fstatfs32(int32_t, struct statfs32 *, int32_t, int32_t);
165 164 int sysfs(int, long, long);
166 165 int getmsg(int, struct strbuf *, struct strbuf *, int *);
167 166 int pollsys(pollfd_t *, nfds_t, timespec_t *, sigset_t *);
168 167 int putmsg(int, struct strbuf *, struct strbuf *, int);
169 168 int uadmin();
170 169 int lstat(char *, struct stat *);
171 170 int symlink(char *, char *);
172 171 int symlinkat(char *, int, char *);
173 172 ssize_t readlink(char *, char *, size_t);
174 173 ssize_t readlinkat(int, char *, char *, size_t);
175 174 int resolvepath(char *, char *, size_t);
176 175 int setgroups(int, gid_t *);
177 176 int getgroups(int, gid_t *);
178 177 int fchdir(int);
179 178 int fchown(int, uid_t, uid_t);
180 179 int fchmod(int, int);
181 180 int getcwd(char *, size_t);
182 181 int statvfs(char *, struct statvfs *);
183 182 int fstatvfs(int, struct statvfs *);
184 183 offset_t llseek32(int32_t, uint32_t, uint32_t, int);
185 184
186 185 #if (defined(__i386) && !defined(__amd64)) || defined(__i386_COMPAT)
187 186 int sysi86(short, uintptr_t, uintptr_t, uintptr_t);
188 187 #endif
189 188
190 189 int acl(const char *, int, int, void *);
191 190 int facl(int, int, int, void *);
192 191 long priocntlsys(int, procset_t *, int, caddr_t, caddr_t);
193 192 int waitsys(idtype_t, id_t, siginfo_t *, int);
194 193 int sigsendsys(procset_t *, int);
195 194 int mincore(caddr_t, size_t, char *);
196 195 caddr_t smmap64(caddr_t, size_t, int, int, int, off_t);
197 196 caddr_t smmap32(caddr32_t, size32_t, int, int, int, off32_t);
198 197 int smmaplf32(struct mmaplf32a *, rval_t *);
199 198 int mprotect(caddr_t, size_t, int);
200 199 int munmap(caddr_t, size_t);
201 200 int uname(struct utsname *);
202 201 int lchown(char *, uid_t, gid_t);
203 202 int getpmsg(int, struct strbuf *, struct strbuf *, int *, int *);
204 203 int putpmsg(int, struct strbuf *, struct strbuf *, int, int);
205 204 int memcntl(caddr_t, size_t, int, caddr_t, int, int);
206 205 long sysconfig(int);
207 206 int adjtime(struct timeval *, struct timeval *);
208 207 long systeminfo(int, char *, long);
209 208 int setegid(gid_t);
210 209 int seteuid(uid_t);
211 210
212 211 int setreuid(uid_t, uid_t);
213 212 int setregid(gid_t, gid_t);
214 213 int install_utrap(utrap_entry_t type, utrap_handler_t, utrap_handler_t *);
215 214 #ifdef __sparc
216 215 int sparc_utrap_install(utrap_entry_t type, utrap_handler_t,
217 216 utrap_handler_t, utrap_handler_t *, utrap_handler_t *);
218 217 #endif
219 218
220 219 int syslwp_create(ucontext_t *, int, id_t *);
221 220 void syslwp_exit();
222 221 int syslwp_suspend(id_t);
223 222 int syslwp_continue(id_t);
224 223 int syslwp_private(int, int, uintptr_t);
225 224 int lwp_detach(id_t);
226 225 int lwp_info(timestruc_t *);
227 226 int lwp_kill(id_t, int);
228 227 int lwp_self();
229 228 int64_t lwp_sigmask(int, uint_t, uint_t, uint_t, uint_t);
230 229 int yield();
231 230 int lwp_wait(id_t, id_t *);
232 231 int lwp_mutex_timedlock(lwp_mutex_t *, timespec_t *, uintptr_t);
233 232 int lwp_mutex_wakeup(lwp_mutex_t *, int);
234 233 int lwp_mutex_unlock(lwp_mutex_t *);
235 234 int lwp_mutex_trylock(lwp_mutex_t *, uintptr_t);
236 235 int lwp_mutex_register(lwp_mutex_t *, caddr_t);
237 236 int lwp_rwlock_sys(int, lwp_rwlock_t *, timespec_t *);
238 237 int lwp_sema_post(lwp_sema_t *);
239 238 int lwp_sema_timedwait(lwp_sema_t *, timespec_t *, int);
240 239 int lwp_sema_trywait(lwp_sema_t *);
241 240 int lwp_cond_wait(lwp_cond_t *, lwp_mutex_t *, timespec_t *, int);
242 241 int lwp_cond_signal(lwp_cond_t *);
243 242 int lwp_cond_broadcast(lwp_cond_t *);
244 243 caddr_t schedctl();
245 244
246 245 long pathconf(char *, int);
247 246 long fpathconf(int, int);
248 247 int processor_bind(idtype_t, id_t, processorid_t, processorid_t *);
249 248 int processor_info(processorid_t, processor_info_t *);
250 249 int p_online(processorid_t, int);
251 250
252 251 /*
253 252 * POSIX .4 system calls *
254 253 */
255 254 int clock_gettime(clockid_t, timespec_t *);
256 255 int clock_settime(clockid_t, timespec_t *);
257 256 int clock_getres(clockid_t, timespec_t *);
258 257 int timer_create(clockid_t, struct sigevent *, timer_t *);
259 258 int timer_delete(timer_t);
260 259 int timer_settime(timer_t, int, itimerspec_t *, itimerspec_t *);
261 260 int timer_gettime(timer_t, itimerspec_t *);
262 261 int timer_getoverrun(timer_t);
263 262 int nanosleep(timespec_t *, timespec_t *);
264 263 int sigqueue(pid_t, int, void *, int, int);
265 264 int signotify(int, siginfo_t *, signotify_id_t *);
266 265
267 266 int getdents64(int, void *, size_t);
268 267 int stat64(char *, struct stat64 *);
269 268 int lstat64(char *, struct stat64 *);
270 269 int fstatat64(int, char *, struct stat64 *, int);
271 270 int fstat64(int, struct stat64 *);
272 271 int statvfs64(char *, struct statvfs64 *);
273 272 int fstatvfs64(int, struct statvfs64 *);
274 273 int setrlimit64(int, struct rlimit64 *);
275 274 int getrlimit64(int, struct rlimit64 *);
276 275 int pread64(int, void *, size32_t, uint32_t, uint32_t);
277 276 int pwrite64(int, void *, size32_t, uint32_t, uint32_t);
278 277 int open64(char *, int, int);
279 278 int openat64(int, char *, int, int);
280 279
281 280 /*
282 281 * NTP syscalls
283 282 */
284 283
285 284 int ntp_gettime(struct ntptimeval *);
286 285 int ntp_adjtime(struct timex *);
287 286
288 287 /*
289 288 * ++++++++++++++++++++++++
290 289 * ++ SunOS4.1 Buyback ++
291 290 * ++++++++++++++++++++++++
292 291 *
293 292 * fchroot, vhangup, gettimeofday
294 293 */
295 294
296 295 int fchroot(int);
297 296 int vhangup();
298 297 int gettimeofday(struct timeval *);
299 298 int getitimer(uint_t, struct itimerval *);
300 299 int setitimer(uint_t, struct itimerval *, struct itimerval *);
301 300
302 301 int corectl(int, uintptr_t, uintptr_t, uintptr_t);
303 302 int modctl(int, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
304 303 int64_t loadable_syscall();
305 304 int64_t indir();
306 305
307 306 long tasksys(int, projid_t, uint_t, void *, size_t);
308 307 long rctlsys(int, char *, void *, void *, size_t, int);
309 308
310 309 long zone();
311 310
312 311 int so_socket(int, int, int, char *, int);
313 312 int so_socketpair(int[2]);
314 313 int bind(int, struct sockaddr *, socklen_t, int);
315 314 int listen(int, int, int);
316 315 int accept(int, struct sockaddr *, socklen_t *, int, int);
317 316 int connect(int, struct sockaddr *, socklen_t, int);
318 317 int shutdown(int, int, int);
319 318 ssize_t recv(int, void *, size_t, int);
320 319 ssize_t recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);
321 320 ssize_t recvmsg(int, struct nmsghdr *, int);
322 321 ssize_t send(int, void *, size_t, int);
323 322 ssize_t sendmsg(int, struct nmsghdr *, int);
324 323 ssize_t sendto(int, void *, size_t, int, struct sockaddr *, socklen_t);
325 324 int getpeername(int, struct sockaddr *, socklen_t *, int);
326 325 int getsockname(int, struct sockaddr *, socklen_t *, int);
327 326 int getsockopt(int, int, int, void *, socklen_t *, int);
328 327 int setsockopt(int, int, int, void *, socklen_t *, int);
329 328 int sockconfig(int, void *, void *, void *, void *);
330 329 ssize_t sendfilev(int, int, const struct sendfilevec *, int, size_t *);
331 330 int getrandom(void *, size_t, int);
332 331
333 332 typedef int64_t (*llfcn_t)(); /* for casting one-word returns */
334 333
335 334 /*
336 335 * Sysent initialization macros.
337 336 * These take the name string of the system call even though that isn't
338 337 * currently used in the sysent entry. This might be useful someday.
339 338 *
340 339 * Initialization macro for system calls which take their args in the C style.
341 340 * These system calls return the longlong_t return value and must call
342 341 * set_errno() to return an error. For SPARC, narg must be at most six.
343 342 * For more args, use the SYSENT_AP() routine.
344 343 *
345 344 * We are able to return two distinct values to userland via the rval_t.
346 345 * At this time, that corresponds to one 64-bit quantity, or two 32-bit
347 346 * quantities. The kernel does not currently need to return two 64-bit
348 347 * values, or one 128 bit value(!), but we may do one day, so the calling
349 348 * sequence between userland and the kernel should permit it.
350 349 *
351 350 * The interpretation of rval_t is provided by the sy_flags field
352 351 * which is used to determine how to arrange the results in registers
353 352 * (or on the stack) for return userland.
354 353 */
355 354 /* returns a 64-bit quantity for both ABIs */
356 355 #define SYSENT_C(name, call, narg) \
357 356 { (narg), SE_64RVAL, NULL, NULL, (llfcn_t)(call) }
358 357
359 358 /* returns one 32-bit value for both ABIs: r_val1 */
360 359 #define SYSENT_CI(name, call, narg) \
361 360 { (narg), SE_32RVAL1, NULL, NULL, (llfcn_t)(call) }
362 361
363 362 /* returns 2 32-bit values: r_val1 & r_val2 */
364 363 #define SYSENT_2CI(name, call, narg) \
365 364 { (narg), SE_32RVAL1|SE_32RVAL2, NULL, NULL, (llfcn_t)(call) }
366 365
367 366 /*
368 367 * Initialization macro for system calls which take their args in the standard
369 368 * Unix style of a pointer to the arg structure and a pointer to the rval_t.
370 369 *
371 370 * Deprecated wherever possible (slower on some architectures, and trickier
372 371 * to maintain two flavours).
373 372 */
374 373 #define SYSENT_AP(name, call, narg) \
375 374 { (narg), SE_64RVAL, (call), NULL, syscall_ap }
376 375
377 376 /*
378 377 * Conditional constructors to build the tables without #ifdef clutter
379 378 */
380 379 #if defined(_LP64)
381 380 #define IF_LP64(true, false) true
382 381 #else
383 382 #define IF_LP64(true, false) false
384 383 #endif
385 384
386 385 #if defined(__sparc)
387 386 #define IF_sparc(true, false) true
388 387 #else
389 388 #define IF_sparc(true, false) false
390 389 #endif
391 390
392 391 #if defined(__i386) && !defined(__amd64)
393 392 #define IF_i386(true, false) true
394 393 #else
395 394 #define IF_i386(true, false) false
396 395 #endif
397 396
398 397 #if defined(__i386) || defined(__amd64)
399 398 #define IF_x86(true, false) true
400 399 #else
401 400 #define IF_x86(true, false) false
402 401 #endif
403 402
404 403 #if (defined(__i386) && !defined(__amd64)) || defined(__i386_COMPAT)
405 404 #define IF_386_ABI(true, false) true
406 405 #else
407 406 #define IF_386_ABI(true, false) false
408 407 #endif
409 408
410 409 /*
411 410 * Define system calls that return a native 'long' quantity i.e. a 32-bit
412 411 * or 64-bit integer - depending on how the kernel is itself compiled
413 412 * e.g. read(2) returns 'ssize_t' in the kernel and in userland.
414 413 */
415 414 #define SYSENT_CL(name, call, narg) \
416 415 IF_LP64(SYSENT_C(name, call, narg), SYSENT_CI(name, call, narg))
417 416
418 417 /*
419 418 * Initialization macro for loadable native system calls.
420 419 */
421 420 #define SYSENT_LOADABLE() \
422 421 { 0, SE_LOADABLE, (int (*)())nosys, NULL, loadable_syscall }
423 422
424 423 /*
425 424 * Initialization macro for loadable 32-bit compatibility system calls.
426 425 */
427 426 #define SYSENT_LOADABLE32() SYSENT_LOADABLE()
428 427
429 428 #define SYSENT_NOSYS() SYSENT_C("nosys", nosys, 0)
430 429
431 430 struct sysent nosys_ent = SYSENT_NOSYS();
432 431
433 432 /*
434 433 * Native sysent table.
435 434 */
436 435 struct sysent sysent[NSYSCALL] =
437 436 {
438 437 /* 0 */ IF_LP64(
439 438 SYSENT_NOSYS(),
440 439 SYSENT_C("indir", indir, 1)),
441 440 /* 1 */ SYSENT_CI("exit", rexit, 1),
442 441 /* 2 */ SYSENT_LOADABLE(), /* (was forkall) */
443 442 /* 3 */ SYSENT_CL("read", read, 3),
444 443 /* 4 */ SYSENT_CL("write", write, 3),
445 444 /* 5 */ SYSENT_CI("open", open, 3),
446 445 /* 6 */ SYSENT_CI("close", close, 1),
447 446 /* 7 */ SYSENT_CI("linkat", linkat, 5),
448 447 /* 8 */ SYSENT_LOADABLE(), /* (was creat) */
449 448 /* 9 */ SYSENT_CI("link", link, 2),
450 449 /* 10 */ SYSENT_CI("unlink", unlink, 1),
451 450 /* 11 */ SYSENT_CI("symlinkat", symlinkat, 3),
452 451 /* 12 */ SYSENT_CI("chdir", chdir, 1),
453 452 /* 13 */ SYSENT_CL("time", gtime, 0),
454 453 /* 14 */ SYSENT_CI("mknod", mknod, 3),
455 454 /* 15 */ SYSENT_CI("chmod", chmod, 2),
456 455 /* 16 */ SYSENT_CI("chown", chown, 3),
457 456 /* 17 */ SYSENT_CI("brk", brk, 1),
458 457 /* 18 */ SYSENT_CI("stat", stat, 2),
459 458 /* 19 */ IF_LP64(
460 459 SYSENT_CL("lseek", lseek64, 3),
461 460 SYSENT_CL("lseek", lseek32, 3)),
462 461 /* 20 */ SYSENT_2CI("getpid", getpid, 0),
463 462 /* 21 */ SYSENT_AP("mount", mount, 8),
464 463 /* 22 */ SYSENT_CL("readlinkat", readlinkat, 4),
465 464 /* 23 */ SYSENT_CI("setuid", setuid, 1),
466 465 /* 24 */ SYSENT_2CI("getuid", getuid, 0),
467 466 /* 25 */ SYSENT_CI("stime", stime, 1),
468 467 /* 26 */ SYSENT_CL("pcsample", pcsample, 2),
469 468 /* 27 */ SYSENT_CI("alarm", alarm, 1),
470 469 /* 28 */ SYSENT_CI("fstat", fstat, 2),
471 470 /* 29 */ SYSENT_CI("pause", pause, 0),
472 471 /* 30 */ SYSENT_LOADABLE(), /* (was utime) */
473 472 /* 31 */ SYSENT_CI("stty", stty, 2),
474 473 /* 32 */ SYSENT_CI("gtty", gtty, 2),
475 474 /* 33 */ SYSENT_CI("access", access, 2),
476 475 /* 34 */ SYSENT_CI("nice", nice, 1),
477 476 /* 35 */ IF_LP64(
478 477 SYSENT_NOSYS(),
479 478 SYSENT_CI("statfs", statfs32, 4)),
480 479 /* 36 */ SYSENT_CI("sync", syssync, 0),
481 480 /* 37 */ SYSENT_CI("kill", kill, 2),
482 481 /* 38 */ IF_LP64(
483 482 SYSENT_NOSYS(),
484 483 SYSENT_CI("fstatfs", fstatfs32, 4)),
485 484 /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3),
486 485 /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3),
487 486 /* 41 */ SYSENT_LOADABLE(), /* (was dup) */
488 487 /* 42 */ SYSENT_LOADABLE(), /* pipe */
489 488 /* 43 */ SYSENT_CL("times", times, 1),
490 489 /* 44 */ SYSENT_CI("prof", profil, 4),
491 490 /* 45 */ SYSENT_CI("faccessat", faccessat, 4),
492 491 /* 46 */ SYSENT_CI("setgid", setgid, 1),
493 492 /* 47 */ SYSENT_2CI("getgid", getgid, 0),
494 493 /* 48 */ SYSENT_CI("mknodat", mknodat, 4),
495 494 /* 49 */ SYSENT_LOADABLE(), /* msgsys */
496 495 /* 50 */ IF_x86(
497 496 SYSENT_CI("sysi86", sysi86, 4),
498 497 SYSENT_LOADABLE()), /* (was sys3b) */
499 498 /* 51 */ SYSENT_LOADABLE(), /* sysacct */
500 499 /* 52 */ SYSENT_LOADABLE(), /* shmsys */
501 500 /* 53 */ SYSENT_LOADABLE(), /* semsys */
502 501 /* 54 */ SYSENT_CI("ioctl", ioctl, 3),
503 502 /* 55 */ SYSENT_CI("uadmin", uadmin, 3),
504 503 /* 56 */ SYSENT_CI("fchownat", fchownat, 5),
505 504 /* 57 */ IF_LP64(
506 505 SYSENT_2CI("utssys", utssys64, 4),
507 506 SYSENT_2CI("utssys", utssys32, 4)),
508 507 /* 58 */ SYSENT_CI("fdsync", fdsync, 2),
509 508 /* 59 */ SYSENT_CI("exece", exece, 3),
510 509 /* 60 */ SYSENT_CI("umask", umask, 1),
511 510 /* 61 */ SYSENT_CI("chroot", chroot, 1),
512 511 /* 62 */ SYSENT_CI("fcntl", fcntl, 3),
513 512 /* 63 */ SYSENT_CI("ulimit", ulimit, 2),
514 513 /* 64 */ SYSENT_CI("renameat", renameat, 4),
515 514 /* 65 */ SYSENT_CI("unlinkat", unlinkat, 3),
516 515 /* 66 */ SYSENT_CI("fstatat", fstatat, 4),
517 516 /* 67 */ IF_LP64(
518 517 SYSENT_NOSYS(),
519 518 SYSENT_CI("fstatat64", fstatat64, 4)),
520 519 /* 68 */ SYSENT_CI("openat", openat, 4),
521 520 /* 69 */ IF_LP64(
522 521 SYSENT_NOSYS(),
523 522 SYSENT_CI("openat64", openat64, 4)),
524 523 /* 70 */ SYSENT_CI("tasksys", tasksys, 5),
525 524 /* 71 */ SYSENT_LOADABLE(), /* acctctl */
526 525 /* 72 */ SYSENT_LOADABLE(), /* exacct */
527 526 /* 73 */ SYSENT_CI("getpagesizes", getpagesizes, 3),
528 527 /* 74 */ SYSENT_CI("rctlsys", rctlsys, 6),
529 528 /* 75 */ SYSENT_2CI("sidsys", sidsys, 4),
530 529 /* 76 */ SYSENT_LOADABLE(), /* (was fsat) */
531 530 /* 77 */ SYSENT_CI("lwp_park", syslwp_park, 3),
532 531 /* 78 */ SYSENT_CL("sendfilev", sendfilev, 5),
533 532 /* 79 */ SYSENT_CI("rmdir", rmdir, 1),
534 533 /* 80 */ SYSENT_CI("mkdir", mkdir, 2),
535 534 /* 81 */ IF_LP64(
536 535 SYSENT_CI("getdents", getdents64, 3),
537 536 SYSENT_CI("getdents", getdents32, 3)),
538 537 /* 82 */ SYSENT_CI("privsys", privsys, 6),
539 538 /* 83 */ SYSENT_CI("ucredsys", ucredsys, 3),
540 539 /* 84 */ SYSENT_CI("sysfs", sysfs, 3),
541 540 /* 85 */ SYSENT_CI("getmsg", getmsg, 4),
542 541 /* 86 */ SYSENT_CI("putmsg", putmsg, 4),
543 542 /* 87 */ SYSENT_LOADABLE(), /* (was poll) */
544 543 /* 88 */ SYSENT_CI("lstat", lstat, 2),
545 544 /* 89 */ SYSENT_CI("symlink", symlink, 2),
546 545 /* 90 */ SYSENT_CL("readlink", readlink, 3),
547 546 /* 91 */ SYSENT_CI("setgroups", setgroups, 2),
548 547 /* 92 */ SYSENT_CI("getgroups", getgroups, 2),
549 548 /* 93 */ SYSENT_CI("fchmod", fchmod, 2),
550 549 /* 94 */ SYSENT_CI("fchown", fchown, 3),
551 550 /* 95 */ SYSENT_CI("sigprocmask", sigprocmask, 3),
552 551 /* 96 */ SYSENT_CI("sigsuspend", sigsuspend, 1),
553 552 /* 97 */ SYSENT_CI("sigaltstack", sigaltstack, 2),
554 553 /* 98 */ SYSENT_CI("sigaction", sigaction, 3),
555 554 /* 99 */ SYSENT_CI("sigpending", sigpending, 2),
556 555 /* 100 */ SYSENT_CI("getsetcontext", getsetcontext, 2),
557 556 /* 101 */ SYSENT_CI("fchmodat", fchmodat, 4),
558 557 /* 102 */ SYSENT_CI("mkdirat", mkdirat, 3),
559 558 /* 103 */ SYSENT_CI("statvfs", statvfs, 2),
560 559 /* 104 */ SYSENT_CI("fstatvfs", fstatvfs, 2),
561 560 /* 105 */ SYSENT_CI("getloadavg", getloadavg, 2),
562 561 /* 106 */ SYSENT_LOADABLE(), /* nfssys */
563 562 /* 107 */ SYSENT_CI("waitsys", waitsys, 4),
564 563 /* 108 */ SYSENT_CI("sigsendset", sigsendsys, 2),
565 564 /* 109 */ IF_x86(
566 565 SYSENT_AP("hrtsys", hrtsys, 5),
567 566 SYSENT_LOADABLE()),
568 567 /* 110 */ SYSENT_CI("utimesys", utimesys, 5),
569 568 /* 111 */ SYSENT_CI("sigresend", sigresend, 3),
570 569 /* 112 */ SYSENT_CL("priocntlsys", priocntlsys, 5),
571 570 /* 113 */ SYSENT_CL("pathconf", pathconf, 2),
572 571 /* 114 */ SYSENT_CI("mincore", mincore, 3),
573 572 /* 115 */ IF_LP64(
574 573 SYSENT_CL("mmap", smmap64, 6),
575 574 SYSENT_CL("mmap", smmap32, 6)),
576 575 /* 116 */ SYSENT_CI("mprotect", mprotect, 3),
577 576 /* 117 */ SYSENT_CI("munmap", munmap, 2),
578 577 /* 118 */ SYSENT_CL("fpathconf", fpathconf, 2),
579 578 /* 119 */ SYSENT_2CI("vfork", vfork, 0),
580 579 /* 120 */ SYSENT_CI("fchdir", fchdir, 1),
581 580 /* 121 */ SYSENT_CL("readv", readv, 3),
582 581 /* 122 */ SYSENT_CL("writev", writev, 3),
583 582 /* 123 */ SYSENT_CL("preadv", preadv, 5),
584 583 /* 124 */ SYSENT_CL("pwritev", pwritev, 5),
585 584 /* 125 */ SYSENT_LOADABLE(), /* (was fxstat) */
586 585 /* 126 */ SYSENT_CI("getrandom", getrandom, 3),
587 586 /* 127 */ SYSENT_CI("mmapobj", mmapobjsys, 5),
588 587 /* 128 */ IF_LP64(
589 588 SYSENT_CI("setrlimit", setrlimit64, 2),
590 589 SYSENT_CI("setrlimit", setrlimit32, 2)),
591 590 /* 129 */ IF_LP64(
592 591 SYSENT_CI("getrlimit", getrlimit64, 2),
593 592 SYSENT_CI("getrlimit", getrlimit32, 2)),
594 593 /* 130 */ SYSENT_CI("lchown", lchown, 3),
595 594 /* 131 */ SYSENT_CI("memcntl", memcntl, 6),
596 595 /* 132 */ SYSENT_CI("getpmsg", getpmsg, 5),
597 596 /* 133 */ SYSENT_CI("putpmsg", putpmsg, 5),
598 597 /* 134 */ SYSENT_CI("rename", rename, 2),
599 598 /* 135 */ SYSENT_CI("uname", uname, 1),
600 599 /* 136 */ SYSENT_CI("setegid", setegid, 1),
601 600 /* 137 */ SYSENT_CL("sysconfig", sysconfig, 1),
602 601 /* 138 */ SYSENT_CI("adjtime", adjtime, 2),
603 602 /* 139 */ SYSENT_CL("systeminfo", systeminfo, 3),
604 603 /* 140 */ SYSENT_LOADABLE(), /* sharefs */
605 604 /* 141 */ SYSENT_CI("seteuid", seteuid, 1),
606 605 /* 142 */ SYSENT_2CI("forksys", forksys, 2),
607 606 /* 143 */ SYSENT_LOADABLE(), /* (was fork1) */
608 607 /* 144 */ SYSENT_CI("sigtimedwait", sigtimedwait, 3),
609 608 /* 145 */ SYSENT_CI("lwp_info", lwp_info, 1),
610 609 /* 146 */ SYSENT_CI("yield", yield, 0),
611 610 /* 147 */ SYSENT_LOADABLE(), /* (was lwp_sema_wait) */
612 611 /* 148 */ SYSENT_CI("lwp_sema_post", lwp_sema_post, 1),
613 612 /* 149 */ SYSENT_CI("lwp_sema_trywait", lwp_sema_trywait, 1),
614 613 /* 150 */ SYSENT_CI("lwp_detach", lwp_detach, 1),
615 614 /* 151 */ SYSENT_CI("corectl", corectl, 4),
616 615 /* 152 */ SYSENT_CI("modctl", modctl, 6),
617 616 /* 153 */ SYSENT_CI("fchroot", fchroot, 1),
618 617 /* 154 */ SYSENT_LOADABLE(), /* (was utimes) */
619 618 /* 155 */ SYSENT_CI("vhangup", vhangup, 0),
620 619 /* 156 */ SYSENT_CI("gettimeofday", gettimeofday, 1),
621 620 /* 157 */ SYSENT_CI("getitimer", getitimer, 2),
622 621 /* 158 */ SYSENT_CI("setitimer", setitimer, 3),
623 622 /* 159 */ SYSENT_CI("lwp_create", syslwp_create, 3),
624 623 /* 160 */ SYSENT_CI("lwp_exit", (int (*)())syslwp_exit, 0),
625 624 /* 161 */ SYSENT_CI("lwp_suspend", syslwp_suspend, 1),
626 625 /* 162 */ SYSENT_CI("lwp_continue", syslwp_continue, 1),
627 626 /* 163 */ SYSENT_CI("lwp_kill", lwp_kill, 2),
628 627 /* 164 */ SYSENT_CI("lwp_self", lwp_self, 0),
629 628 /* 165 */ SYSENT_2CI("lwp_sigmask", lwp_sigmask, 5),
630 629 /* 166 */ IF_x86(
631 630 SYSENT_CI("lwp_private", syslwp_private, 3),
632 631 SYSENT_NOSYS()),
633 632 /* 167 */ SYSENT_CI("lwp_wait", lwp_wait, 2),
634 633 /* 168 */ SYSENT_CI("lwp_mutex_wakeup", lwp_mutex_wakeup, 2),
635 634 /* 169 */ SYSENT_LOADABLE(), /* (was lwp_mutex_lock) */
636 635 /* 170 */ SYSENT_CI("lwp_cond_wait", lwp_cond_wait, 4),
637 636 /* 171 */ SYSENT_CI("lwp_cond_signal", lwp_cond_signal, 1),
638 637 /* 172 */ SYSENT_CI("lwp_cond_broadcast", lwp_cond_broadcast, 1),
|
↓ open down ↓ |
563 lines elided |
↑ open up ↑ |
639 638 /* 173 */ SYSENT_CL("pread", pread, 4),
640 639 /* 174 */ SYSENT_CL("pwrite ", pwrite, 4),
641 640 /*
642 641 * The 64-bit C library maps llseek() to lseek(), so this
643 642 * is needed as a native syscall only on the 32-bit kernel.
644 643 */
645 644 /* 175 */ IF_LP64(
646 645 SYSENT_NOSYS(),
647 646 SYSENT_C("llseek", llseek32, 4)),
648 647 /* 176 */ SYSENT_LOADABLE(), /* inst_sync */
649 - /* 177 */ SYSENT_CI("brandsys", brandsys, 6),
648 + /* 177 */ SYSENT_CI("brandsys", brandsys, 5),
650 649 /* 178 */ SYSENT_LOADABLE(), /* kaio */
651 650 /* 179 */ SYSENT_LOADABLE(), /* cpc */
652 651 /* 180 */ SYSENT_CI("lgrpsys", lgrpsys, 3),
653 652 /* 181 */ SYSENT_CI("rusagesys", rusagesys, 5),
654 653 /* 182 */ SYSENT_LOADABLE(), /* portfs */
655 654 /* 183 */ SYSENT_CI("pollsys", pollsys, 4),
656 655 /* 184 */ SYSENT_CI("labelsys", labelsys, 5),
657 656 /* 185 */ SYSENT_CI("acl", acl, 4),
658 657 /* 186 */ SYSENT_AP("auditsys", auditsys, 6),
659 658 /* 187 */ SYSENT_CI("processor_bind", processor_bind, 4),
660 659 /* 188 */ SYSENT_CI("processor_info", processor_info, 2),
661 660 /* 189 */ SYSENT_CI("p_online", p_online, 2),
662 661 /* 190 */ SYSENT_CI("sigqueue", sigqueue, 5),
663 662 /* 191 */ SYSENT_CI("clock_gettime", clock_gettime, 2),
664 663 /* 192 */ SYSENT_CI("clock_settime", clock_settime, 2),
665 664 /* 193 */ SYSENT_CI("clock_getres", clock_getres, 2),
666 665 /* 194 */ SYSENT_CI("timer_create", timer_create, 3),
667 666 /* 195 */ SYSENT_CI("timer_delete", timer_delete, 1),
668 667 /* 196 */ SYSENT_CI("timer_settime", timer_settime, 4),
669 668 /* 197 */ SYSENT_CI("timer_gettime", timer_gettime, 2),
670 669 /* 198 */ SYSENT_CI("timer_getoverrun", timer_getoverrun, 1),
671 670 /* 199 */ SYSENT_CI("nanosleep", nanosleep, 2),
672 671 /* 200 */ SYSENT_CI("facl", facl, 4),
673 672 /* 201 */ SYSENT_LOADABLE(), /* door */
674 673 /* 202 */ SYSENT_CI("setreuid", setreuid, 2),
675 674 /* 203 */ SYSENT_CI("setregid", setregid, 2),
676 675 /* 204 */ SYSENT_CI("install_utrap", install_utrap, 3),
677 676 /* 205 */ SYSENT_CI("signotify", signotify, 3),
678 677 /* 206 */ SYSENT_CL("schedctl", schedctl, 0),
679 678 /* 207 */ SYSENT_LOADABLE(), /* pset */
680 679 /* 208 */ IF_sparc(
681 680 SYSENT_CI("sparc_utrap_install", sparc_utrap_install, 5),
682 681 SYSENT_NOSYS()),
683 682 /* 209 */ SYSENT_CI("resolvepath", resolvepath, 3),
684 683 /* 210 */ SYSENT_CI("lwp_mutex_timedlock", lwp_mutex_timedlock, 3),
685 684 /* 211 */ SYSENT_CI("lwp_sema_timedwait", lwp_sema_timedwait, 3),
686 685 /* 212 */ SYSENT_CI("lwp_rwlock_sys", lwp_rwlock_sys, 3),
687 686 /*
688 687 * Syscalls 213-225: 32-bit system call support for large files.
689 688 *
690 689 * (The 64-bit C library transparently maps these system calls
691 690 * back to their native versions, so almost all of them are only
692 691 * needed as native syscalls on the 32-bit kernel).
693 692 */
694 693 /* 213 */ IF_LP64(
695 694 SYSENT_NOSYS(),
696 695 SYSENT_CI("getdents64", getdents64, 3)),
697 696 /* 214 */ IF_LP64(
698 697 SYSENT_NOSYS(),
699 698 SYSENT_AP("smmaplf32", smmaplf32, 7)),
700 699 /* 215 */ IF_LP64(
701 700 SYSENT_NOSYS(),
702 701 SYSENT_CI("stat64", stat64, 2)),
703 702 /* 216 */ IF_LP64(
704 703 SYSENT_NOSYS(),
705 704 SYSENT_CI("lstat64", lstat64, 2)),
706 705 /* 217 */ IF_LP64(
707 706 SYSENT_NOSYS(),
708 707 SYSENT_CI("fstat64", fstat64, 2)),
709 708 /* 218 */ IF_LP64(
710 709 SYSENT_NOSYS(),
711 710 SYSENT_CI("statvfs64", statvfs64, 2)),
712 711 /* 219 */ IF_LP64(
713 712 SYSENT_NOSYS(),
714 713 SYSENT_CI("fstatvfs64", fstatvfs64, 2)),
715 714 /* 220 */ IF_LP64(
716 715 SYSENT_NOSYS(),
717 716 SYSENT_CI("setrlimit64", setrlimit64, 2)),
718 717 /* 221 */ IF_LP64(
719 718 SYSENT_NOSYS(),
720 719 SYSENT_CI("getrlimit64", getrlimit64, 2)),
721 720 /* 222 */ IF_LP64(
722 721 SYSENT_NOSYS(),
723 722 SYSENT_CI("pread64", pread64, 5)),
724 723 /* 223 */ IF_LP64(
725 724 SYSENT_NOSYS(),
726 725 SYSENT_CI("pwrite64", pwrite64, 5)),
727 726 /* 224 */ SYSENT_LOADABLE(), /* (was creat64) */
728 727 /* 225 */ IF_LP64(
729 728 SYSENT_NOSYS(),
730 729 SYSENT_CI("open64", open64, 3)),
731 730 /* 226 */ SYSENT_LOADABLE(), /* rpcsys */
732 731 /* 227 */ SYSENT_CL("zone", zone, 5),
733 732 /* 228 */ SYSENT_LOADABLE(), /* autofssys */
734 733 /* 229 */ SYSENT_CI("getcwd", getcwd, 2),
735 734 /* 230 */ SYSENT_CI("so_socket", so_socket, 5),
736 735 /* 231 */ SYSENT_CI("so_socketpair", so_socketpair, 1),
737 736 /* 232 */ SYSENT_CI("bind", bind, 4),
738 737 /* 233 */ SYSENT_CI("listen", listen, 3),
739 738 /* 234 */ SYSENT_CI("accept", accept, 5),
740 739 /* 235 */ SYSENT_CI("connect", connect, 4),
741 740 /* 236 */ SYSENT_CI("shutdown", shutdown, 3),
742 741 /* 237 */ SYSENT_CL("recv", recv, 4),
743 742 /* 238 */ SYSENT_CL("recvfrom", recvfrom, 6),
744 743 /* 239 */ SYSENT_CL("recvmsg", recvmsg, 3),
745 744 /* 240 */ SYSENT_CL("send", send, 4),
746 745 /* 241 */ SYSENT_CL("sendmsg", sendmsg, 3),
747 746 /* 242 */ SYSENT_CL("sendto", sendto, 6),
748 747 /* 243 */ SYSENT_CI("getpeername", getpeername, 4),
749 748 /* 244 */ SYSENT_CI("getsockname", getsockname, 4),
750 749 /* 245 */ SYSENT_CI("getsockopt", getsockopt, 6),
751 750 /* 246 */ SYSENT_CI("setsockopt", setsockopt, 6),
752 751 /* 247 */ SYSENT_CI("sockconfig", sockconfig, 5),
753 752 /* 248 */ SYSENT_CI("ntp_gettime", ntp_gettime, 1),
754 753 /* 249 */ SYSENT_CI("ntp_adjtime", ntp_adjtime, 1),
755 754 /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock, 1),
756 755 /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock, 2),
757 756 /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register, 2),
758 757 /* 253 */ SYSENT_CI("cladm", cladm, 3),
759 758 /* 254 */ SYSENT_CI("uucopy", uucopy, 3),
760 759 /* 255 */ SYSENT_CI("umount2", umount2, 2)
761 760 };
762 761
763 762
764 763 #ifdef _SYSCALL32_IMPL
765 764
766 765 extern int ulimit32(int, int);
767 766 extern ssize_t read32(int32_t, caddr32_t, size32_t);
768 767 extern ssize_t write32(int32_t, caddr32_t, size32_t);
769 768 extern ssize_t pread32(int32_t, caddr32_t, size32_t, off32_t);
770 769 extern ssize_t pwrite32(int32_t, caddr32_t, size32_t, off32_t);
771 770 extern ssize_t readv32(int32_t, caddr32_t, int32_t);
772 771 extern ssize_t writev32(int32_t, caddr32_t, int32_t);
773 772 extern ssize_t readlink32(caddr32_t, caddr32_t, size32_t);
774 773 extern ssize_t readlinkat32(int, caddr32_t, caddr32_t, size32_t);
775 774 extern int open32(char *, int, int);
776 775 extern int openat32(int, char *, int, int);
777 776 extern int stat32(char *, struct stat32 *);
778 777 extern int fstatat32(int, char *, struct stat32 *, int);
779 778 extern int lstat32(char *, struct stat32 *);
780 779 extern int fstat32(int, struct stat32 *);
781 780 extern int fstatat64_32(int, char *, struct stat64_32 *, int);
782 781 extern int stat64_32(char *, struct stat64_32 *);
783 782 extern int lstat64_32(char *, struct stat64_32 *);
784 783 extern int fstat64_32(int, struct stat64_32 *);
785 784 extern int getmsg32(int, struct strbuf32 *, struct strbuf32 *, int32_t *);
786 785 extern int putmsg32(int, struct strbuf32 *, struct strbuf32 *, int32_t *);
787 786 extern int getpmsg32(int, struct strbuf32 *, struct strbuf32 *, int32_t *,
788 787 int32_t *);
789 788 extern int putpmsg32(int, struct strbuf32 *, struct strbuf32 *, int32_t,
790 789 int32_t);
791 790 extern int getsetcontext32(int, void *);
792 791 extern int statvfs32(char *, struct statvfs32 *);
793 792 extern int fstatvfs32(int, struct statvfs32 *);
794 793 extern int statvfs64_32(char *, struct statvfs64_32 *);
795 794 extern int fstatvfs64_32(int, struct statvfs64_32 *);
796 795 extern int sigaction32(int, struct sigaction32 *, struct sigaction32 *);
797 796 extern clock32_t times32(struct tms32 *);
798 797 extern int stime32(time32_t);
799 798 extern int getpagesizes32(int, size32_t *, int);
800 799 extern int sigaltstack32(struct sigaltstack32 *, struct sigaltstack32 *);
801 800 extern int sigqueue32(pid_t, int, caddr32_t, int, int);
802 801 extern offset_t llseek32(int32_t, uint32_t, uint32_t, int);
803 802 extern int waitsys32(idtype_t, id_t, siginfo_t *, int);
804 803
805 804 extern ssize_t recv32(int32_t, caddr32_t, size32_t, int32_t);
806 805 extern ssize_t recvfrom32(int32_t, caddr32_t, size32_t, int32_t, caddr32_t,
807 806 caddr32_t);
808 807 extern ssize_t send32(int32_t, caddr32_t, size32_t, int32_t);
809 808 extern ssize_t sendto32(int32_t, caddr32_t, size32_t, int32_t, caddr32_t,
810 809 socklen_t);
811 810
812 811 extern int privsys32(int, priv_op_t, priv_ptype_t, caddr32_t, size32_t, int);
813 812 extern int ucredsys32(int, int, caddr32_t);
814 813
815 814 /*
816 815 * sysent table for ILP32 processes running on
817 816 * a LP64 kernel.
818 817 */
819 818 struct sysent sysent32[NSYSCALL] =
820 819 {
821 820 /* 0 */ SYSENT_C("indir", indir, 1),
822 821 /* 1 */ SYSENT_CI("exit", (int (*)())rexit, 1),
823 822 /* 2 */ SYSENT_LOADABLE32(), /* (was forkall) */
824 823 /* 3 */ SYSENT_CI("read", read32, 3),
825 824 /* 4 */ SYSENT_CI("write", write32, 3),
826 825 /* 5 */ SYSENT_CI("open", open32, 3),
827 826 /* 6 */ SYSENT_CI("close", close, 1),
828 827 /* 7 */ SYSENT_CI("linkat", linkat, 5),
829 828 /* 8 */ SYSENT_LOADABLE32(), /* (was creat32) */
830 829 /* 9 */ SYSENT_CI("link", link, 2),
831 830 /* 10 */ SYSENT_CI("unlink", unlink, 1),
832 831 /* 11 */ SYSENT_CI("symlinkat", symlinkat, 3),
833 832 /* 12 */ SYSENT_CI("chdir", chdir, 1),
834 833 /* 13 */ SYSENT_CI("time", gtime, 0),
835 834 /* 14 */ SYSENT_CI("mknod", mknod, 3),
836 835 /* 15 */ SYSENT_CI("chmod", chmod, 2),
837 836 /* 16 */ SYSENT_CI("chown", chown, 3),
838 837 /* 17 */ SYSENT_CI("brk", brk, 1),
839 838 /* 18 */ SYSENT_CI("stat", stat32, 2),
840 839 /* 19 */ SYSENT_CI("lseek", lseek32, 3),
841 840 /* 20 */ SYSENT_2CI("getpid", getpid, 0),
842 841 /* 21 */ SYSENT_AP("mount", mount, 8),
843 842 /* 22 */ SYSENT_CI("readlinkat", readlinkat32, 4),
844 843 /* 23 */ SYSENT_CI("setuid", setuid, 1),
845 844 /* 24 */ SYSENT_2CI("getuid", getuid, 0),
846 845 /* 25 */ SYSENT_CI("stime", stime32, 1),
847 846 /* 26 */ SYSENT_CI("pcsample", pcsample, 2),
848 847 /* 27 */ SYSENT_CI("alarm", alarm, 1),
849 848 /* 28 */ SYSENT_CI("fstat", fstat32, 2),
850 849 /* 29 */ SYSENT_CI("pause", pause, 0),
851 850 /* 30 */ SYSENT_LOADABLE32(), /* (was utime) */
852 851 /* 31 */ SYSENT_CI("stty", stty, 2),
853 852 /* 32 */ SYSENT_CI("gtty", gtty, 2),
854 853 /* 33 */ SYSENT_CI("access", access, 2),
855 854 /* 34 */ SYSENT_CI("nice", nice, 1),
856 855 /* 35 */ SYSENT_CI("statfs", statfs32, 4),
857 856 /* 36 */ SYSENT_CI("sync", syssync, 0),
858 857 /* 37 */ SYSENT_CI("kill", kill, 2),
859 858 /* 38 */ SYSENT_CI("fstatfs", fstatfs32, 4),
860 859 /* 39 */ SYSENT_CI("setpgrp", setpgrp, 3),
861 860 /* 40 */ SYSENT_CI("uucopystr", uucopystr, 3),
862 861 /* 41 */ SYSENT_LOADABLE32(), /* (was dup) */
863 862 /* 42 */ SYSENT_LOADABLE32(), /* pipe */
864 863 /* 43 */ SYSENT_CI("times", times32, 1),
865 864 /* 44 */ SYSENT_CI("prof", profil, 4),
866 865 /* 45 */ SYSENT_CI("faccessat", faccessat, 4),
867 866 /* 46 */ SYSENT_CI("setgid", setgid, 1),
868 867 /* 47 */ SYSENT_2CI("getgid", getgid, 0),
869 868 /* 48 */ SYSENT_CI("mknodat", mknodat, 4),
870 869 /* 49 */ SYSENT_LOADABLE32(), /* msgsys */
871 870 /* 50 */ IF_386_ABI(
872 871 SYSENT_CI("sysi86", sysi86, 4),
873 872 SYSENT_LOADABLE32()), /* (was sys3b) */
874 873 /* 51 */ SYSENT_LOADABLE32(), /* sysacct */
875 874 /* 52 */ SYSENT_LOADABLE32(), /* shmsys */
876 875 /* 53 */ SYSENT_LOADABLE32(), /* semsys */
877 876 /* 54 */ SYSENT_CI("ioctl", ioctl, 3),
878 877 /* 55 */ SYSENT_CI("uadmin", uadmin, 3),
879 878 /* 56 */ SYSENT_CI("fchownat", fchownat, 5),
880 879 /* 57 */ SYSENT_2CI("utssys", utssys32, 4),
881 880 /* 58 */ SYSENT_CI("fdsync", fdsync, 2),
882 881 /* 59 */ SYSENT_CI("exece", exece, 3),
883 882 /* 60 */ SYSENT_CI("umask", umask, 1),
884 883 /* 61 */ SYSENT_CI("chroot", chroot, 1),
885 884 /* 62 */ SYSENT_CI("fcntl", fcntl, 3),
886 885 /* 63 */ SYSENT_CI("ulimit", ulimit32, 2),
887 886 /* 64 */ SYSENT_CI("renameat", renameat, 4),
888 887 /* 65 */ SYSENT_CI("unlinkat", unlinkat, 3),
889 888 /* 66 */ SYSENT_CI("fstatat", fstatat32, 4),
890 889 /* 67 */ SYSENT_CI("fstatat64", fstatat64_32, 4),
891 890 /* 68 */ SYSENT_CI("openat", openat32, 4),
892 891 /* 69 */ SYSENT_CI("openat64", openat64, 4),
893 892 /* 70 */ SYSENT_CI("tasksys", tasksys, 5),
894 893 /* 71 */ SYSENT_LOADABLE32(), /* acctctl */
895 894 /* 72 */ SYSENT_LOADABLE32(), /* exacct */
896 895 /* 73 */ SYSENT_CI("getpagesizes", getpagesizes32, 3),
897 896 /* 74 */ SYSENT_CI("rctlsys", rctlsys, 6),
898 897 /* 75 */ SYSENT_2CI("sidsys", sidsys, 4),
899 898 /* 76 */ SYSENT_LOADABLE32(), /* (was fsat) */
900 899 /* 77 */ SYSENT_CI("lwp_park", syslwp_park, 3),
901 900 /* 78 */ SYSENT_CI("sendfilev", sendfilev, 5),
902 901 /* 79 */ SYSENT_CI("rmdir", rmdir, 1),
903 902 /* 80 */ SYSENT_CI("mkdir", mkdir, 2),
904 903 /* 81 */ SYSENT_CI("getdents", getdents32, 3),
905 904 /* 82 */ SYSENT_CI("privsys", privsys32, 6),
906 905 /* 83 */ SYSENT_CI("ucredsys", ucredsys32, 3),
907 906 /* 84 */ SYSENT_CI("sysfs", sysfs, 3),
908 907 /* 85 */ SYSENT_CI("getmsg", getmsg32, 4),
909 908 /* 86 */ SYSENT_CI("putmsg", putmsg32, 4),
910 909 /* 87 */ SYSENT_LOADABLE32(), /* (was poll) */
911 910 /* 88 */ SYSENT_CI("lstat", lstat32, 2),
912 911 /* 89 */ SYSENT_CI("symlink", symlink, 2),
913 912 /* 90 */ SYSENT_CI("readlink", readlink32, 3),
914 913 /* 91 */ SYSENT_CI("setgroups", setgroups, 2),
915 914 /* 92 */ SYSENT_CI("getgroups", getgroups, 2),
916 915 /* 93 */ SYSENT_CI("fchmod", fchmod, 2),
917 916 /* 94 */ SYSENT_CI("fchown", fchown, 3),
918 917 /* 95 */ SYSENT_CI("sigprocmask", sigprocmask, 3),
919 918 /* 96 */ SYSENT_CI("sigsuspend", sigsuspend, 1),
920 919 /* 97 */ SYSENT_CI("sigaltstack", sigaltstack32, 2),
921 920 /* 98 */ SYSENT_CI("sigaction", sigaction32, 3),
922 921 /* 99 */ SYSENT_CI("sigpending", sigpending, 2),
923 922 /* 100 */ SYSENT_CI("getsetcontext", getsetcontext32, 2),
924 923 /* 101 */ SYSENT_CI("fchmodat", fchmodat, 4),
925 924 /* 102 */ SYSENT_CI("mkdirat", mkdirat, 3),
926 925 /* 103 */ SYSENT_CI("statvfs", statvfs32, 2),
927 926 /* 104 */ SYSENT_CI("fstatvfs", fstatvfs32, 2),
928 927 /* 105 */ SYSENT_CI("getloadavg", getloadavg, 2),
929 928 /* 106 */ SYSENT_LOADABLE32(), /* nfssys */
930 929 /* 107 */ SYSENT_CI("waitsys", waitsys32, 4),
931 930 /* 108 */ SYSENT_CI("sigsendset", sigsendsys, 2),
932 931 /* 109 */ IF_x86(
933 932 SYSENT_AP("hrtsys", hrtsys, 5),
934 933 SYSENT_LOADABLE32()),
935 934 /* 110 */ SYSENT_CI("utimesys", utimesys, 5),
936 935 /* 111 */ SYSENT_CI("sigresend", sigresend, 3),
937 936 /* 112 */ SYSENT_CI("priocntlsys", priocntlsys, 5),
938 937 /* 113 */ SYSENT_CI("pathconf", pathconf, 2),
939 938 /* 114 */ SYSENT_CI("mincore", mincore, 3),
940 939 /* 115 */ SYSENT_CI("mmap", smmap32, 6),
941 940 /* 116 */ SYSENT_CI("mprotect", mprotect, 3),
942 941 /* 117 */ SYSENT_CI("munmap", munmap, 2),
943 942 /* 118 */ SYSENT_CI("fpathconf", fpathconf, 2),
944 943 /* 119 */ SYSENT_2CI("vfork", vfork, 0),
945 944 /* 120 */ SYSENT_CI("fchdir", fchdir, 1),
946 945 /* 121 */ SYSENT_CI("readv", readv32, 3),
947 946 /* 122 */ SYSENT_CI("writev", writev32, 3),
948 947 /* 123 */ SYSENT_CI("preadv", preadv, 5),
949 948 /* 124 */ SYSENT_CI("pwritev", pwritev, 5),
950 949 /* 125 */ SYSENT_LOADABLE32(), /* was fxstat32 */
951 950 /* 126 */ SYSENT_CI("getrandom", getrandom, 3),
952 951 /* 127 */ SYSENT_CI("mmapobj", mmapobjsys, 5),
953 952 /* 128 */ SYSENT_CI("setrlimit", setrlimit32, 2),
954 953 /* 129 */ SYSENT_CI("getrlimit", getrlimit32, 2),
955 954 /* 130 */ SYSENT_CI("lchown", lchown, 3),
956 955 /* 131 */ SYSENT_CI("memcntl", memcntl, 6),
957 956 /* 132 */ SYSENT_CI("getpmsg", getpmsg32, 5),
958 957 /* 133 */ SYSENT_CI("putpmsg", putpmsg32, 5),
959 958 /* 134 */ SYSENT_CI("rename", rename, 2),
960 959 /* 135 */ SYSENT_CI("uname", uname, 1),
961 960 /* 136 */ SYSENT_CI("setegid", setegid, 1),
962 961 /* 137 */ SYSENT_CI("sysconfig", sysconfig, 1),
963 962 /* 138 */ SYSENT_CI("adjtime", adjtime, 2),
964 963 /* 139 */ SYSENT_CI("systeminfo", systeminfo, 3),
965 964 /* 140 */ SYSENT_LOADABLE32(), /* sharefs */
966 965 /* 141 */ SYSENT_CI("seteuid", seteuid, 1),
967 966 /* 142 */ SYSENT_2CI("forksys", forksys, 2),
968 967 /* 143 */ SYSENT_LOADABLE32(), /* (was fork1) */
969 968 /* 144 */ SYSENT_CI("sigtimedwait", sigtimedwait, 3),
970 969 /* 145 */ SYSENT_CI("lwp_info", lwp_info, 1),
971 970 /* 146 */ SYSENT_CI("yield", yield, 0),
972 971 /* 147 */ SYSENT_LOADABLE32(), /* (was lwp_sema_wait) */
973 972 /* 148 */ SYSENT_CI("lwp_sema_post", lwp_sema_post, 1),
974 973 /* 149 */ SYSENT_CI("lwp_sema_trywait", lwp_sema_trywait, 1),
975 974 /* 150 */ SYSENT_CI("lwp_detach", lwp_detach, 1),
976 975 /* 151 */ SYSENT_CI("corectl", corectl, 4),
977 976 /* 152 */ SYSENT_CI("modctl", modctl, 6),
978 977 /* 153 */ SYSENT_CI("fchroot", fchroot, 1),
979 978 /* 154 */ SYSENT_LOADABLE32(), /* (was utimes) */
980 979 /* 155 */ SYSENT_CI("vhangup", vhangup, 0),
981 980 /* 156 */ SYSENT_CI("gettimeofday", gettimeofday, 1),
982 981 /* 157 */ SYSENT_CI("getitimer", getitimer, 2),
983 982 /* 158 */ SYSENT_CI("setitimer", setitimer, 3),
984 983 /* 159 */ SYSENT_CI("lwp_create", syslwp_create, 3),
985 984 /* 160 */ SYSENT_CI("lwp_exit", (int (*)())syslwp_exit, 0),
986 985 /* 161 */ SYSENT_CI("lwp_suspend", syslwp_suspend, 1),
987 986 /* 162 */ SYSENT_CI("lwp_continue", syslwp_continue, 1),
988 987 /* 163 */ SYSENT_CI("lwp_kill", lwp_kill, 2),
989 988 /* 164 */ SYSENT_CI("lwp_self", lwp_self, 0),
990 989 /* 165 */ SYSENT_2CI("lwp_sigmask", lwp_sigmask, 5),
991 990 /* 166 */ IF_x86(
992 991 SYSENT_CI("lwp_private", syslwp_private, 3),
993 992 SYSENT_NOSYS()),
|
↓ open down ↓ |
334 lines elided |
↑ open up ↑ |
994 993 /* 167 */ SYSENT_CI("lwp_wait", lwp_wait, 2),
995 994 /* 168 */ SYSENT_CI("lwp_mutex_wakeup", lwp_mutex_wakeup, 2),
996 995 /* 169 */ SYSENT_LOADABLE32(), /* (was lwp_mutex_lock) */
997 996 /* 170 */ SYSENT_CI("lwp_cond_wait", lwp_cond_wait, 4),
998 997 /* 171 */ SYSENT_CI("lwp_cond_signal", lwp_cond_signal, 1),
999 998 /* 172 */ SYSENT_CI("lwp_cond_broadcast", lwp_cond_broadcast, 1),
1000 999 /* 173 */ SYSENT_CI("pread", pread32, 4),
1001 1000 /* 174 */ SYSENT_CI("pwrite", pwrite32, 4),
1002 1001 /* 175 */ SYSENT_C("llseek", llseek32, 4),
1003 1002 /* 176 */ SYSENT_LOADABLE32(), /* inst_sync */
1004 - /* 177 */ SYSENT_CI("brandsys", brandsys, 6),
1003 + /* 177 */ SYSENT_CI("brandsys", brandsys, 5),
1005 1004 /* 178 */ SYSENT_LOADABLE32(), /* kaio */
1006 1005 /* 179 */ SYSENT_LOADABLE32(), /* cpc */
1007 1006 /* 180 */ SYSENT_CI("lgrpsys", lgrpsys, 3),
1008 1007 /* 181 */ SYSENT_CI("rusagesys", rusagesys, 5),
1009 1008 /* 182 */ SYSENT_LOADABLE32(), /* portfs */
1010 1009 /* 183 */ SYSENT_CI("pollsys", pollsys, 4),
1011 1010 /* 184 */ SYSENT_CI("labelsys", labelsys, 5),
1012 1011 /* 185 */ SYSENT_CI("acl", acl, 4),
1013 1012 /* 186 */ SYSENT_AP("auditsys", auditsys, 6),
1014 1013 /* 187 */ SYSENT_CI("processor_bind", processor_bind, 4),
1015 1014 /* 188 */ SYSENT_CI("processor_info", processor_info, 2),
1016 1015 /* 189 */ SYSENT_CI("p_online", p_online, 2),
1017 1016 /* 190 */ SYSENT_CI("sigqueue", sigqueue32, 5),
1018 1017 /* 191 */ SYSENT_CI("clock_gettime", clock_gettime, 2),
1019 1018 /* 192 */ SYSENT_CI("clock_settime", clock_settime, 2),
1020 1019 /* 193 */ SYSENT_CI("clock_getres", clock_getres, 2),
1021 1020 /* 194 */ SYSENT_CI("timer_create", timer_create, 3),
1022 1021 /* 195 */ SYSENT_CI("timer_delete", timer_delete, 1),
1023 1022 /* 196 */ SYSENT_CI("timer_settime", timer_settime, 4),
1024 1023 /* 197 */ SYSENT_CI("timer_gettime", timer_gettime, 2),
1025 1024 /* 198 */ SYSENT_CI("timer_getoverrun", timer_getoverrun, 1),
1026 1025 /* 199 */ SYSENT_CI("nanosleep", nanosleep, 2),
1027 1026 /* 200 */ SYSENT_CI("facl", facl, 4),
1028 1027 /* 201 */ SYSENT_LOADABLE32(), /* door */
1029 1028 /* 202 */ SYSENT_CI("setreuid", setreuid, 2),
1030 1029 /* 203 */ SYSENT_CI("setregid", setregid, 2),
1031 1030 /* 204 */ SYSENT_CI("install_utrap", install_utrap, 3),
1032 1031 /* 205 */ SYSENT_CI("signotify", signotify, 3),
1033 1032 /* 206 */ SYSENT_CI("schedctl", schedctl, 0),
1034 1033 /* 207 */ SYSENT_LOADABLE32(), /* pset */
1035 1034 /* 208 */ SYSENT_LOADABLE32(),
1036 1035 /* 209 */ SYSENT_CI("resolvepath", resolvepath, 3),
1037 1036 /* 210 */ SYSENT_CI("lwp_mutex_timedlock", lwp_mutex_timedlock, 3),
1038 1037 /* 211 */ SYSENT_CI("lwp_sema_timedwait", lwp_sema_timedwait, 3),
1039 1038 /* 212 */ SYSENT_CI("lwp_rwlock_sys", lwp_rwlock_sys, 3),
1040 1039 /*
1041 1040 * Syscalls 213-225: 32-bit system call support for large files.
1042 1041 */
1043 1042 /* 213 */ SYSENT_CI("getdents64", getdents64, 3),
1044 1043 /* 214 */ SYSENT_AP("smmaplf32", smmaplf32, 7),
1045 1044 /* 215 */ SYSENT_CI("stat64", stat64_32, 2),
1046 1045 /* 216 */ SYSENT_CI("lstat64", lstat64_32, 2),
1047 1046 /* 217 */ SYSENT_CI("fstat64", fstat64_32, 2),
1048 1047 /* 218 */ SYSENT_CI("statvfs64", statvfs64_32, 2),
1049 1048 /* 219 */ SYSENT_CI("fstatvfs64", fstatvfs64_32, 2),
1050 1049 /* 220 */ SYSENT_CI("setrlimit64", setrlimit64, 2),
1051 1050 /* 221 */ SYSENT_CI("getrlimit64", getrlimit64, 2),
1052 1051 /* 222 */ SYSENT_CI("pread64", pread64, 5),
1053 1052 /* 223 */ SYSENT_CI("pwrite64", pwrite64, 5),
1054 1053 /* 224 */ SYSENT_LOADABLE32(), /* (was creat64) */
1055 1054 /* 225 */ SYSENT_CI("open64", open64, 3),
1056 1055 /* 226 */ SYSENT_LOADABLE32(), /* rpcsys */
1057 1056 /* 227 */ SYSENT_CI("zone", zone, 6),
1058 1057 /* 228 */ SYSENT_LOADABLE32(), /* autofssys */
1059 1058 /* 229 */ SYSENT_CI("getcwd", getcwd, 2),
1060 1059 /* 230 */ SYSENT_CI("so_socket", so_socket, 5),
1061 1060 /* 231 */ SYSENT_CI("so_socketpair", so_socketpair, 1),
1062 1061 /* 232 */ SYSENT_CI("bind", bind, 4),
1063 1062 /* 233 */ SYSENT_CI("listen", listen, 3),
1064 1063 /* 234 */ SYSENT_CI("accept", accept, 5),
1065 1064 /* 235 */ SYSENT_CI("connect", connect, 4),
1066 1065 /* 236 */ SYSENT_CI("shutdown", shutdown, 3),
1067 1066 /* 237 */ SYSENT_CI("recv", recv32, 4),
1068 1067 /* 238 */ SYSENT_CI("recvfrom", recvfrom32, 6),
1069 1068 /* 239 */ SYSENT_CI("recvmsg", recvmsg, 3),
1070 1069 /* 240 */ SYSENT_CI("send", send32, 4),
1071 1070 /* 241 */ SYSENT_CI("sendmsg", sendmsg, 3),
1072 1071 /* 242 */ SYSENT_CI("sendto", sendto32, 6),
1073 1072 /* 243 */ SYSENT_CI("getpeername", getpeername, 4),
1074 1073 /* 244 */ SYSENT_CI("getsockname", getsockname, 4),
1075 1074 /* 245 */ SYSENT_CI("getsockopt", getsockopt, 6),
1076 1075 /* 246 */ SYSENT_CI("setsockopt", setsockopt, 6),
1077 1076 /* 247 */ SYSENT_CI("sockconfig", sockconfig, 5),
1078 1077 /* 248 */ SYSENT_CI("ntp_gettime", ntp_gettime, 1),
1079 1078 /* 249 */ SYSENT_CI("ntp_adjtime", ntp_adjtime, 1),
1080 1079 /* 250 */ SYSENT_CI("lwp_mutex_unlock", lwp_mutex_unlock, 1),
1081 1080 /* 251 */ SYSENT_CI("lwp_mutex_trylock", lwp_mutex_trylock, 2),
1082 1081 /* 252 */ SYSENT_CI("lwp_mutex_register", lwp_mutex_register, 2),
1083 1082 /* 253 */ SYSENT_CI("cladm", cladm, 3),
1084 1083 /* 254 */ SYSENT_CI("uucopy", uucopy, 3),
1085 1084 /* 255 */ SYSENT_CI("umount2", umount2, 2)
|
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
1086 1085 };
1087 1086 #endif /* _SYSCALL32_IMPL */
1088 1087
1089 1088 /*
1090 1089 * Space allocated and initialized in init_syscallnames().
1091 1090 */
1092 1091 char **syscallnames;
1093 1092
1094 1093 systrace_sysent_t *systrace_sysent;
1095 1094 void (*systrace_probe)(dtrace_id_t, uintptr_t, uintptr_t,
1096 - uintptr_t, uintptr_t, uintptr_t, uintptr_t);
1095 + uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t);
1097 1096
1098 1097 /*ARGSUSED*/
1099 1098 void
1100 1099 systrace_stub(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
1101 - uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
1100 + uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5,
1101 + uintptr_t arg6, uintptr_t arg7)
1102 1102 {}
1103 1103
1104 1104 /*ARGSUSED*/
1105 1105 int64_t
1106 1106 dtrace_systrace_syscall(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
1107 - uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
1107 + uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6,
1108 + uintptr_t arg7)
1108 1109 {
1109 1110 systrace_sysent_t *sy = &systrace_sysent[curthread->t_sysnum];
1110 1111 dtrace_id_t id;
1111 1112 int64_t rval;
1112 1113 proc_t *p;
1113 1114
1114 1115 if ((id = sy->stsy_entry) != DTRACE_IDNONE)
1115 - (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5);
1116 + (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5,
1117 + arg6, arg7);
1116 1118
1117 1119 /*
1118 1120 * We want to explicitly allow DTrace consumers to stop a process
1119 1121 * before it actually executes the meat of the syscall.
1120 1122 */
1121 1123 p = ttoproc(curthread);
1122 1124 mutex_enter(&p->p_lock);
1123 1125 if (curthread->t_dtrace_stop && !curthread->t_lwp->lwp_nostop) {
1124 1126 curthread->t_dtrace_stop = 0;
1125 1127 stop(PR_REQUESTED, 0);
1126 1128 }
1127 1129 mutex_exit(&p->p_lock);
1128 1130
1129 - rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5);
1131 + rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5,
1132 + arg6, arg7);
1130 1133
1131 1134 if (ttolwp(curthread)->lwp_errno != 0)
1132 1135 rval = -1;
1133 1136
1134 1137 if ((id = sy->stsy_return) != DTRACE_IDNONE)
1135 1138 (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval,
1136 - (uintptr_t)((int64_t)rval >> 32), 0, 0, 0);
1139 + (uintptr_t)((int64_t)rval >> 32), 0, 0, 0, 0, 0);
1137 1140
1138 1141 return (rval);
1139 1142 }
1140 1143
1141 1144 #ifdef _SYSCALL32_IMPL
1142 1145
1143 1146 systrace_sysent_t *systrace_sysent32;
1144 1147
1145 1148 /*ARGSUSED*/
1146 1149 int64_t
1147 1150 dtrace_systrace_syscall32(uintptr_t arg0, uintptr_t arg1, uintptr_t arg2,
1148 - uintptr_t arg3, uintptr_t arg4, uintptr_t arg5)
1151 + uintptr_t arg3, uintptr_t arg4, uintptr_t arg5, uintptr_t arg6,
1152 + uintptr_t arg7)
1149 1153 {
1150 1154 systrace_sysent_t *sy = &systrace_sysent32[curthread->t_sysnum];
1151 1155 dtrace_id_t id;
1152 1156 int64_t rval;
1153 1157 proc_t *p;
1154 1158
1155 1159 if ((id = sy->stsy_entry) != DTRACE_IDNONE)
1156 - (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5);
1160 + (*systrace_probe)(id, arg0, arg1, arg2, arg3, arg4, arg5, arg6,
1161 + arg7);
1157 1162
1158 1163 /*
1159 1164 * We want to explicitly allow DTrace consumers to stop a process
1160 1165 * before it actually executes the meat of the syscall.
1161 1166 */
1162 1167 p = ttoproc(curthread);
1163 1168 mutex_enter(&p->p_lock);
1164 1169 if (curthread->t_dtrace_stop && !curthread->t_lwp->lwp_nostop) {
1165 1170 curthread->t_dtrace_stop = 0;
1166 1171 stop(PR_REQUESTED, 0);
1167 1172 }
1168 1173 mutex_exit(&p->p_lock);
1169 1174
1170 - rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5);
1175 + rval = (*sy->stsy_underlying)(arg0, arg1, arg2, arg3, arg4, arg5, arg6,
1176 + arg7);
1171 1177
1172 1178 if (ttolwp(curthread)->lwp_errno != 0)
1173 1179 rval = -1;
1174 1180
1175 1181 if ((id = sy->stsy_return) != DTRACE_IDNONE)
1176 1182 (*systrace_probe)(id, (uintptr_t)rval, (uintptr_t)rval,
1177 - (uintptr_t)((uint64_t)rval >> 32), 0, 0, 0);
1183 + (uintptr_t)((uint64_t)rval >> 32), 0, 0, 0, 0, 0);
1178 1184
1179 1185 return (rval);
1180 1186 }
1181 1187
1182 1188 #endif
1183 1189
1184 1190 void
1185 1191 dtrace_systrace_rtt(void)
1186 1192 {
1187 1193 systrace_sysent_t *sy;
1188 1194 dtrace_id_t id;
1189 1195
1190 1196 if (get_udatamodel() == DATAMODEL_NATIVE) {
1191 1197 if (systrace_sysent == NULL)
1192 1198 return;
1193 1199
1194 1200 sy = &systrace_sysent[curthread->t_sysnum];
|
↓ open down ↓ |
7 lines elided |
↑ open up ↑ |
1195 1201 #ifdef _SYSCALL32_IMPL
1196 1202 } else {
1197 1203 if (systrace_sysent32 == NULL)
1198 1204 return;
1199 1205
1200 1206 sy = &systrace_sysent32[curthread->t_sysnum];
1201 1207 #endif
1202 1208 }
1203 1209
1204 1210 if ((id = sy->stsy_return) != DTRACE_IDNONE)
1205 - (*systrace_probe)(id, 0, 0, 0, 0, 0, 0);
1211 + (*systrace_probe)(id, 0, 0, 0, 0, 0, 0, 0, 0);
1206 1212 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX