| /linux-6.15/tools/testing/selftests/landlock/ |
| H A D | base_test.c | 227 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() 284 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST() 295 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST() 404 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST() 434 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 444 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 447 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 467 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST() 480 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST() [all …]
|
| H 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() 277 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST() 302 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST() 354 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST() 468 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 469 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
|
| H 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() 504 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 505 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
|
| H A D | wait-pipe-sandbox.c | 96 if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) { in main() 119 if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) { in main()
|
| H A D | scoped_abstract_unix_test.c | 88 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 185 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 186 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 317 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 318 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 427 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 442 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 646 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F() 647 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() 817 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F() [all …]
|
| /linux-6.15/tools/perf/util/ |
| H A D | util.h | 69 #ifndef O_CLOEXEC 71 #define O_CLOEXEC 0x400000 macro 73 #define O_CLOEXEC 010000000 macro 75 #define O_CLOEXEC 02000000 macro
|
| /linux-6.15/tools/testing/selftests/pid_namespace/ |
| H A D | pid_max.c | 56 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_cb() 102 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_inner() 177 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() 303 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_limit_outer()
|
| /linux-6.15/tools/testing/selftests/filesystems/binderfs/ |
| H A D | binderfs_test.c | 91 fd = open(device_path, O_RDONLY | O_CLOEXEC); in __do_binderfs_test() 114 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test() 161 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test() 257 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping() 282 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping() 424 fd = open(device_path, O_RDONLY | O_CLOEXEC); in TEST() 441 fds[i] = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
|
| /linux-6.15/tools/testing/selftests/pidfd/ |
| H A D | pidfd_bind_mount.c | 80 #define OPEN_TREE_CLOEXEC O_CLOEXEC 149 pidfd = open(proc_path, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F() 175 fd_pidfd_mnt = openat(-EBADF, self->template, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F()
|
| H A D | pidfd_test.c | 104 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 D | pidfd_setns_test.c | 82 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()
|
| /linux-6.15/include/uapi/asm-generic/ |
| H A D | fcntl.h | 61 #ifndef O_CLOEXEC 62 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
|
| /linux-6.15/samples/pidfd/ |
| H 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-6.15/mm/ |
| H A D | secretmem.c | 238 BUILD_BUG_ON(SECRETMEM_FLAGS_MASK & O_CLOEXEC); in SYSCALL_DEFINE1() 243 if (flags & ~(SECRETMEM_FLAGS_MASK | O_CLOEXEC)) in SYSCALL_DEFINE1() 248 fd = get_unused_fd_flags(flags & O_CLOEXEC); in SYSCALL_DEFINE1()
|
| /linux-6.15/tools/testing/selftests/core/ |
| H 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-6.15/tools/testing/selftests/dmabuf-heaps/ |
| H 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-6.15/tools/testing/selftests/exec/ |
| H A D | check-exec.c | 164 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-6.15/tools/testing/selftests/filesystems/ |
| H A D | utils.c | 190 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC); in write_id_mapping() 209 fd = open(path, O_WRONLY | O_CLOEXEC); in write_id_mapping() 297 ret = open(path_ns, O_RDONLY | O_CLOEXEC | O_NOCTTY); in get_userns_fd_from_idmap() 427 fd_userns = open(path, O_RDONLY | O_CLOEXEC); in create_userns_hierarchy()
|
| /linux-6.15/include/uapi/linux/ |
| H A D | eventfd.h | 8 #define EFD_CLOEXEC O_CLOEXEC
|
| H A D | timerfd.h | 32 #define TFD_CLOEXEC O_CLOEXEC
|
| H A D | dma-heap.h | 19 #define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
|
| /linux-6.15/tools/testing/selftests/mount_setattr/ |
| H A D | mount_setattr_test.c | 169 #define OPEN_TREE_CLOEXEC O_CLOEXEC 197 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW); in write_file() 450 fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP() 736 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F() 1012 fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC); in TEST_F() 1140 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST_F() 1169 attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC); in TEST_F() 1251 ret = open(path, O_RDONLY | O_CLOEXEC); in get_userns_fd() 1483 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F() 1507 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F() [all …]
|
| /linux-6.15/arch/mips/include/asm/ |
| H A D | socket.h | 45 #define SOCK_CLOEXEC O_CLOEXEC
|
| /linux-6.15/tools/testing/selftests/drivers/ntsync/ |
| H A D | ntsync.c | 150 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 234 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 385 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 450 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 510 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 622 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 757 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 950 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 1073 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() 1184 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST() [all …]
|
| /linux-6.15/arch/parisc/include/uapi/asm/ |
| H A D | fcntl.h | 15 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
|