Symbol: O_PATH
fs/namei.c
4850
} else if (unlikely(file->f_flags & O_PATH)) {
fs/namespace.c
3082
file = dentry_open(path, O_PATH, current_cred());
fs/namespace.c
3225
return dentry_open(&path, O_PATH, current_cred());
fs/namespace.c
4498
dentry_open(&new_path, O_PATH, fc->cred));
fs/open.c
1161
#define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC)
fs/open.c
1171
if (how.flags & O_PATH)
fs/open.c
1239
if (flags & O_PATH) {
fs/open.c
1268
op->intent = flags & O_PATH ? 0 : LOOKUP_OPEN;
fs/open.c
1410
if (!(tmp.flags & O_PATH) && force_o_largefile())
fs/open.c
898
if (unlikely(f->f_flags & O_PATH)) {
fs/smb/server/smb2pdu.c
2143
oflags |= O_PATH;
include/linux/fcntl.h
13
O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
include/uapi/asm-generic/fcntl.h
83
#ifndef O_PATH
io_uring/openclose.c
65
if (!(open->how.flags & O_PATH) && force_o_largefile())
net/unix/af_unix.c
3276
return FD_ADD(O_CLOEXEC, dentry_open(&unix_sk(sk)->path, O_PATH, current_cred()));
samples/landlock/sandboxer.c
154
path_beneath.parent_fd = open(path_list[i], O_PATH | O_CLOEXEC);
tools/perf/tests/hwmon_pmu.c
86
test_dirfd = open(dir, O_PATH|O_DIRECTORY);
tools/perf/tests/hwmon_pmu.c
98
hwmon_dirfd = open(dir, O_PATH|O_DIRECTORY);
tools/perf/tests/tests-scripts.c
261
fd = openat(dir_fd, ent->d_name, O_PATH);
tools/perf/tests/tests-scripts.c
43
fd = open(devel_dirs[i], O_PATH);
tools/perf/tests/tests-scripts.c
63
fd = open(path, O_PATH);
tools/perf/tests/tests-scripts.c
67
fd = open(path, O_PATH);
tools/perf/tests/tests-scripts.c
75
return open(path, O_PATH);
tools/perf/trace/beauty/open_flags.c
58
#ifdef O_PATH
tools/perf/util/bpf-filter.c
713
dir_fd = open(path, O_PATH);
tools/perf/util/pmu.c
850
fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH);
tools/perf/util/util.c
539
int err, fd = openat(dirfd, dirp, O_PATH);
tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c
148
pin_opts.path_fd = open("/sys/fs/bpf", O_PATH);
tools/testing/selftests/bpf/prog_tests/bpf_obj_pinning.c
213
get_opts.path_fd = open("/sys/fs/bpf", O_PATH);
tools/testing/selftests/bpf/prog_tests/d_path.c
76
indicatorfd = open("/tmp/", O_PATH);
tools/testing/selftests/cgroup/lib/cgroup_util.c
493
return open(dir, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW | O_PATH);
tools/testing/selftests/exec/execveat.c
276
int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
279
int fd_path = open_or_die("execveat", O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
283
O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
287
O_RDONLY|O_PATH);
tools/testing/selftests/fchmodat2/fchmodat2_test.c
28
dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
61
self->orig_root = open("/", O_PATH | O_CLOEXEC);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
70
self->orig_root = open("/", O_PATH | O_CLOEXEC);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
550
layer_fds[i] = openat(fd_tmpfs, path, O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
555
fd_work = openat(fd_tmpfs, "w", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
559
fd_upper = openat(fd_tmpfs, "u", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
563
fd_lower = openat(fd_tmpfs, "l501", O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
630
layer_fds[0] = openat(fd_tmp, "upper", O_CLOEXEC | O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/overlayfs/set_layers_via_fds.c
633
layer_fds[1] = openat(fd_tmp, "work", O_CLOEXEC | O_DIRECTORY | O_PATH);
tools/testing/selftests/filesystems/statmount/statmount_test.c
171
orig_root = open("/", O_PATH);
tools/testing/selftests/filesystems/statmount/statmount_test.c
707
fd = open(subdir, O_PATH);
tools/testing/selftests/filesystems/statmount/statmount_test.c
836
fd = open(subdir, O_PATH);
tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
153
fd = open(mnt, O_PATH);
tools/testing/selftests/landlock/base_test.c
21
#ifndef O_PATH
tools/testing/selftests/landlock/base_test.c
227
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
250
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
404
open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_bench.c
102
curr = openat(curr, path, O_PATH);
tools/testing/selftests/landlock/fs_bench.c
125
int fd = openat(AT_FDCWD, ".", O_PATH);
tools/testing/selftests/landlock/fs_bench.c
133
fd = openat(fd, path, O_PATH);
tools/testing/selftests/landlock/fs_bench.c
142
int newfd = openat(fd, "..", O_PATH);
tools/testing/selftests/landlock/fs_bench.c
82
curr = open(".", O_PATH);
tools/testing/selftests/landlock/fs_test.c
3938
fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3954
fd = open(dir_s1d1, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
490
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
493
ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5078
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5182
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
532
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5329
bind_s1d3_fd = open(bind_dir_s1d3, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5469
open(TMP_DIR "/s2d1/s2d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5899
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
5902
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6026
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6030
open(TMP_DIR "/s3d1/s3d2", O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
615
path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
620
open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
6421
O_DIRECTORY | O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
673
open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
700
path_beneath.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
729
path_beneath.parent_fd = open(path, O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
838
path_beneath.parent_fd = open("/proc/self/ns/mnt", O_PATH | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
890
ASSERT_EQ(0, test_open("/", O_RDONLY | O_PATH));
tools/testing/selftests/landlock/fs_test.c
892
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY | O_PATH));
tools/testing/selftests/landlock/fs_test.c
894
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY | O_PATH));
tools/testing/selftests/landlock/fs_test.c
903
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_PATH));
tools/testing/selftests/landlock/net_test.c
1645
path_beneath.parent_fd = open("/dev", O_PATH | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/openat2/openat2_test.c
170
.how.flags = O_TMPFILE | O_PATH | O_RDWR, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
176
.how.flags = O_PATH | O_CLOEXEC },
tools/testing/selftests/openat2/openat2_test.c
178
.how.flags = O_PATH | O_DIRECTORY },
tools/testing/selftests/openat2/openat2_test.c
180
.how.flags = O_PATH | O_NOFOLLOW },
tools/testing/selftests/openat2/openat2_test.c
183
.how.flags = O_PATH | O_RDWR, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
185
.how.flags = O_PATH | O_CREAT, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
187
.how.flags = O_PATH | O_EXCL, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
189
.how.flags = O_PATH | O_NOCTTY, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
191
.how.flags = O_PATH | O_DIRECT, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
193
.how.flags = O_PATH | O_LARGEFILE, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
199
.how.flags = O_PATH, .how.mode = 0600, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
235
.how.flags = O_PATH,
tools/testing/selftests/openat2/rename_attack_test.c
102
afd = openat(dfd, "a", O_PATH);
tools/testing/selftests/openat2/rename_attack_test.c
43
dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/openat2/rename_attack_test.c
92
.flags = O_PATH,
tools/testing/selftests/openat2/resolve_test.c
456
test->how.flags |= O_PATH;
tools/testing/selftests/openat2/resolve_test.c
459
dfd = openat(rootfd, test->dir, O_PATH | O_DIRECTORY);
tools/testing/selftests/openat2/resolve_test.c
59
dfd = open(dirname, O_PATH | O_DIRECTORY);
tools/testing/selftests/openat2/resolve_test.c
65
tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
408
{ O_PATH, "O_PATH" },
tools/testing/selftests/proc/fd-001-lookup.c
146
fd = open("/", O_PATH|O_DIRECTORY);
tools/testing/selftests/proc/fd-001-lookup.c
153
fd = open("/", O_PATH|O_DIRECTORY);
tools/testing/selftests/proc/proc-pid-vm.c
314
if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) {