| /freebsd/lib/libc/gen/ |
| H A D | dup3.c | 40 __dup3(int oldfd, int newfd, int flags) in __dup3() argument 44 if (oldfd == newfd) { in __dup3() 57 return (_fcntl(oldfd, F_DUP3FD | (fdflags << F_DUP3FD_SHIFT), newfd)); in __dup3()
|
| /freebsd/usr.bin/bsdiff/bspatch/ |
| H A D | bspatch.c | 107 int newfd, oldfd; in main() 135 if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0) in main() 163 cap_rights_limit(oldfd, &rights_ro) < 0 || in main() 223 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 || in main() 227 old = mmap(NULL, oldsize+1, PROT_READ, MAP_SHARED, oldfd, 0); in main() 228 if (old == MAP_FAILED || close(oldfd) != 0) in main() 106 int newfd, oldfd; main() local
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_solaris.cpp | 137 DECLARE__REAL_AND_INTERNAL(uptr, dup, int oldfd) { in DECLARE__REAL_AND_INTERNAL() argument 138 return _REAL(dup)(oldfd); in DECLARE__REAL_AND_INTERNAL() 141 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument 142 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
|
| H A D | sanitizer_netbsd.cpp | 182 uptr internal_dup(int oldfd) { in internal_dup() argument 184 return _REAL(dup, oldfd); in internal_dup() 187 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 189 return _REAL(dup2, oldfd, newfd); in internal_dup2()
|
| H A D | sanitizer_posix.h | 52 uptr internal_dup(int oldfd); 53 uptr internal_dup2(int oldfd, int newfd);
|
| H A D | sanitizer_mac.cpp | 200 uptr internal_dup(int oldfd) { in internal_dup() argument 201 return dup(oldfd); in internal_dup() 204 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 205 return dup2(oldfd, newfd); in internal_dup2()
|
| H A D | sanitizer_linux.cpp | 523 uptr internal_dup(int oldfd) { return internal_syscall(SYSCALL(dup), oldfd); } in internal_dup() argument 525 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument 527 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in internal_dup2() 529 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in internal_dup2()
|
| H A D | sanitizer_common_syscalls.inc | 1365 PRE_SYSCALL(dup2)(long oldfd, long newfd) {} 1367 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {} 1369 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {} 1371 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
|
| /freebsd/lib/libutil++/ |
| H A D | libutil++.hh | 83 int oldfd = fd; in release() local 86 return (oldfd); in release()
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_fd.cpp | 260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument 261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup() 262 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup() 265 FdDesc *od = fddesc(thr, pc, oldfd); in FdDup()
|
| H A D | tsan_interceptors_posix.cpp | 1718 TSAN_INTERCEPTOR(int, dup, int oldfd) { in TSAN_INTERCEPTOR() argument 1719 SCOPED_TSAN_INTERCEPTOR(dup, oldfd); in TSAN_INTERCEPTOR() 1720 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR() 1721 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR() 1722 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR() 1726 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) { in TSAN_INTERCEPTOR() argument 1727 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd); in TSAN_INTERCEPTOR() 1728 int newfd2 = REAL(dup2)(oldfd, newfd); in TSAN_INTERCEPTOR() 1729 if (oldfd >= 0 && newfd2 >= 0 && newfd2 != oldfd) in TSAN_INTERCEPTOR() 1730 FdDup(thr, pc, oldfd, newfd2, false); in TSAN_INTERCEPTOR() [all …]
|
| H A D | tsan_fd.h | 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
|
| /freebsd/contrib/atf/atf-c/detail/ |
| H A D | process.c | 311 safe_dup(const int oldfd, const int newfd) in safe_dup() argument 315 if (oldfd != newfd) { in safe_dup() 316 if (dup2(oldfd, newfd) == -1) { in safe_dup() 319 close(oldfd); in safe_dup()
|
| /freebsd/contrib/ofed/librdmacm/ |
| H A D | preload.c | 88 int (*dup2)(int oldfd, int newfd); 1104 int dup2(int oldfd, int newfd) in dup2() argument 1110 oldfdi = idm_lookup(&idm, oldfd); in dup2() 1113 fork_passive(oldfd); in dup2() 1115 fork_active(oldfd); in dup2() 1126 ret = real.dup2(oldfd, newfd); in dup2() 1146 newfdi->dupfd = oldfd; in dup2()
|
| /freebsd/tools/test/stress2/misc/ |
| H A D | syzkaller77.sh | 238 syscall(SYS_dup2, /*oldfd=*/r[2], /*newfd=*/r[1]); 253 syscall(SYS_dup2, /*oldfd=*/r[4], /*newfd=*/r[3]);
|
| H A D | syzkaller83.sh | 132 syscall(SYS_renameat, /*oldfd=*/r[0], /*old=*/0x200000000340ul,
|
| H A D | syzkaller78.sh | 233 syscall(SYS_dup2, /*oldfd=*/r[3], /*newfd=*/r[2]);
|
| /freebsd/contrib/llvm-project/compiler-rt/include/sanitizer/ |
| H A D | linux_syscall_hooks.h | 730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument 731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd)) 732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument 733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd)) 734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument 735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags)) 736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument 737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \ 2430 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd); 2431 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd); [all …]
|
| /freebsd/sys/kern/ |
| H A D | vfs_syscalls.c | 3728 int oldfd; member 3738 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new, in sys_renameat() 3744 kern_renameat_mac(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat_mac() argument 3750 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat_mac() 3768 kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, in kern_renameat() argument 3783 error = kern_renameat_mac(td, oldfd, old, newfd, new, pathseg, in kern_renameat() 3790 pathseg, old, oldfd, &cap_renameat_source_rights); in kern_renameat()
|
| /freebsd/sys/compat/linux/ |
| H A D | linux_file.c | 1728 if (args->oldfd == args->newfd) in linux_copy_file_range() 1738 return (kern_fcntl(td, args->oldfd, cmd, newfd)); in linux_copy_file_range()
|
| /freebsd/sys/sys/ |
| H A D | syscallsubr.h | 308 int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd,
|
| /freebsd/lib/libsys/ |
| H A D | _libsys.h | 791 int __sys_renameat(int oldfd, const char * old, int newfd, const char * new);
|
| /freebsd/sys/arm64/linux/ |
| H A D | linux_systrace_args.c | 189 iarg[a++] = p->oldfd; /* l_int */ in systrace_args()
|
| H A D | linux_proto.h | 131 char oldfd_l_[PADL_(l_int)]; l_int oldfd; char oldfd_r_[PADR_(l_int)]; member
|
| /freebsd/sys/amd64/linux/ |
| H A D | linux_systrace_args.c | 2252 iarg[a++] = p->oldfd; /* l_uint */ in systrace_args()
|