| /linux/tools/testing/selftests/landlock/ |
| A D | base_test.c | 183 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST() 206 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST() 278 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST() 306 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() 308 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 318 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 321 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 341 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 354 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() 368 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() [all …]
|
| A D | scoped_signal_test.c | 91 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 188 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 189 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 276 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST() 390 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 391 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
|
| A D | ptrace_test.c | 57 fd = open(procenv_path, O_RDONLY | O_CLOEXEC); in test_ptrace_read() 313 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 314 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
|
| A D | scoped_abstract_unix_test.c | 87 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 184 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 185 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 316 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 331 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 535 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 536 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 706 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 889 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST() 890 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST()
|
| A D | fs_test.c | 416 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel() 470 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK() 512 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK() 599 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK() 652 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK() 889 reg_fd = open(file1_s2d2, O_RDWR | O_CLOEXEC); in TEST_F_FORK() 898 reg_fd = open(file1_s2d2, O_RDONLY | O_CLOEXEC); in TEST_F_FORK() 3427 ASSERT_EQ(0, pipe2(pipe_fds, O_CLOEXEC)); in TEST_F_FORK() 3965 fd = open(dir_s1d1, O_PATH | O_CLOEXEC); in TEST_F_FORK() 3984 fd = open(dir_s1d1, O_PATH | O_CLOEXEC); in TEST_F_FORK() [all …]
|
| /linux/tools/perf/util/ |
| A D | util.h | 74 #ifndef O_CLOEXEC 76 #define O_CLOEXEC 0x400000 macro 78 #define O_CLOEXEC 010000000 macro 80 #define O_CLOEXEC 02000000 macro
|
| /linux/tools/testing/selftests/filesystems/binderfs/ |
| A D | binderfs_test.c | 92 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/pidfd/ |
| A D | pidfd_test.c | 69 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_simple_success() 116 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_exited_fail() 220 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail() 249 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail() 356 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_syscall_support()
|
| A D | pidfd_setns_test.c | 144 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens() 190 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP() 203 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 353 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 366 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 379 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 449 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
|
| /linux/include/uapi/asm-generic/ |
| A D | fcntl.h | 62 #ifndef O_CLOEXEC 63 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
|
| /linux/tools/testing/selftests/mount_setattr/ |
| A D | mount_setattr_test.c | 148 #define OPEN_TREE_CLOEXEC O_CLOEXEC 176 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW); in write_file() 425 fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP() 711 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F() 987 fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC); in TEST_F() 1115 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST_F() 1144 attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC); in TEST_F() 1226 ret = open(path, O_RDONLY | O_CLOEXEC); in get_userns_fd() 1458 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F() 1482 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F() [all …]
|
| /linux/samples/pidfd/ |
| A D | pidfd-metadata.c | 58 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/mm/ |
| A D | secretmem.c | 239 BUILD_BUG_ON(SECRETMEM_FLAGS_MASK & O_CLOEXEC); in SYSCALL_DEFINE1() 244 if (flags & ~(SECRETMEM_FLAGS_MASK | O_CLOEXEC)) in SYSCALL_DEFINE1() 249 fd = get_unused_fd_flags(flags & O_CLOEXEC); in SYSCALL_DEFINE1()
|
| /linux/tools/testing/selftests/core/ |
| A D | close_range_test.c | 47 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/dmabuf-heaps/ |
| A D | dmabuf-heap.c | 130 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()
|
| /linux/include/uapi/linux/ |
| A D | eventfd.h | 8 #define EFD_CLOEXEC O_CLOEXEC
|
| A D | timerfd.h | 32 #define TFD_CLOEXEC O_CLOEXEC
|
| A D | dma-heap.h | 19 #define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
|
| A D | signalfd.h | 17 #define SFD_CLOEXEC O_CLOEXEC
|
| /linux/arch/mips/include/asm/ |
| A D | socket.h | 45 #define SOCK_CLOEXEC O_CLOEXEC
|
| /linux/arch/parisc/include/uapi/asm/ |
| A D | fcntl.h | 15 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
|
| /linux/arch/alpha/include/uapi/asm/ |
| A D | fcntl.h | 18 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
|
| /linux/arch/sparc/include/uapi/asm/ |
| A D | fcntl.h | 21 #define O_CLOEXEC 0x400000 macro
|
| /linux/tools/testing/selftests/filesystems/ |
| A D | devpts_pts.c | 105 master = open(ptmx, O_RDWR | O_NOCTTY | O_CLOEXEC); in do_tiocgptpeer() 123 slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC); in do_tiocgptpeer()
|
| /linux/tools/testing/selftests/kvm/lib/ |
| A D | userfaultfd_util.c | 137 uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging() 158 ret = pipe2((int *) &pipes, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging()
|