Home
last modified time | relevance | path

Searched refs:O_PATH (Results 1 – 25 of 38) sorted by relevance

12

/linux-6.15/tools/testing/selftests/openat2/
H A Dopenat2_test.c176 .how.flags = O_PATH | O_CLOEXEC }, in test_openat2_flags()
178 .how.flags = O_PATH | O_DIRECTORY }, in test_openat2_flags()
180 .how.flags = O_PATH | O_NOFOLLOW }, in test_openat2_flags()
183 .how.flags = O_PATH | O_RDWR, .err = -EINVAL }, in test_openat2_flags()
185 .how.flags = O_PATH | O_CREAT, .err = -EINVAL }, in test_openat2_flags()
187 .how.flags = O_PATH | O_EXCL, .err = -EINVAL }, in test_openat2_flags()
189 .how.flags = O_PATH | O_NOCTTY, .err = -EINVAL }, in test_openat2_flags()
191 .how.flags = O_PATH | O_DIRECT, .err = -EINVAL }, in test_openat2_flags()
193 .how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL }, in test_openat2_flags()
199 .how.flags = O_PATH, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
[all …]
H A Drename_attack_test.c43 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
92 .flags = O_PATH, in test_rename_attack()
102 afd = openat(dfd, "a", O_PATH); in test_rename_attack()
H A Dresolve_test.c59 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
65 tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY); in setup_testdir()
456 test->how.flags |= O_PATH; in test_openat2_opath_tests()
459 dfd = openat(rootfd, test->dir, O_PATH | O_DIRECTORY); in test_openat2_opath_tests()
/linux-6.15/tools/perf/tests/
H A Dtests-scripts.c43 fd = open(devel_dirs[i], O_PATH); in shell_tests__dir_fd()
63 fd = open(path, O_PATH); in shell_tests__dir_fd()
67 fd = open(path, O_PATH); in shell_tests__dir_fd()
75 return open(path, O_PATH); in shell_tests__dir_fd()
261 fd = openat(dir_fd, ent->d_name, O_PATH); in append_scripts_in_dir()
H A Dhwmon_pmu.c85 test_dirfd = open(dir, O_PATH|O_DIRECTORY); in test_pmu_get()
/linux-6.15/include/uapi/asm-generic/
H A Dfcntl.h83 #ifndef O_PATH
84 #define O_PATH 010000000 macro
/linux-6.15/tools/testing/selftests/landlock/
H A Dbase_test.c21 #ifndef O_PATH
22 #define O_PATH 010000000 macro
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()
404 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
H A Dfs_test.c489 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
531 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
618 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
671 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
727 path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC); in add_path_beneath()
890 ASSERT_EQ(0, test_open("/", O_RDONLY | O_PATH)); in TEST_F_FORK()
892 ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY | O_PATH)); in TEST_F_FORK()
894 ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY | O_PATH)); in TEST_F_FORK()
903 ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_PATH)); in TEST_F_FORK()
4120 fd = open(dir_s1d1, O_PATH | O_CLOEXEC); in TEST_F_FORK()
[all …]
/linux-6.15/tools/testing/selftests/proc/
H A Dfd-001-lookup.c146 fd = open("/", O_PATH|O_DIRECTORY); in main()
153 fd = open("/", O_PATH|O_DIRECTORY); in main()
/linux-6.15/tools/testing/selftests/exec/
H A Dexecveat.c276 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests()
279 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests()
283 O_RDONLY|O_PATH); in run_tests()
287 O_RDONLY|O_PATH); in run_tests()
/linux-6.15/arch/parisc/include/uapi/asm/
H A Dfcntl.h20 #define O_PATH 020000000 macro
/linux-6.15/arch/alpha/include/uapi/asm/
H A Dfcntl.h35 #define O_PATH 040000000 macro
/linux-6.15/arch/sparc/include/uapi/asm/
H A Dfcntl.h38 #define O_PATH 0x1000000 macro
/linux-6.15/rust/kernel/fs/
H A Dfile.rs66 pub const O_PATH: u32 = bindings::O_PATH; constant
/linux-6.15/tools/testing/selftests/filesystems/overlayfs/
H A Dset_layers_via_fds.c550 layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY | O_PATH); in TEST_F()
555 fd_work = openat(fd_tmpfs, "w", O_DIRECTORY | O_PATH); in TEST_F()
559 fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY | O_PATH); in TEST_F()
563 fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY | O_PATH); in TEST_F()
630 layer_fds[0] = openat(fd_tmp, "upper", O_CLOEXEC | O_DIRECTORY | O_PATH); in TEST_F()
633 layer_fds[1] = openat(fd_tmp, "work", O_CLOEXEC | O_DIRECTORY | O_PATH); in TEST_F()
/linux-6.15/tools/testing/selftests/bpf/prog_tests/
H A Dbpf_obj_pinning.c148 pin_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_pin()
213 get_opts.path_fd = open("/sys/fs/bpf", O_PATH); in validate_get()
H A Dd_path.c68 indicatorfd = open("/tmp/", O_PATH); in trigger_fstat_events()
/linux-6.15/include/linux/
H A Dfcntl.h13 O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
/linux-6.15/tools/perf/trace/beauty/
H A Dopen_flags.c58 #ifdef O_PATH in open__scnprintf_flags()
/linux-6.15/tools/testing/selftests/fchmodat2/
H A Dfchmodat2_test.c28 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
/linux-6.15/tools/perf/util/
H A Dprint-events.c53 int events_fd = open(events_path, O_PATH); in print_tracepoint_events()
77 dir_fd = openat(events_fd, sys_dirent->d_name, O_PATH); in print_tracepoint_events()
H A Dutil.c490 int err, fd = openat(dirfd, dirp, O_PATH); in scandirat()
/linux-6.15/fs/
H A Dopen.c907 if (unlikely(f->f_flags & O_PATH)) { in do_dentry_open()
1212 #define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC)
1222 if (how.flags & O_PATH) in build_open_how()
1290 if (flags & O_PATH) { in build_open_flags()
1319 op->intent = flags & O_PATH ? 0 : LOOKUP_OPEN; in build_open_flags()
1484 if (!(tmp.flags & O_PATH) && force_o_largefile()) in SYSCALL_DEFINE4()
/linux-6.15/io_uring/
H A Dopenclose.c62 if (!(open->how.flags & O_PATH) && force_o_largefile()) in __io_openat_prep()
/linux-6.15/samples/landlock/
H A Dsandboxer.c150 path_beneath.parent_fd = open(path_list[i], O_PATH | O_CLOEXEC); in populate_ruleset_fs()

12