Home
last modified time | relevance | path

Searched refs:O_CLOEXEC (Results 1 – 25 of 185) sorted by relevance

12345678

/linux/tools/testing/selftests/landlock/
H A Dbase_test.c227 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
250 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
306 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
331 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
342 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
498 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
526 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
528 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
538 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
541 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
[all...]
H A Dscoped_signal_test.c96 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
193 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
194 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
282 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST()
307 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST()
359 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST()
494 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
495 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
618 ASSERT_EQ(0, pipe2(trigger, O_CLOEXEC)); in TEST()
619 ASSERT_EQ(0, pipe2(sync_child, O_CLOEXEC)); in TEST()
[all...]
H A Dtrace_fs_test.c165 fd = open("/usr", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
208 path_beneath.parent_fd = open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
272 path_beneath.parent_fd = open(path, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
445 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
473 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
494 fd = open("/usr", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
499 fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
676 open("/tmp", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
697 fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
H A Dtrace.h197 fd = open(path, O_WRONLY | O_TRUNC | O_CLOEXEC); in tracefs_write()
286 fd = open(TRACEFS_TRACE, O_RDONLY | O_CLOEXEC); in tracefs_read_trace()
544 open(rule_path, O_PATH | O_DIRECTORY | O_CLOEXEC); in sandbox_child_fs_access()
565 fd = open(access_path, O_RDONLY | O_DIRECTORY | O_CLOEXEC); in sandbox_child_fs_access()
608 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in sandbox_child_exec_true()
618 open(".", O_PATH | O_DIRECTORY | O_CLOEXEC); in sandbox_child_exec_true()
H A Dptrace_test.c60 fd = open(procenv_path, O_RDONLY | O_CLOEXEC); in test_ptrace_read()
172 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
173 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
363 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
364 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
731 ASSERT_EQ(0, pipe2(sync_pipe, O_CLOEXEC));
H A Dscoped_abstract_unix_test.c92 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
189 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
190 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
367 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
368 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
490 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
505 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
709 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
710 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
875 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
[all …]
H A Dtrace_test.c234 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
243 open("/tmp", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
324 open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
338 fd = open("/usr", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
505 path_beneath.parent_fd = open("/usr", O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F()
693 dir_fd = open(".", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
795 dir_fd = open(".", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
1018 dir_fd = open(".", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST_F()
/linux/tools/perf/util/
H A Dutil.h73 #ifndef O_CLOEXEC
75 #define O_CLOEXEC 0x400000
77 #define O_CLOEXEC 010000000
79 #define O_CLOEXEC 02000000
76 #define O_CLOEXEC global() macro
78 #define O_CLOEXEC global() macro
80 #define O_CLOEXEC global() macro
/linux/tools/testing/selftests/pid_namespace/
H A Dpid_max.c121 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_inner()
167 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_outer()
246 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_limit_inner()
322 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_limit_outer()
381 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY);
/linux/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c92 fd = open(device_path, O_RDONLY | O_CLOEXEC); in __do_binderfs_test()
115 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
162 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
258 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping()
283 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping()
425 fd = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
442 fds[i] = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
/linux/tools/testing/selftests/filesystems/
H A Dkernfs_test.c18 fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC); in TEST()
30 fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC); in TEST()
/linux/tools/testing/selftests/proc/
H A Dproc-pidns.c35 int fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC, 0644); in touch()
50 self->host_mntns = open("/proc/self/ns/mnt", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
71 self->host_pidns = open("/proc/self/ns/pid", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
91 self->dummy_pidns = open("/tmp/dummy/pidns", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
/linux/tools/testing/selftests/pidfd/
H A Dpidfd_test.c104 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_simple_success()
168 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_exited_fail()
272 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
301 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
408 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_syscall_support()
H A Dpidfd_setns_test.c82 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
106 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP()
119 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
269 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
282 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
295 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
365 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
H A Dpidfd_bind_mount.c77 pidfd = open(proc_path, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F()
103 fd_pidfd_mnt = openat(-EBADF, self->template, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F()
/linux/tools/include/uapi/asm-generic/
H A Dfcntl.h
/linux/samples/pidfd/
H A Dpidfd-metadata.c58 procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); in pidfd_metadata_fd()
105 statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC); in main()
/linux/tools/testing/selftests/dmabuf-heaps/
H A Ddmabuf-heap.c130 return dmabuf_heap_alloc_fdflags(fd, len, O_RDWR | O_CLOEXEC, flags, in dmabuf_heap_alloc()
297 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_older()
329 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_newer()
385 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd); in test_alloc_errors()
462 req->fd_flags = O_RDWR | O_CLOEXEC; in test_alloc_no_fd_leak_on_efault()
/linux/tools/testing/selftests/core/
H A Dclose_range_test.c47 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
120 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
209 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
637 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
649 fd = open(path, O_CREAT | O_RDONLY | O_CLOEXEC, 0600); in TEST()
656 fd = open(path, O_RDONLY | O_CLOEXEC); in TEST()
/linux/tools/testing/selftests/exec/
H A Dcheck-exec.c164 self->pipefd = open(procfd_path, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP()
186 fd_in = open(binary_path, O_CLOEXEC | O_RDONLY); in fill_exec_fd()
208 fd_out = open(path, O_CLOEXEC | O_WRONLY); in fill_exec_path()
250 int flags = O_CLOEXEC; in test_exec_path()
/linux/mm/
H A Dsecretmem.c325 BUILD_BUG_ON(SECRETMEM_FLAGS_MASK & O_CLOEXEC); in SYSCALL_DEFINE1()
330 if (flags & ~(SECRETMEM_FLAGS_MASK | O_CLOEXEC)) in SYSCALL_DEFINE1()
335 return FD_ADD(flags & O_CLOEXEC, secretmem_file_create(flags)); in SYSCALL_DEFINE1()
/linux/io_uring/
H A Dopenclose.c76 if (open->file_slot && (open->how.flags & O_CLOEXEC)) in __io_openat_prep()
298 ifi->o_flags = O_CLOEXEC; in io_install_fixed_fd_prep()
335 if (p->flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT | O_NOTIFICATION_PIPE)) in io_pipe_prep()
352 if (p->flags & O_CLOEXEC) in io_pipe_fixed()
/linux/include/uapi/linux/
H A Deventfd.h8 #define EFD_CLOEXEC O_CLOEXEC
/linux/tools/testing/selftests/mount_setattr/
H A Dmount_setattr_test.c166 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW); in write_file()
419 fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP()
626 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
675 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
705 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
981 fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC); in TEST_F()
1109 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST_F()
1138 attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC); in TEST_F()
1220 ret = open(path, O_RDONLY | O_CLOEXEC); in get_userns_fd()
1477 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F()
[all …]
/linux/tools/testing/selftests/drivers/ntsync/
H A Dntsync.c156 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
240 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
391 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
456 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
516 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
628 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
763 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
956 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
1079 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
1190 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONL in TEST()
[all...]

12345678