Home
last modified time | relevance | path

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

1234567

/Linux-v6.6/tools/perf/util/
Dutil.h66 #ifndef O_CLOEXEC
68 #define O_CLOEXEC 0x400000 macro
70 #define O_CLOEXEC 010000000 macro
72 #define O_CLOEXEC 02000000 macro
/Linux-v6.6/tools/testing/selftests/landlock/
Dbase_test.c182 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
205 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
277 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
305 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
307 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
317 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
320 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
Dptrace_test.c57 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()
Dfs_test.c386 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
440 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
443 ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
451 ruleset_fd = open(dir_s1d1, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
468 path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
482 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
563 path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC); in TEST_F_FORK()
568 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
616 path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC); in add_path_beneath()
731 path_beneath.parent_fd = open("/proc/self/ns/mnt", O_PATH | O_CLOEXEC); in TEST_F_FORK()
[all …]
/Linux-v6.6/tools/testing/selftests/filesystems/binderfs/
Dbinderfs_test.c91 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-v6.6/tools/testing/selftests/pidfd/
Dpidfd_setns_test.c93 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
136 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP()
144 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
237 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
250 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
263 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
311 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
Dpidfd_test.c69 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()
/Linux-v6.6/tools/include/uapi/asm-generic/
Dfcntl.h62 #ifndef O_CLOEXEC
63 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
/Linux-v6.6/include/uapi/asm-generic/
Dfcntl.h62 #ifndef O_CLOEXEC
63 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
/Linux-v6.6/tools/testing/selftests/mount_setattr/
Dmount_setattr_test.c148 #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()
632 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
681 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
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()
[all …]
/Linux-v6.6/samples/pidfd/
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-v6.6/mm/
Dsecretmem.c239 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-v6.6/tools/testing/selftests/dmabuf-heaps/
Ddmabuf-heap.c128 return dmabuf_heap_alloc_fdflags(fd, len, O_RDWR | O_CLOEXEC, flags, in dmabuf_heap_alloc()
311 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_older()
343 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_newer()
424 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd); in test_alloc_errors()
/Linux-v6.6/include/uapi/linux/
Deventfd.h8 #define EFD_CLOEXEC O_CLOEXEC
Dtimerfd.h32 #define TFD_CLOEXEC O_CLOEXEC
Ddma-heap.h19 #define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
Dsignalfd.h17 #define SFD_CLOEXEC O_CLOEXEC
/Linux-v6.6/tools/testing/selftests/kvm/lib/
Duserfaultfd_util.c134 uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging()
151 ret = pipe2(uffd_desc->pipefds, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging()
/Linux-v6.6/arch/mips/include/asm/
Dsocket.h45 #define SOCK_CLOEXEC O_CLOEXEC
/Linux-v6.6/arch/parisc/include/uapi/asm/
Dfcntl.h15 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
/Linux-v6.6/arch/alpha/include/uapi/asm/
Dfcntl.h18 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
/Linux-v6.6/arch/sparc/include/uapi/asm/
Dfcntl.h21 #define O_CLOEXEC 0x400000 macro
/Linux-v6.6/tools/testing/selftests/filesystems/
Ddevpts_pts.c105 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-v6.6/tools/testing/selftests/exec/
Dexecveat.c236 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests()
248 int fd_cloexec = open_or_die("execveat", O_RDONLY|O_CLOEXEC); in run_tests()
249 int fd_script_cloexec = open_or_die("script", O_RDONLY|O_CLOEXEC); in run_tests()
/Linux-v6.6/include/linux/
Duserfaultfd_k.h33 #define UFFD_CLOEXEC O_CLOEXEC
36 #define UFFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK)

1234567