arch/alpha/boot/tools/mkbb.c
108
fd = open(argv[2], O_RDONLY);
arch/alpha/boot/tools/objstrip.c
91
fd = open(inname, O_RDONLY);
arch/arm/vdso/vdsomunge.c
138
infd = open(infile, O_RDONLY);
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c
257
fd = open(path, O_RDONLY);
arch/mips/boot/elf2ecoff.c
300
if ((infile = open(argv[1], O_RDONLY)) < 0) {
arch/mips/tools/loongson3-llsc-check.c
251
vmlinux_fd = open(vmlinux_path, O_RDONLY);
arch/powerpc/boot/mktree.c
82
if ((in_fd = open(argv[1], O_RDONLY)) < 0) {
arch/powerpc/kvm/book3s_64_mmu_hv.c
1955
rwflag = (ghf->flags & KVM_GET_HTAB_WRITE) ? O_WRONLY : O_RDONLY;
arch/powerpc/kvm/book3s_64_mmu_hv.c
1963
if (rwflag == O_RDONLY) {
arch/powerpc/platforms/cell/spufs/inode.c
268
FD_PREPARE(fdf, 0, dentry_open(path, O_RDONLY, current_cred()));
arch/powerpc/platforms/cell/spufs/inode.c
501
FD_PREPARE(fdf, 0, dentry_open(path, O_RDONLY, current_cred()));
arch/powerpc/platforms/pseries/papr-hvpipe.c
506
FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC,
arch/powerpc/platforms/pseries/papr-platform-dump.c
335
fd = FD_ADD(O_RDONLY | O_CLOEXEC,
arch/powerpc/platforms/pseries/papr-platform-dump.c
338
(void *)params, O_RDONLY,
arch/powerpc/platforms/pseries/papr-rtas-common.c
214
fd = FD_ADD(O_RDONLY | O_CLOEXEC,
arch/powerpc/platforms/pseries/papr-rtas-common.c
215
anon_inode_getfile_fmode(name, fops, (void *)blob, O_RDONLY,
arch/sparc/boot/piggyback.c
255
if ((tail = open(argv[4], O_RDONLY)) < 0)
arch/sparc/vdso/vdso2c.c
163
int fd = open(name, O_RDONLY);
arch/um/drivers/mconsole_kern.c
144
file = file_open_root_mnt(mnt, ptr, O_RDONLY, 0);
arch/um/drivers/tty.c
48
mode = O_RDONLY;
arch/um/os-Linux/file.c
172
f = O_RDONLY;
arch/um/os-Linux/file.c
316
fd = open(file, O_RDONLY, 0);
arch/um/os-Linux/skas/process.c
415
stub_exe_fd = open(tmpfile, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
arch/um/os-Linux/umid.c
148
fd = open(file, O_RDONLY);
arch/x86/tools/insn_sanity.c
109
fd = open("/dev/urandom", O_RDONLY);
arch/x86/tools/vdso2c.c
169
int fd = open(name, O_RDONLY);
block/bdev.c
1040
flags |= O_RDONLY; /* homeopathic, because O_RDONLY is 0 */
drivers/block/zloop.c
1066
zlo->data_dir = zloop_filp_open_fmt(O_RDONLY | O_DIRECTORY, 0, "%s/%u",
drivers/block/zloop.c
976
cnv = zloop_filp_open_fmt(O_RDONLY, 0600, "%s/%u/cnv-%06u",
drivers/block/zloop.c
978
seq = zloop_filp_open_fmt(O_RDONLY, 0600, "%s/%u/seq-%06u",
drivers/char/misc_minor_kunit.c
168
filp = filp_open(devname, O_RDONLY, 0);
drivers/crypto/ccp/sev-dev.c
290
fp = open_file_as_root(init_ex_path, O_RDONLY, 0);
drivers/gpio/gpiolib-cdev.c
1705
fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);
drivers/gpio/gpiolib-cdev.c
1712
O_RDONLY | O_CLOEXEC);
drivers/gpio/gpiolib-cdev.c
2130
fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);
drivers/gpio/gpiolib-cdev.c
2139
O_RDONLY | O_CLOEXEC);
drivers/gpio/gpiolib-cdev.c
377
FD_PREPARE(fdf, O_RDONLY | O_CLOEXEC,
drivers/gpio/gpiolib-cdev.c
379
lh, O_RDONLY | O_CLOEXEC));
drivers/iio/industrialio-event.c
213
indio_dev, O_RDONLY | O_CLOEXEC);
drivers/infiniband/core/uverbs_std_types.c
180
O_RDONLY));
drivers/infiniband/core/uverbs_std_types_async_fd.c
73
O_RDONLY),
drivers/infiniband/core/uverbs_std_types_dmabuf.c
194
NULL, NULL, O_RDONLY),
drivers/infiniband/hw/mlx5/devx.c
3197
O_RDONLY),
drivers/infiniband/hw/mlx5/devx.c
3215
O_RDONLY),
drivers/media/dvb-core/dmxdev.c
1354
if (((file->f_flags & O_ACCMODE) == O_RDONLY) ||
drivers/media/dvb-core/dmxdev.c
145
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
drivers/media/dvb-core/dmxdev.c
216
if (((file->f_flags & O_ACCMODE) == O_RDONLY) ||
drivers/media/dvb-core/dvb_frontend.c
2092
if ((file->f_flags & O_ACCMODE) == O_RDONLY
drivers/media/dvb-core/dvb_frontend.c
2777
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
drivers/media/dvb-core/dvb_frontend.c
2840
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
drivers/media/dvb-core/dvb_frontend.c
2909
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
drivers/media/dvb-core/dvb_net.c
1433
if (((file->f_flags&O_ACCMODE)==O_RDONLY))
drivers/media/dvb-core/dvbdev.c
140
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
drivers/media/dvb-core/dvbdev.c
162
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
drivers/media/pci/ddbridge/ddbridge-core.c
793
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
drivers/media/pci/ddbridge/ddbridge-core.c
817
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
drivers/media/pci/ddbridge/ddbridge-core.c
832
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
drivers/misc/genwqe/card_dev.c
1097
if ((filp->f_flags & O_ACCMODE) == O_RDONLY)
drivers/misc/genwqe/card_dev.c
1133
if ((filp->f_flags & O_ACCMODE) == O_RDONLY)
drivers/misc/genwqe/card_dev.c
1156
if ((filp->f_flags & O_ACCMODE) == O_RDONLY)
drivers/most/most_cdev.c
125
((filp->f_flags & O_ACCMODE) != O_RDONLY)) ||
drivers/nvdimm/bus.c
1214
ro = ((file->f_flags & O_ACCMODE) == O_RDONLY);
drivers/s390/char/hmcdrv_dev.c
125
if ((fp->f_flags & O_ACCMODE) == O_RDONLY)
drivers/s390/char/vmur.c
737
if (((accmode == O_RDONLY) && (urd->class != DEV_CLASS_UR_I)) ||
drivers/s390/char/vmur.c
790
if ((file->f_flags & O_ACCMODE) != O_RDONLY)
drivers/scsi/sg.c
295
if ((flags & O_EXCL) && (O_RDONLY == (flags & O_ACCMODE)))
drivers/scsi/st.c
1331
STp->write_prot = ((filp->f_flags & O_ACCMODE) == O_RDONLY);
drivers/staging/axis-fifo/axis-fifo.c
342
if ((flags == O_RDONLY || flags == O_RDWR) && !fifo->has_rx_fifo)
drivers/staging/media/av7110/av7110_av.c
1139
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
drivers/staging/media/av7110/av7110_av.c
1371
if (((file->f_flags & O_ACCMODE) == O_RDONLY) &&
drivers/staging/media/av7110/av7110_av.c
1523
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
drivers/staging/media/av7110/av7110_av.c
1545
if ((file->f_flags & O_ACCMODE) != O_RDONLY)
drivers/staging/media/av7110/av7110_av.c
933
if ((file->f_flags & O_ACCMODE) != O_RDONLY)
drivers/staging/media/av7110/av7110_av.c
941
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
drivers/staging/media/av7110/av7110_av.c
963
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
drivers/target/target_core_configfs.c
3706
fp = filp_open(db_root_stage, O_RDONLY, 0);
drivers/usb/gadget/function/storage_common.c
199
filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0);
drivers/usb/gadget/function/u_uac1_legacy.c
238
snd->filp = filp_open(fn_cap, O_RDONLY, 0);
drivers/vdpa/vdpa_user/vduse_dev.c
1064
flags |= O_RDONLY;
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
961
O_RDONLY);
drivers/vfio/pci/mlx5/main.c
616
O_RDONLY);
drivers/vfio/pci/pds/lm.c
260
lm_file = pds_vfio_get_lm_file(&pds_vfio_save_fops, O_RDONLY, size);
drivers/vfio/pci/qat/main.c
269
migf, O_RDONLY);
drivers/vfio/pci/virtio/migrate.c
684
O_RDONLY);
drivers/vfio/pci/xe/main.c
260
flags = type == XE_VFIO_FILE_SAVE ? O_RDONLY : O_WRONLY;
fs/9p/vfs_inode.c
168
case O_RDONLY:
fs/autofs/dev-ioctl.c
241
return FD_ADD(O_CLOEXEC, dentry_open(&path, O_RDONLY, current_cred()));
fs/ceph/file.c
29
case O_RDONLY:
fs/ceph/file.c
327
flags = O_RDONLY;
fs/ceph/util.c
68
case O_RDONLY:
fs/coda/coda_linux.c
48
if ((flags & O_ACCMODE) == O_RDONLY)
fs/ecryptfs/file.c
244
== O_RDONLY && (file->f_flags & O_ACCMODE) != O_RDONLY) {
fs/ecryptfs/kthread.c
134
flags |= IS_RDONLY(d_inode(lower_dentry)) ? O_RDONLY : O_RDWR;
fs/ecryptfs/kthread.c
138
if ((flags & O_ACCMODE) == O_RDONLY) {
fs/erofs/ishare.c
109
realfile = alloc_empty_backing_file(O_RDONLY|O_NOATIME, current_cred());
fs/erofs/super.c
154
filp_open(dif->path, O_RDONLY | O_LARGEFILE, 0) :
fs/erofs/super.c
806
file = filp_open(fc->source, O_RDONLY | O_LARGEFILE, 0);
fs/exec.c
769
.open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC,
fs/exportfs/expfs.c
312
file = dentry_open(path, O_RDONLY, cred);
fs/fuse/ioctl.c
497
return fuse_file_open(fm, get_node_id(inode), O_RDONLY, isdir);
fs/fuse/ioctl.c
502
fuse_file_release(inode, ff, O_RDONLY, NULL, S_ISDIR(inode->i_mode));
fs/hostfs/hostfs_user.c
86
mode = O_RDONLY;
fs/kernel_read_file.c
137
file = filp_open(path, O_RDONLY, 0);
fs/kernel_read_file.c
163
file = file_open_root(&root, path, O_RDONLY, 0);
fs/lockd/svclock.c
693
lock->fl.c.flc_file = file->f_file[O_RDONLY];
fs/lockd/svcsubs.c
169
if (file->f_file[O_RDONLY])
fs/lockd/svcsubs.c
170
nlmsvc_ops->fclose(file->f_file[O_RDONLY]);
fs/lockd/svcsubs.c
191
lock.c.flc_file = file->f_file[O_RDONLY];
fs/lockd/svcsubs.c
289
if (file->f_file[O_RDONLY])
fs/lockd/svcsubs.c
290
nlmsvc_ops->fclose(file->f_file[O_RDONLY]);
fs/lockd/svcsubs.c
76
return lock_is_write(lock) ? O_WRONLY : O_RDONLY;
fs/namei.c
4262
if ((flag & O_ACCMODE) != O_RDONLY && !(flag & O_APPEND))
fs/nfs/dir.c
3346
if ((openflags & O_ACCMODE) != O_RDONLY)
fs/nfs/internal.h
52
if ((flags & O_ACCMODE) != O_RDONLY)
fs/nfs/nfs4file.c
346
filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, O_RDONLY,
fs/nfsd/nfs4proc.c
224
oflags |= O_RDONLY;
fs/nfsd/nfs4recover.c
450
nn->rec_file = filp_open(user_recovery_dirname, O_RDONLY | O_DIRECTORY, 0);
fs/nfsd/nfs4state.c
505
return O_RDONLY;
fs/nfsd/nfs4state.c
512
return O_RDONLY;
fs/nfsd/nfs4state.c
618
ret = nfsd_file_get(f->fi_fds[O_RDONLY]);
fs/nfsd/nfs4state.c
6261
if (!fp->fi_fds[O_RDONLY]) {
fs/nfsd/nfs4state.c
6262
fp->fi_fds[O_RDONLY] = nf;
fs/nfsd/nfs4state.c
6265
fp->fi_rdeleg_file = nfsd_file_get(fp->fi_fds[O_RDONLY]);
fs/nfsd/nfs4state.c
648
ret = nfsd_file_get(f->fi_fds[O_RDONLY]);
fs/nfsd/nfs4state.c
662
if (f->fi_fds[O_RDONLY])
fs/nfsd/nfs4state.c
663
return f->fi_fds[O_RDONLY];
fs/nfsd/nfs4state.c
761
atomic_inc(&fp->fi_access[O_RDONLY]);
fs/nfsd/nfs4state.c
790
atomic_read(&fp->fi_access[O_RDONLY]))
fs/nfsd/nfs4state.c
826
__nfs4_file_put_access(fp, O_RDONLY);
fs/nfsd/vfs.c
887
mode = (access & NFSD_MAY_WRITE) ? O_WRONLY : O_RDONLY;
fs/nfsd/vfs.c
903
int flags = O_RDONLY|O_LARGEFILE;
fs/notify/fanotify/fanotify_user.c
1664
case O_RDONLY:
fs/notify/inotify/inotify_user.c
712
O_RDONLY | flags);
fs/nsfs.c
112
return dentry_open(&path, O_RDONLY, current_cred());
fs/nsfs.c
133
return FD_ADD(O_CLOEXEC, dentry_open(&path, O_RDONLY, current_cred()));
fs/nsfs.c
350
FD_PREPARE(fdf, O_CLOEXEC, dentry_open(&path, O_RDONLY, current_cred()));
fs/overlayfs/copy_up.c
250
new_file = ovl_path_open(path, O_LARGEFILE | O_RDONLY);
fs/overlayfs/copy_up.c
279
old_file = ovl_path_open(&datapath, O_LARGEFILE | O_RDONLY);
fs/overlayfs/inode.c
607
flags = O_RDONLY;
fs/overlayfs/readdir.c
379
realfile = ovl_path_open(realpath, O_RDONLY | O_LARGEFILE);
fs/overlayfs/readdir.c
960
return ovl_path_open(realpath, O_RDONLY | (file->f_flags & O_LARGEFILE));
fs/overlayfs/util.c
1387
filp = kernel_file_open(datapath, O_RDONLY, current_cred());
fs/overlayfs/util.c
667
case O_RDONLY:
fs/pidfs.c
884
(O_RDONLY | O_WRONLY | O_RDWR | O_NONBLOCK | O_CLOEXEC | O_EXCL)
fs/pipe.c
956
res[0] = alloc_file_clone(f, O_RDONLY | (flags & O_NONBLOCK),
fs/proc/root.c
130
ns_filp = filp_open(param->string, O_RDONLY, 0);
fs/smb/client/file.c
1170
if ((file->f_flags & (O_ACCMODE | O_APPEND)) == O_RDONLY)
fs/smb/client/file.c
3202
break_lease(inode, O_RDONLY);
fs/smb/client/file.c
411
if ((flags & O_ACCMODE) == O_RDONLY)
fs/smb/client/file.c
432
if ((flags & O_ACCMODE) == O_RDONLY)
fs/smb/server/smb2pdu.c
2138
oflags |= O_RDONLY;
fs/smb/server/smb2pdu.c
3524
} else if (open_flags == O_RDONLY &&
fs/smb/server/vfs.c
1120
int flags = O_RDONLY | O_LARGEFILE;
fs/userfaultfd.c
2157
O_RDONLY | (flags & UFFD_SHARED_FCNTL_FLAGS),
fs/userfaultfd.c
983
O_RDONLY | (new->flags & UFFD_SHARED_FCNTL_FLAGS), inode);
fs/vboxsf/file.c
83
case O_RDONLY:
fs/xfs/xfs_healthmon.c
1246
O_CLOEXEC | O_RDONLY);
include/linux/fcntl.h
10
(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
include/linux/filelock.h
462
if ((mode & O_ACCMODE) == O_RDONLY)
include/linux/lockd/lockd.h
313
return file->f_file[O_RDONLY] ?
include/linux/lockd/lockd.h
314
file->f_file[O_RDONLY] : file->f_file[O_WRONLY];
init/do_mounts_rd.c
194
in_file = filp_open("/initrd.image", O_RDONLY, 0);
init/initramfs_test.c
227
file = filp_open(c[0].fname, O_RDONLY, 0);
init/initramfs_test.c
433
file = filp_open(c[0].fname, O_RDONLY, 0);
ipc/shm.c
1565
f_flags = O_RDONLY;
kernel/bpf/bpf_iter.c
643
flags = O_RDONLY | O_CLOEXEC;
kernel/bpf/btf.c
8146
return anon_inode_getfd("btf", &btf_fops, btf, O_RDONLY | O_CLOEXEC);
kernel/bpf/syscall.c
1198
return O_RDONLY;
kernel/power/user.c
125
pm_notifier_call_chain(data->mode == O_RDONLY ?
kernel/power/user.c
308
if (data->mode != O_RDONLY || !data->frozen || data->ready) {
kernel/power/user.c
72
if ((filp->f_flags & O_ACCMODE) == O_RDONLY) {
kernel/power/user.c
75
data->mode = O_RDONLY;
lib/test_lockup.c
534
test_file = filp_open(test_file_path, O_RDONLY, 0);
mm/huge_memory.c
4713
candidate = file_open_name(file, O_RDONLY, 0);
samples/binderfs/binderfs_example.c
53
fd = open("/dev/binderfs/binder-control", O_RDONLY | O_CLOEXEC);
samples/bpf/hbm.c
80
trace_fd = open(TRACEFS "trace_pipe", O_RDONLY, 0);
samples/bpf/syscall_tp_user.c
109
fd = open(filename, O_RDONLY);
samples/bpf/task_fd_query_user.c
257
efd = open(buf, O_RDONLY, 0);
samples/bpf/task_fd_query_user.c
55
fd = open(buf, O_RDONLY);
samples/bpf/task_fd_query_user.c
77
fd = open(buf, O_RDONLY);
samples/bpf/xdp_fwd_user.c
163
if (access(filename, O_RDONLY) < 0) {
samples/cgroup/cgroup_event_listener.c
34
cfd = open(argv[1], O_RDONLY);
samples/fanotify/fs-monitor.c
130
fd = fanotify_init(FAN_CLASS_NOTIF|FAN_REPORT_FID, O_RDONLY);
samples/hid/hid_mouse.c
63
fd = open(uevent, O_RDONLY | O_NONBLOCK);
samples/hid/hid_surface_dial.c
76
fd = open(uevent, O_RDONLY | O_NONBLOCK);
samples/nitro_enclaves/ne_ioctl_sample.c
344
enclave_image_fd = open(enclave_image_path, O_RDONLY);
samples/pfsm/pfsm-wakeup.c
38
fd_rtc = open(RTC_A, O_RDONLY);
samples/pidfd/pidfd-metadata.c
105
statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC);
samples/pidfd/pidfd-metadata.c
58
procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
samples/seccomp/user-trap.c
132
mem = open(path, O_RDONLY);
samples/timers/hpet_example.c
109
fd = open(argv[0], O_RDONLY);
samples/timers/hpet_example.c
149
fd = open(argv[0], O_RDONLY);
samples/timers/hpet_example.c
243
fd = open(argv[0], O_RDONLY);
samples/timers/hpet_example.c
89
fd = open(argv[0], O_RDONLY);
samples/vfio-mdev/mtty.c
989
migf, O_RDONLY);
scripts/asn1_compiler.c
594
fd = open(filename, O_RDONLY);
scripts/basic/fixdep.c
219
fd = open(filename, O_RDONLY);
scripts/dtc/util.c
271
fd = open(filename, O_RDONLY);
scripts/gcc-plugins/latent_entropy_plugin.c
106
urandom_fd = open("/dev/urandom", O_RDONLY);
scripts/gendwarfksyms/gendwarfksyms.c
155
fd = open(argv[n], O_RDONLY);
scripts/insert-sys-cert.c
234
fd = open(file_name, O_RDONLY);
scripts/kconfig/confdata.c
54
fd1 = open(file1, O_RDONLY);
scripts/kconfig/confdata.c
58
fd2 = open(file2, O_RDONLY);
scripts/mod/modpost.c
122
fd = open(filename, O_RDONLY);
scripts/mod/modpost.c
384
fd = open(filename, O_RDONLY);
scripts/recordmcount.c
186
fd_map = open(fname, O_RDONLY);
security/integrity/ima/ima_crypto.c
552
flags |= O_RDONLY;
security/integrity/ima/ima_fs.c
436
if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
security/integrity/ima/ima_fs.c
459
if ((file->f_flags & O_ACCMODE) == O_RDONLY)
security/keys/big_key.c
246
file = dentry_open(&payload->path, O_RDONLY, current_cred());
security/tomoyo/tomoyo.c
111
&bprm->file->f_path, O_RDONLY);
sound/core/compress_offload.c
1086
fd_o = get_unused_fd_flags(O_RDONLY|O_CLOEXEC);
sound/core/compress_offload.c
93
else if ((f->f_flags & O_ACCMODE) == O_RDONLY)
sound/core/info.c
242
if (((mode == O_RDONLY || mode == O_RDWR) && !entry->c.ops->read) ||
sound/core/seq/oss/seq_oss_init.c
280
if ((file->f_flags & O_ACCMODE) != O_RDONLY)
tools/accounting/delaytop.c
822
cfd = open(cfg.container_path, O_RDONLY);
tools/accounting/getdelays.c
618
cfd = open(containerpath, O_RDONLY);
tools/arch/x86/intel_sdsi/intel_sdsi.c
543
bin_fd = open(bin_file, O_RDONLY);
tools/bootconfig/main.c
161
fd = open(path, O_RDONLY);
tools/bootconfig/main.c
302
fd = open(path, O_RDONLY);
tools/bpf/bpf_dbg.c
949
pcap_fd = open(file, O_RDONLY);
tools/bpf/bpf_jit_disasm.c
137
fd = open(file, O_RDONLY);
tools/bpf/bpftool/cgroup.c
352
cgroup_fd = open(path, O_RDONLY);
tools/bpf/bpftool/cgroup.c
414
cgroup_fd = open(fpath, O_RDONLY);
tools/bpf/bpftool/cgroup.c
561
cgroup_fd = open(argv[0], O_RDONLY);
tools/bpf/bpftool/cgroup.c
619
cgroup_fd = open(argv[0], O_RDONLY);
tools/bpf/bpftool/common.c
682
fd = open(path, O_RDONLY);
tools/bpf/bpftool/feature.c
153
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/bpf/bpftool/gen.c
1271
fd = open(file, O_RDONLY);
tools/bpf/bpftool/gen.c
1691
fd = open(file, O_RDONLY);
tools/bpf/bpftool/net.c
595
fd = open("/proc/self/ns/net", O_RDONLY);
tools/bpf/bpftool/perf.c
34
fd = open("/", O_RDONLY);
tools/build/fixdep.c
127
fd = open(depfile, O_RDONLY);
tools/firmware/ihex2fw.c
101
infd = open(argv[optind], O_RDONLY);
tools/hv/hv_vss_daemon.c
36
int ret, fd = open(dir, O_RDONLY);
tools/iio/iio_generic_buffer.c
655
fd = open(buffer_access, O_RDONLY | O_NONBLOCK);
tools/include/nolibc/dirent.h
45
fd = open(name, O_RDONLY);
tools/include/nolibc/stdio.h
66
flags = O_RDONLY;
tools/include/nolibc/stdio.h
79
flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR;
tools/laptop/dslm/dslm.c
147
if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) {
tools/laptop/freefall/freefall.c
125
fd = open("/dev/freefall", O_RDONLY);
tools/laptop/freefall/freefall.c
42
int fd = open(unload_heads_path, O_RDONLY);
tools/leds/led_hw_brightness_mon.c
42
fd = open(brightness_file_path, O_RDONLY);
tools/lib/api/fs/fs.c
296
int fd = open(filename, O_RDONLY), err = -1;
tools/lib/api/fs/fs.c
314
int fd = open(filename, O_RDONLY), err = -1;
tools/lib/api/fs/fs.c
354
io.fd = open(filename, O_RDONLY);
tools/lib/api/fs/fs.c
460
io.fd = open(path, O_RDONLY);
tools/lib/bpf/btf.c
1270
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/lib/bpf/btf.c
1448
fd = open(path, O_RDONLY);
tools/lib/bpf/elf.c
36
fd = open(binary_path, O_RDONLY | O_CLOEXEC);
tools/lib/bpf/libbpf.c
14255
fd = open(fcpu, O_RDONLY | O_CLOEXEC);
tools/lib/bpf/libbpf.c
1591
obj->efile.fd = open(obj->path, O_RDONLY | O_CLOEXEC);
tools/lib/bpf/linker.c
529
fd = open(filename, O_RDONLY | O_CLOEXEC);
tools/lib/bpf/zip.c
205
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/lib/symbol/kallsyms.c
39
io.fd = open(filename, O_RDONLY, 0);
tools/mm/page-types.c
1051
fd = checked_open(name, O_RDONLY|O_NOATIME|O_NOFOLLOW);
tools/mm/page-types.c
1082
kpageflags_fd = checked_open(opt_kpageflags, O_RDONLY);
tools/mm/page-types.c
1083
pagemap_fd = checked_open("/proc/self/pagemap", O_RDONLY);
tools/mm/page-types.c
1342
kpagecgroup_fd = checked_open(PROC_KPAGECGROUP, O_RDONLY);
tools/mm/page-types.c
1345
kpagecount_fd = checked_open(PROC_KPAGECOUNT, O_RDONLY);
tools/mm/page-types.c
792
kpageflags_fd = checked_open(opt_kpageflags, O_RDONLY);
tools/mm/page-types.c
898
pagemap_fd = checked_open(buf, O_RDONLY);
tools/objtool/builtin-check.c
217
src_fd = open(src, O_RDONLY);
tools/objtool/elf.c
1151
if ((flags & O_ACCMODE) == O_RDONLY)
tools/objtool/klp-diff.c
1721
e.orig = elf_open_read(argv[0], O_RDONLY);
tools/objtool/klp-diff.c
1722
e.patched = elf_open_read(argv[1], O_RDONLY);
tools/objtool/orc_dump.c
30
fd = open(filename, O_RDONLY);
tools/perf/builtin-daemon.c
354
fd = open("/dev/null", O_RDONLY);
tools/perf/builtin-daemon.c
534
ack = open(ack_path, O_RDONLY, O_NONBLOCK);
tools/perf/builtin-ftrace.c
1076
fd = open(trace_file, O_RDONLY);
tools/perf/builtin-ftrace.c
1464
trace_fd = open(trace_file, O_RDONLY);
tools/perf/builtin-ftrace.c
208
fd = open(file, O_RDONLY);
tools/perf/builtin-ftrace.c
779
trace_fd = open(trace_file, O_RDONLY);
tools/perf/builtin-record.c
982
fd = open(kcore, O_RDONLY);
tools/perf/builtin-script.c
4501
input = open(data.path, O_RDONLY); /* input_name */
tools/perf/jvmti/jvmti_agent.c
65
fd = open("/proc/self/exe", O_RDONLY);
tools/perf/tests/api-io.c
64
io->fd = open(path, O_RDONLY);
tools/perf/tests/dso-data.c
311
int fd = open("/dev/null", O_RDONLY);
tools/perf/tests/dso-data.c
362
fd_extra = open("/dev/null", O_RDONLY);
tools/perf/tests/openat-syscall-all-cpus.c
85
fd = openat(0, "/etc/passwd", O_RDONLY);
tools/perf/tests/openat-syscall-tp-fields.c
39
int flags = O_RDONLY | O_DIRECTORY;
tools/perf/tests/openat-syscall.c
49
fd = openat(0, "/etc/passwd", O_RDONLY);
tools/perf/tests/tests-scripts.c
84
io__init(&io, openat(dir_fd, name, O_RDONLY), buf, sizeof(buf));
tools/perf/trace/beauty/open_flags.c
30
if ((flags & O_ACCMODE) == O_RDONLY)
tools/perf/ui/browsers/scripts.c
101
fd = openat(dir_fd, filename, O_RDONLY);
tools/perf/util/bpf_ftrace.c
150
return open("/dev/null", O_RDONLY);
tools/perf/util/capstone.c
474
fd = open(filename, O_RDONLY);
tools/perf/util/cgroup.c
44
fd = open(path, O_RDONLY);
tools/perf/util/copyfile.c
115
fromfd = open(from, O_RDONLY);
tools/perf/util/data.c
139
ret = open(file->path, O_RDONLY);
tools/perf/util/data.c
244
int flags = data->in_place_update ? O_RDWR : O_RDONLY;
tools/perf/util/debuginfo.c
46
fd = open(path, O_RDONLY);
tools/perf/util/drm_pmu.c
170
io__init(&io, openat(fdinfo_dir_fd, fd_name, O_RDONLY), buf, sizeof(buf));
tools/perf/util/drm_pmu.c
587
io__init(&io, openat(fdinfo_dir_fd, fd_name, O_RDONLY), buf, sizeof(buf));
tools/perf/util/dso.c
1907
fd = open(symfs_filename, O_RDONLY);
tools/perf/util/dso.c
347
return open(name, O_RDONLY);
tools/perf/util/dso.c
544
int fd = open(name, O_RDONLY|O_CLOEXEC);
tools/perf/util/evsel.c
3944
cmdline_fd = openat(dirfd(proc_dir), buf, O_RDONLY);
tools/perf/util/header.c
1345
io_dir__init(&dir, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/header.c
1404
io_dir__init(&dir, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
248
io_dir__init(&dir, open(pmu->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
286
int fd = openat(dir.dirfd, ent->d_name, O_RDONLY);
tools/perf/util/hwmon_pmu.c
417
int dir = open(hwm->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/hwmon_pmu.c
433
fd = openat(dir, buf, O_RDONLY);
tools/perf/util/hwmon_pmu.c
716
io_dir__init(&class_hwmon_dir, open(buf, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/hwmon_pmu.c
737
name_fd = openat(hwmon_dir, "name", O_RDONLY);
tools/perf/util/hwmon_pmu.c
767
int dir = open(hwm->hwmon_dir, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/hwmon_pmu.c
781
fd = openat(dir, buf, O_RDONLY);
tools/perf/util/libbfd.c
434
fd = open(filename, O_RDONLY);
tools/perf/util/libdw.c
42
fd = open(dso_name, O_RDONLY);
tools/perf/util/lzma.c
117
int fd = open(input, O_RDONLY);
tools/perf/util/machine.c
1387
io_dir__init(&iod, open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/namespaces.c
302
oldns = open("/proc/self/ns/mnt", O_RDONLY);
tools/perf/util/namespaces.c
306
newns = open(nsinfo__mntns_path(nsi), O_RDONLY);
tools/perf/util/pmu.c
213
int fd = openat(dirfd, name, O_RDONLY);
tools/perf/util/pmu.c
2407
fd = perf_pmu__pathname_fd(dirfd, pmu->name, name, O_RDONLY);
tools/perf/util/pmu.c
2525
caps_fd = open(caps_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY);
tools/perf/util/pmu.c
2542
fd = openat(caps_fd, name, O_RDONLY);
tools/perf/util/pmu.c
309
fd = open(path, O_RDONLY);
tools/perf/util/pmu.c
344
fd = open(path, O_RDONLY);
tools/perf/util/pmu.c
379
fd = open(path, O_RDONLY);
tools/perf/util/pmu.c
722
fd = openat(events_dir_fd, name, O_RDONLY);
tools/perf/util/pmu.c
826
io.fd = perf_pmu__pathname_fd(dirfd, pmu_name, *template, O_RDONLY);
tools/perf/util/probe-event.c
309
fd = open(module, O_RDONLY);
tools/perf/util/probe-event.c
633
fd = open(exec, O_RDONLY);
tools/perf/util/probe-file.c
121
ret = open(buf, O_RDONLY, 0);
tools/perf/util/srccode.c
113
fd = open(fn, O_RDONLY);
tools/perf/util/symbol-elf.c
1157
fd = open(name, O_RDONLY);
tools/perf/util/symbol-elf.c
1946
kcore->fd = open(filename, O_RDONLY);
tools/perf/util/symbol-elf.c
220
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-elf.c
2455
from = open(from_filename, O_RDONLY);
tools/perf/util/symbol-elf.c
2459
to = open(to_filename, O_RDONLY);
tools/perf/util/symbol-elf.c
2877
fd = open(target, O_RDONLY);
tools/perf/util/symbol-elf.c
876
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-elf.c
939
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-elf.c
999
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-minimal.c
112
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-minimal.c
215
fd = open(filename, O_RDONLY);
tools/perf/util/symbol-minimal.c
241
int fd = open(name, O_RDONLY);
tools/perf/util/symbol.c
1338
fd = open(kcore_filename, O_RDONLY);
tools/perf/util/symbol.c
1986
int fd = open(file, O_RDONLY);
tools/perf/util/synthetic-events.c
2670
io.fd = open(path, O_RDONLY, 0);
tools/perf/util/synthetic-events.c
450
io.fd = open(bf, O_RDONLY, 0);
tools/perf/util/synthetic-events.c
817
io_dir__init(&iod, open(filename, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/synthetic-events.c
90
fd = open(bf, O_RDONLY);
tools/perf/util/thread.c
459
fd = open(path, O_RDONLY);
tools/perf/util/tool_pmu.c
262
fd = open(buf, O_RDONLY);
tools/perf/util/tool_pmu.c
265
fd = open("/proc/stat", O_RDONLY);
tools/perf/util/tp_pmu.c
41
io_dir__init(&evt_dir, open(evt_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/tp_pmu.c
74
io_dir__init(&events_dir, open(events_dir_path, O_CLOEXEC | O_DIRECTORY | O_RDONLY));
tools/perf/util/trace-event-info.c
431
fd = open(evt_path, O_RDONLY);
tools/perf/util/trace-event-info.c
51
fd = open(file, O_RDONLY);
tools/perf/util/tracepoint.c
20
fd = open(evt_path, O_RDONLY);
tools/perf/util/unwind-libunwind-local.c
380
fd = open(dso__symsrc_filename(dso), O_RDONLY);
tools/perf/util/unwind-libunwind-local.c
400
fd = open(debuglink, O_RDONLY);
tools/perf/util/zlib.c
32
input_fd = open(input, O_RDONLY);
tools/perf/util/zlib.c
85
int fd = open(input, O_RDONLY);
tools/power/acpi/os_specific/service_layers/osunixmap.c
70
fd = open(SYSTEM_MEMORY, O_RDONLY | O_BINARY);
tools/power/acpi/tools/ec/ec_access.c
208
int file_mode = O_RDONLY;
tools/power/acpi/tools/ec/ec_access.c
216
file_mode = O_RDONLY;
tools/power/acpi/tools/pfrut/pfrut.c
328
fd_capsule = open(capsule_name, O_RDONLY);
tools/power/cpupower/debug/i386/centrino-decode.c
42
fd = open(file, O_RDONLY);
tools/power/cpupower/debug/i386/dump_psb.c
176
fd = open("/dev/mem", O_RDONLY);
tools/power/cpupower/debug/i386/powernow-k8-decode.c
39
fd = open(file, O_RDONLY);
tools/power/cpupower/lib/cpuidle.c
63
fd = open(path, O_RDONLY);
tools/power/cpupower/lib/cpupower.c
30
fd = open(path, O_RDONLY);
tools/power/cpupower/lib/cpupower.c
98
fd = open(path, O_RDONLY);
tools/power/cpupower/lib/powercap.c
23
fd = open(path, O_RDONLY);
tools/power/cpupower/lib/powercap.c
47
fd = open(path, O_RDONLY);
tools/power/cpupower/utils/helpers/msr.c
32
fd = open(msr_file_name, O_RDONLY);
tools/power/cpupower/utils/helpers/sysfs.c
134
fd = open(path, O_RDONLY);
tools/power/cpupower/utils/helpers/sysfs.c
23
fd = open(path, O_RDONLY);
tools/power/cpupower/utils/helpers/sysfs.c
70
fd = open(path, O_RDONLY);
tools/power/x86/intel-speed-select/isst-config.c
1064
fd = open("/sys/fs/cgroup/0-0-0/cpuset.cpus", O_RDONLY, 0);
tools/power/x86/intel-speed-select/isst-config.c
1080
fd1 = open("/sys/fs/cgroup/0-0-0/cpuset.cpus.partition", O_RDONLY, 0);
tools/power/x86/intel-speed-select/isst-config.c
1817
fd = open(buffer, O_RDONLY);
tools/power/x86/intel-speed-select/isst-config.c
2280
fd = open(buffer, O_RDONLY);
tools/power/x86/intel-speed-select/isst-config.c
486
fd = open(buffer, O_RDONLY);
tools/power/x86/turbostat/turbostat.c
10051
fd_telem_info = openat(fd_dir, info_filename, O_RDONLY);
tools/power/x86/turbostat/turbostat.c
10102
fd_telem_dir = openat(dirfd(pmt_iter.dir), entry->d_name, O_RDONLY);
tools/power/x86/turbostat/turbostat.c
10128
fd_pmt = openat(fd_telem_dir, "telem", O_RDONLY);
tools/power/x86/turbostat/turbostat.c
10909
fd_target_dir = open(target_path, O_RDONLY | O_DIRECTORY);
tools/power/x86/turbostat/turbostat.c
10930
fd_telem_dir = openat(dirfd(pmt_iter.dir), dirname->d_name, O_RDONLY | O_DIRECTORY);
tools/power/x86/turbostat/turbostat.c
2521
fd = open(pathname, O_RDONLY);
tools/power/x86/turbostat/turbostat.c
4628
fdmt = open(path, O_RDONLY, 0);
tools/power/x86/turbostat/turbostat.c
8440
fd = open(path, O_RDONLY);
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
695
fd = open(pathname, O_RDONLY);
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
743
fd = open(path, O_RDONLY);
tools/sched_ext/include/scx/compat.h
132
fd = open("/sys/kernel/sched_ext/hotplug_seq", O_RDONLY);
tools/spi/spidev_test.c
371
tx_fd = open(filename, O_RDONLY);
tools/testing/selftests/alsa/conf.c
171
fd = open(path, O_RDONLY);
tools/testing/selftests/alsa/utimer-test.c
150
timer_dev_fd = open("/dev/snd/timer", O_RDONLY);
tools/testing/selftests/alsa/utimer-test.c
52
timer_dev_fd = open("/dev/snd/timer", O_RDONLY);
tools/testing/selftests/arm64/abi/tpidr2.c
226
ret = open("/proc/sys/abi/sme_default_vector_length", O_RDONLY, 0);
tools/testing/selftests/arm64/fp/za-fork.c
86
ret = open("/proc/sys/abi/sme_default_vector_length", O_RDONLY, 0);
tools/testing/selftests/bpf/benchs/bench_htab_mem.c
273
fd = openat(ctx.fd, name, O_RDONLY);
tools/testing/selftests/bpf/cgroup_helpers.c
388
fd = open(CGROUP_MOUNT_PATH, O_RDONLY);
tools/testing/selftests/bpf/cgroup_helpers.c
456
fd = open(cgroup_path, O_RDONLY);
tools/testing/selftests/bpf/cgroup_helpers.c
72
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/cgroup_helpers.c
750
return open(cgroup_workdir, O_RDONLY);
tools/testing/selftests/bpf/network_helpers.c
535
token->orig_netns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/network_helpers.c
542
nsfd = open(nspath, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
1528
proc_maps_fd = open(maps_path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
657
iter_fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/btf_sysfs.c
30
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/cgroup_dev.c
32
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c
75
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/cgroup_xattr.c
52
tmp_fd = open(TMP_FILE, O_RDONLY | O_CREAT);
tools/testing/selftests/bpf/prog_tests/check_mtu.c
22
fd = open(filename, 0, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/d_path.c
65
procfd = open("/proc/self/comm", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/d_path.c
68
devfd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/d_path.c
71
localfd = open("/tmp/d_path_loadgen.txt", O_CREAT | O_RDONLY, 0644);
tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c
49
dev_udmabuf = open("/dev/udmabuf", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/dmabuf_iter.c
89
heap_fd = open("/dev/dma_heap/system", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/file_reader.c
32
fd = open("/proc/self/exe", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/file_reader.c
97
fd = open("/proc/self/exe", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/flow_dissector.c
765
net_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c
635
saved_net = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c
641
init_net = open("/proc/1/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c
81
new_net = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
120
fd = open(testfile, O_CREAT | O_RDONLY, 0644);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
22
fd = open(testfile, O_CREAT | O_RDONLY, 0644);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
220
fd = open(testfile, O_RDONLY, 0644);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
259
fd = open(testfile, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c
51
fd = open(testfile, O_RDONLY, 0644);
tools/testing/selftests/bpf/prog_tests/livepatch_trampoline.c
32
fd = open("/proc/cmdline", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/module_attach.c
17
fd = open(BPF_TESTMOD_TEST_FILE, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/mptcp.c
108
fd = open("/proc/sys/net/ipv4/tcp_congestion_control", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/sk_assign.c
241
self_net = open(NS_SELF, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/sk_lookup.c
415
net_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/sk_lookup.c
466
net_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/task_fd_query_tp.c
27
efd = open(buf, O_RDONLY, 0);
tools/testing/selftests/bpf/prog_tests/test_local_storage.c
124
rm_fd = open(tmp_exec_path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/test_struct_ops_no_cfi.c
11
fd = open("bpf_test_no_cfi.ko", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1001
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1045
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1086
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1127
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1169
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1214
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1259
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1310
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1357
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1374
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1382
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1435
fd = open(sysctl_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
145
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
1501
if (test->open_flags == O_RDONLY) {
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
166
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
193
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
209
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
251
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
293
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
348
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
397
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
42
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
439
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
475
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
514
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
53
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
553
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
588
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
64
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
659
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
819
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
85
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
898
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_sysctl.c
968
.open_flags = O_RDONLY,
tools/testing/selftests/bpf/prog_tests/test_tc_tunnel.c
426
fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/tp_attach_query.c
26
efd = open(buf, O_RDONLY, 0);
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
160
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
220
fd = open(mod_path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
427
fd = open(sig_path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/verify_pkcs7_sig.c
452
ret = open(data_path, O_RDONLY);
tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
46
nsfd = open(nspath, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/bpf/prog_tests/xdp_bonding.c
699
root_netns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
85
bad_fd = open("/dev/null", O_RDONLY);
tools/testing/selftests/bpf/test_lirc_mode2_user.c
82
inputfd = open(argv[2], O_RDONLY | O_NONBLOCK);
tools/testing/selftests/bpf/test_progs.c
1175
fd = open(BPF_TESTMOD_TEST_FILE, O_RDONLY);
tools/testing/selftests/bpf/test_progs.c
506
env.saved_netns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/bpf/test_sockmap.c
2143
cg_fd = open(optarg, O_DIRECTORY, O_RDONLY);
tools/testing/selftests/bpf/testing_helpers.c
410
fd = open(path, O_RDONLY);
tools/testing/selftests/bpf/testing_helpers.c
503
sysctl_fd = open(jit_sysctl, O_RDONLY);
tools/testing/selftests/bpf/trace_helpers.c
441
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/bpf/unpriv_helpers.c
78
fd = open("/proc/cmdline", O_RDONLY);
tools/testing/selftests/bpf/urandom_read.c
61
int fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/bpf/veristat.c
489
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/cachestat/test_cachestat.c
321
4, O_RDONLY, 0400) == KSFT_PASS)
tools/testing/selftests/cachestat/test_cachestat.c
43
int random_fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/capabilities/test_execve.c
147
int from = openat(fromfd, fromname, O_RDONLY);
tools/testing/selftests/capabilities/test_execve.c
216
int ourpath_fd = open(our_path, O_RDONLY | O_DIRECTORY);
tools/testing/selftests/cgroup/lib/cgroup_util.c
30
fd = open(path, O_RDONLY);
tools/testing/selftests/cgroup/test_core.c
33
fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/cgroup/test_hugetlb_memcg.c
28
fd = open(path, O_RDONLY);
tools/testing/selftests/cgroup/test_kmem.c
225
fd = open("/proc/kpagecgroup", O_RDONLY);
tools/testing/selftests/cgroup/wait_inotify.c
49
fd = open(file, O_RDONLY);
tools/testing/selftests/core/close_range_test.c
120
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/core/close_range_test.c
209
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/core/close_range_test.c
248
fd = open("/dev/null", O_RDONLY);
tools/testing/selftests/core/close_range_test.c
316
fd = open("/dev/null", O_RDONLY);
tools/testing/selftests/core/close_range_test.c
47
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/core/close_range_test.c
637
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/core/close_range_test.c
649
fd = open(path, O_CREAT | O_RDONLY | O_CLOEXEC, 0600);
tools/testing/selftests/core/close_range_test.c
656
fd = open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/drivers/ntsync/ntsync.c
1073
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
1184
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
1312
stress_device = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
150
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
234
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
385
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
450
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
510
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
622
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
757
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/drivers/ntsync/ntsync.c
950
fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY);
tools/testing/selftests/efivarfs/open-unlink.c
115
fd = open(path, O_RDONLY);
tools/testing/selftests/efivarfs/open-unlink.c
20
fd = open(path, O_RDONLY);
tools/testing/selftests/efivarfs/open-unlink.c
51
fd = open(path, O_RDONLY);
tools/testing/selftests/exec/check-exec.c
186
fd_in = open(binary_path, O_CLOEXEC | O_RDONLY);
tools/testing/selftests/exec/check-exec.c
257
fd = open(path, flags | O_RDONLY);
tools/testing/selftests/exec/execveat.c
158
int in_fd = open_or_die(src, O_RDONLY);
tools/testing/selftests/exec/execveat.c
209
fd = open(longpath, O_RDONLY);
tools/testing/selftests/exec/execveat.c
271
int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
273
O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
274
int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/exec/execveat.c
275
int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY);
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
277
int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC);
tools/testing/selftests/exec/execveat.c
278
int fd = open_or_die("execveat", O_RDONLY);
tools/testing/selftests/exec/execveat.c
279
int fd_path = open_or_die("execveat", O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
280
int fd_symlink = open_or_die("execveat.symlink", O_RDONLY);
tools/testing/selftests/exec/execveat.c
281
int fd_denatured = open_or_die("execveat.denatured", O_RDONLY);
tools/testing/selftests/exec/execveat.c
283
O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
284
int fd_script = open_or_die("script", O_RDONLY);
tools/testing/selftests/exec/execveat.c
285
int fd_ephemeral = open_or_die("execveat.ephemeral", O_RDONLY);
tools/testing/selftests/exec/execveat.c
287
O_RDONLY|O_PATH);
tools/testing/selftests/exec/execveat.c
288
int fd_script_ephemeral = open_or_die("script.ephemeral", O_RDONLY);
tools/testing/selftests/exec/execveat.c
289
int fd_cloexec = open_or_die("execveat", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/exec/execveat.c
290
int fd_script_cloexec = open_or_die("script", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/exec/execveat.c
472
fd = open("/proc/self/comm", O_RDONLY);
tools/testing/selftests/filelock/ofdlocks.c
40
int fd2 = open("/tmp/aa", O_RDONLY);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
115
fd = open(device_path, O_CLOEXEC | O_RDONLY);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
162
fd = open(device_path, O_CLOEXEC | O_RDONLY);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
425
fd = open(device_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
442
fds[i] = open(device_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/binderfs/binderfs_test.c
92
fd = open(device_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/dnotify_test.c
26
fd = open(".", O_RDONLY);
tools/testing/selftests/filesystems/fclog.c
37
self->host_mntns = open("/proc/self/ns/mnt", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/filesystems/file_stressor.c
127
fd = open(path, O_CREAT | O_RDONLY | O_CLOEXEC, 0644);
tools/testing/selftests/filesystems/file_stressor.c
142
self->fd_proc_pid[i] = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/kernfs_test.c
18
fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/kernfs_test.c
30
fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
53
self->ns_fd = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
58
self->orig_ns_fd = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/filesystems/mount-notify/mount-notify_test_ns.c
64
self->ns_fd = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/filesystems/nsfs/iterate_mntns.c
58
self->fd_mnt_ns[i] = open("/proc/self/ns/mnt", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/filesystems/nsfs/owner.c
56
ns = open(path, O_RDONLY);
tools/testing/selftests/filesystems/nsfs/pidns.c
56
ns = open(path, O_RDONLY);
tools/testing/selftests/filesystems/open_tree_ns/open_tree_ns_test.c
44
fd = open(path, O_RDONLY);
tools/testing/selftests/filesystems/statmount/statmount_test_ns.c
64
int fd = open(mnt_ns, O_RDONLY);
tools/testing/selftests/filesystems/utils.c
300
ret = open(path_ns, O_RDONLY | O_CLOEXEC | O_NOCTTY);
tools/testing/selftests/filesystems/utils.c
430
fd_userns = open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/fpu/test_fpu.c
21
int fd = open(test_fpu_path, O_RDONLY);
tools/testing/selftests/ftrace/poll.c
51
pfd.fd = open(argv[optind], O_RDONLY);
tools/testing/selftests/hid/hid_common.h
336
fd = open(uevent, O_RDONLY | O_NONBLOCK);
tools/testing/selftests/intel_pstate/aperf.c
47
fd = open(msr_file_name, O_RDONLY);
tools/testing/selftests/intel_pstate/msr.c
29
fd = open(msr_file_name, O_RDONLY);
tools/testing/selftests/iommu/iommufd.c
1803
fd = open("/proc/self/exe", O_RDONLY);
tools/testing/selftests/iommu/iommufd.c
23
O_RDONLY);
tools/testing/selftests/kho/init.c
55
fd = open("/proc/cmdline", O_RDONLY);
tools/testing/selftests/kho/init.c
66
fd = open(KERNEL_IMAGE, O_RDONLY);
tools/testing/selftests/kvm/access_tracking_perf_test.c
192
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/kvm/arm64/sea_to_user.c
67
fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/kvm/lib/elf.c
121
fd = open(filename, O_RDONLY);
tools/testing/selftests/kvm/lib/elf.c
21
fd = open(filename, O_RDONLY);
tools/testing/selftests/kvm/lib/kvm_util.c
68
return _open_kvm_dev_path_or_exit(O_RDONLY);
tools/testing/selftests/kvm/lib/kvm_util.c
87
fd = open_path_or_exit(path, O_RDONLY);
tools/testing/selftests/kvm/lib/lru_gen_util.c
360
lru_gen_fd = open(LRU_GEN_ENABLED_PATH, O_RDONLY);
tools/testing/selftests/kvm/s390/shared_zeropage_test.c
75
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/kvm/x86/aperfmperf_test.c
35
return open_path_or_exit(path, O_RDONLY);
tools/testing/selftests/kvm/x86/xen_shinfo_test.c
463
int zero_fd = open("/dev/zero", O_RDONLY);
tools/testing/selftests/landlock/base_test.c
284
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
295
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
432
ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
434
dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
444
dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
447
dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
467
dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
tools/testing/selftests/landlock/base_test.c
480
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
494
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
513
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/base_test.c
525
EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
1030
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1033
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1036
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1039
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1042
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1046
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1055
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1058
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1061
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1064
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1067
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1071
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1080
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1083
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1086
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1089
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1092
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1096
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1249
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1262
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1273
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1289
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1291
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1301
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1304
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1313
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1316
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1327
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1330
ASSERT_EQ(EACCES, test_open(file2_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1349
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1354
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1359
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1383
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1388
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1393
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1404
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1409
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1414
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1434
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1439
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1447
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1465
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1467
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1469
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1480
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1482
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
1484
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1528
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1529
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1537
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1538
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1565
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1567
ASSERT_EQ(EACCES, test_open(dir_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1569
ASSERT_EQ(EACCES, test_open(dir_s3d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1570
ASSERT_EQ(0, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1571
ASSERT_EQ(0, test_open(dir_s3d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1594
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1596
ASSERT_EQ(EACCES, test_open(dir_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1598
ASSERT_EQ(0, test_open(dir_s3d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1599
ASSERT_EQ(0, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1600
ASSERT_EQ(0, test_open(dir_s3d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1623
ASSERT_EQ(0, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1624
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1633
ASSERT_EQ(EACCES, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1634
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1653
ASSERT_EQ(EACCES, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1654
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1681
ASSERT_EQ(0, test_open("s3d3", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1682
ASSERT_EQ(EACCES, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1829
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1830
ASSERT_EQ(EACCES, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1832
ASSERT_EQ(ENOENT, test_open(dir_s3d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1866
ASSERT_EQ(0, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1872
ASSERT_EQ(EACCES, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1963
test_open_rel(dirfd, "..", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1964
ASSERT_EQ(0, test_open_rel(dirfd, ".", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1968
ASSERT_EQ(0, test_open_rel(dirfd, "./s2d3", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1971
ASSERT_EQ(0, test_open_rel(dirfd, "./s1d3", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1976
ASSERT_EQ(0, test_open_rel(dirfd, "/..", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1977
ASSERT_EQ(0, test_open_rel(dirfd, "/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1978
ASSERT_EQ(0, test_open_rel(dirfd, "/f1", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1979
ASSERT_EQ(0, test_open_rel(dirfd, "/s1d3", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1983
ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s1d1", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1984
ASSERT_EQ(0, test_open_rel(dirfd, "../../s1d1/s1d2", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1986
O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1988
ASSERT_EQ(EACCES, test_open_rel(dirfd, "../../s2d1", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1989
ASSERT_EQ(0, test_open_rel(dirfd, "../../s2d1/s2d2", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
1991
O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2030
src_fd = open(src_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
2108
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2109
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2113
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2114
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2118
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
2119
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
3592
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
3593
reg_fd = open(file1_s1d2, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3597
proc_fd = open_proc_fd(_metadata, reg_fd, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3657
proc_fd = open_proc_fd(_metadata, pipe_fds[0], O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
3737
EXPECT_EQ(0, test_open(file_r, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3746
EXPECT_EQ(EACCES, test_open(file_w, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3755
EXPECT_EQ(EACCES, test_open(file_none, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3817
EXPECT_EQ(0, test_open(file_rwt, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3822
EXPECT_EQ(EACCES, test_open(file_rw, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3831
EXPECT_EQ(0, test_open(file_rt, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3836
EXPECT_EQ(EACCES, test_open(file_t, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3841
EXPECT_EQ(EACCES, test_open(file_none, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
3849
EXPECT_EQ(EACCES, test_open(file_in_dir_t, O_RDONLY | O_TRUNC));
tools/testing/selftests/landlock/fs_test.c
4348
fd = open(path, O_RDONLY);
tools/testing/selftests/landlock/fs_test.c
4512
dir_fd = open("/dev", O_RDONLY);
tools/testing/selftests/landlock/fs_test.c
454
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
455
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
456
ASSERT_EQ(0, test_open(file2_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
457
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
458
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
459
ASSERT_EQ(0, test_open(file2_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
460
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
461
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
463
ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
464
ASSERT_EQ(0, test_open(file1_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4644
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4645
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4646
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4647
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4648
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4649
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
465
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4651
ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4652
ASSERT_EQ(0, test_open(file1_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4653
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4654
ASSERT_EQ(0, test_open(file1_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4655
ASSERT_EQ(ENOENT, test_open(dir_s2d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4656
ASSERT_EQ(ENOENT, test_open(file1_s2d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4658
ASSERT_EQ(0, test_open(bind_dir_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4659
ASSERT_EQ(0, test_open(bind_file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
466
ASSERT_EQ(0, test_open(file1_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4661
ASSERT_EQ(0, test_open(dir_s3d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
467
ASSERT_EQ(0, test_open(dir_s2d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
468
ASSERT_EQ(0, test_open(file1_s2d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
470
ASSERT_EQ(0, test_open(dir_s3d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
471
ASSERT_EQ(0, test_open(dir_s3d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
472
ASSERT_EQ(0, test_open(dir_s3d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4722
ASSERT_EQ(0, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4724
ASSERT_EQ(0, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4726
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4728
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4732
ASSERT_EQ(0, test_open(dir_s2d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4735
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4744
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4746
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4748
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4750
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4753
ASSERT_EQ(EACCES, test_open(file1_s2d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4755
ASSERT_EQ(EACCES, test_open(dir_s2d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4758
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4759
ASSERT_EQ(0, test_open(bind_dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4768
ASSERT_EQ(EACCES, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4770
ASSERT_EQ(EACCES, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4772
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4774
ASSERT_EQ(EACCES, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4777
ASSERT_EQ(EACCES, test_open(file1_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4779
ASSERT_EQ(EACCES, test_open(dir_s2d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4781
ASSERT_EQ(0, test_open(bind_file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4783
ASSERT_EQ(EACCES, test_open(bind_dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4792
ASSERT_EQ(EACCES, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4796
ASSERT_EQ(EACCES, test_open(bind_file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4888
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4889
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file2_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4890
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, "..", O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4900
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4901
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file2_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4908
test_open_rel(bind_s1d3_fd, "..", O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
4914
EXPECT_EQ(0, test_open(file1_s4d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4920
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4921
EXPECT_EQ(EACCES, test_open_rel(bind_s1d3_fd, file2_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4926
EXPECT_EQ(EACCES, test_open(file1_s4d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4932
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4933
EXPECT_EQ(EACCES, test_open_rel(bind_s1d3_fd, file2_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
4992
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5014
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5015
EXPECT_EQ(EACCES, test_open(file1_s4d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5051
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5052
EXPECT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5077
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file2_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5083
EXPECT_EQ(0, test_open(file1_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5084
EXPECT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5103
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5104
EXPECT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5139
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5167
EXPECT_EQ(0, test_open(file1_s2d2, O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5174
EXPECT_EQ(0, test_open(file1_s4d1, O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5187
EXPECT_EQ(0, test_open(file2_s4d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
5197
EXPECT_EQ(0, test_open(file1_s4d1, O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5202
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, file1_name, O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5216
EXPECT_EQ(0, test_open(file1_s4d2, O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5221
EXPECT_EQ(0, test_open_rel(bind_s1d3_fd, "s4d2/f1", O_RDONLY))
tools/testing/selftests/landlock/fs_test.c
5733
test_open_rel(s1d41_bind_fd, "f1", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6249
test_open_rel(s1d3_bind_fd, "s1d41/f1", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6469
ASSERT_EQ(0, test_open(lower_fl1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6470
ASSERT_EQ(0, test_open(lower_dl1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6471
ASSERT_EQ(0, test_open(lower_dl1_fl2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6472
ASSERT_EQ(0, test_open(lower_fo1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6473
ASSERT_EQ(0, test_open(lower_do1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6474
ASSERT_EQ(0, test_open(lower_do1_fo2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6475
ASSERT_EQ(0, test_open(lower_do1_fl3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6477
ASSERT_EQ(0, test_open(upper_fu1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6478
ASSERT_EQ(0, test_open(upper_du1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6479
ASSERT_EQ(0, test_open(upper_du1_fu2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6480
ASSERT_EQ(0, test_open(upper_fo1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6481
ASSERT_EQ(0, test_open(upper_do1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6482
ASSERT_EQ(0, test_open(upper_do1_fo2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6483
ASSERT_EQ(0, test_open(upper_do1_fu3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6485
ASSERT_EQ(0, test_open(merge_fl1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6486
ASSERT_EQ(0, test_open(merge_dl1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6487
ASSERT_EQ(0, test_open(merge_dl1_fl2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6488
ASSERT_EQ(0, test_open(merge_fu1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6489
ASSERT_EQ(0, test_open(merge_du1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6490
ASSERT_EQ(0, test_open(merge_du1_fu2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6491
ASSERT_EQ(0, test_open(merge_fo1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6492
ASSERT_EQ(0, test_open(merge_do1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6493
ASSERT_EQ(0, test_open(merge_do1_fo2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6494
ASSERT_EQ(0, test_open(merge_do1_fl3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6495
ASSERT_EQ(0, test_open(merge_do1_fu3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6643
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6648
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6651
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6656
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6661
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6664
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6677
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6694
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6708
ASSERT_EQ(EACCES, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6712
ASSERT_EQ(EACCES, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6719
ASSERT_EQ(0, test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6733
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6738
ASSERT_EQ(0, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6747
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6761
ASSERT_EQ(EACCES, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6765
ASSERT_EQ(EACCES, test_open(path_entry, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
6773
test_open(path_entry, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
6953
EXPECT_EQ(0, test_open(dev_null_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
6954
EXPECT_EQ(0, test_open(variant->file_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
6962
EXPECT_EQ(EACCES, test_open(dev_null_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
6963
EXPECT_EQ(0, test_open(variant->file_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
6974
EXPECT_EQ(EACCES, test_open(dev_null_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
6975
EXPECT_EQ(EACCES, test_open(variant->file_path, O_RDONLY | O_CLOEXEC));
tools/testing/selftests/landlock/fs_test.c
7049
ASSERT_EQ(EACCES, test_open(TMP_DIR, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
7236
EXPECT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
7613
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
810
ASSERT_EQ(0, test_open("/proc/self/ns/mnt", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
814
ASSERT_EQ(EACCES, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
815
ASSERT_EQ(EACCES, test_open("/dev", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
816
ASSERT_EQ(0, test_open("/dev/null", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
817
ASSERT_EQ(EACCES, test_open("/dev/full", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
819
ASSERT_EQ(EACCES, test_open("/proc", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
820
ASSERT_EQ(EACCES, test_open("/proc/self", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
821
ASSERT_EQ(EACCES, test_open("/proc/self/ns", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
827
ASSERT_EQ(0, test_open("/proc/self/ns/mnt", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
889
ASSERT_EQ(EACCES, test_open("/", O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
890
ASSERT_EQ(0, test_open("/", O_RDONLY | O_PATH));
tools/testing/selftests/landlock/fs_test.c
891
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY));
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
893
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
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
896
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
897
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
898
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
899
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
902
ASSERT_EQ(EACCES, test_open(dir_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
903
ASSERT_EQ(0, test_open(dir_s2d2, O_RDONLY | O_PATH));
tools/testing/selftests/landlock/fs_test.c
905
ASSERT_EQ(0, test_open(file1_s2d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
917
reg_fd = open(file1_s2d2, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/fs_test.c
974
ASSERT_EQ(EACCES, test_open(file1_s1d1, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
977
ASSERT_EQ(EACCES, test_open(dir_s1d1, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
980
ASSERT_EQ(0, test_open(file1_s1d2, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
983
ASSERT_EQ(0, test_open(dir_s1d2, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/fs_test.c
986
ASSERT_EQ(0, test_open(file1_s1d3, O_RDONLY));
tools/testing/selftests/landlock/fs_test.c
989
ASSERT_EQ(0, test_open(dir_s1d3, O_RDONLY | O_DIRECTORY));
tools/testing/selftests/landlock/net_test.c
1659
dir_fd = open("/dev", O_RDONLY);
tools/testing/selftests/landlock/net_test.c
1663
dir_fd = open("/", O_RDONLY);
tools/testing/selftests/landlock/ptrace_test.c
57
fd = open(procenv_path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/landlock/ptrace_test.c
73
const int fd = open("/proc/sys/kernel/yama/ptrace_scope", O_RDONLY);
tools/testing/selftests/landlock/wait-pipe-sandbox.c
119
if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) {
tools/testing/selftests/landlock/wait-pipe-sandbox.c
96
if (open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC) >= 0) {
tools/testing/selftests/lsm/common.c
32
fd = open(path, O_RDONLY);
tools/testing/selftests/memfd/fuse_mnt.c
66
if ((fi->flags & 3) != O_RDONLY)
tools/testing/selftests/memfd/fuse_test.c
262
fd = open(argv[1], O_RDONLY | O_CLOEXEC);
tools/testing/selftests/memfd/memfd_test.c
144
int fd = open("/proc/sys/vm/memfd_noexec", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/memfd/memfd_test.c
1652
fd = mfd_assert_open(fd2, O_RDONLY, 0);
tools/testing/selftests/mm/compaction_test.c
63
O_RDONLY | O_NONBLOCK);
tools/testing/selftests/mm/cow.c
1906
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/guard-regions.c
1772
self->fd = open(self->path, O_RDONLY);
tools/testing/selftests/mm/guard-regions.c
2098
proc_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/guard-regions.c
2151
proc_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/guard-regions.c
2209
self->fd = open(self->path, O_RDONLY);
tools/testing/selftests/mm/hmm-tests.c
253
fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/mm/hmm-tests.c
785
fd = open(file, O_RDONLY);
tools/testing/selftests/mm/hugepage-vmemmap.c
41
fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/hugepage-vmemmap.c
57
fd = open("/proc/kpageflags", O_RDONLY);
tools/testing/selftests/mm/khugepaged.c
392
finfo.fd = open(finfo.path, O_RDONLY, 777);
tools/testing/selftests/mm/ksm_functional_tests.c
704
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/ksm_tests.c
550
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/madv_populate.c
137
int fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/madv_populate.c
151
int fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/madv_populate.c
209
int fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/madv_populate.c
223
int fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/memory-failure.c
107
self->pagemap_fd = open(pagemap_proc, O_RDONLY);
tools/testing/selftests/mm/memory-failure.c
111
self->kpageflags_fd = open(kpageflags_proc, O_RDONLY);
tools/testing/selftests/mm/mkdirty.c
349
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/pagemap_ioctl.c
1157
fd = open(progname, O_RDONLY);
tools/testing/selftests/mm/pagemap_ioctl.c
1229
int pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/pagemap_ioctl.c
1562
pagemap_fd = open(PAGEMAP, O_RDONLY);
tools/testing/selftests/mm/pfnmap.c
120
fd = open(file, O_RDONLY);
tools/testing/selftests/mm/protection_keys.c
736
fd = open(buf, O_RDONLY);
tools/testing/selftests/mm/protection_keys.c
874
int test_fd = open("/etc/passwd", O_RDONLY);
tools/testing/selftests/mm/rmap.c
284
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/rmap.c
300
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/rmap.c
402
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/soft-dirty.c
332
pagemap_fd = open(PAGEMAP_FILE_PATH, O_RDONLY);
tools/testing/selftests/mm/split_huge_page_test.c
794
pagemap_fd = open(pagemap_proc, O_RDONLY);
tools/testing/selftests/mm/split_huge_page_test.c
798
kpageflags_fd = open(kpageflags_proc, O_RDONLY);
tools/testing/selftests/mm/thp_settings.c
51
fd = open(path, O_RDONLY);
tools/testing/selftests/mm/transhuge-stress.c
72
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/uffd-unit-tests.c
198
int fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/uffd-wp-mremap.c
359
pagemap_fd = open("/proc/self/pagemap", O_RDONLY);
tools/testing/selftests/mm/vm_util.c
162
fd = open(PMD_SIZE_FILE_PATH, O_RDONLY);
tools/testing/selftests/mm/vm_util.c
486
procmap_out->fd = open(path, O_RDONLY);
tools/testing/selftests/mm/vm_util.c
584
O_RDONLY);
tools/testing/selftests/mm/vm_util.c
612
proc_self_ksm_stat_fd = open("/proc/self/ksm_stat", O_RDONLY);
tools/testing/selftests/mm/vm_util.c
638
O_RDONLY);
tools/testing/selftests/mm/vm_util.c
657
ksm_full_scans_fd = open("/sys/kernel/mm/ksm/full_scans", O_RDONLY);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1109
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1138
attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/mount_setattr/mount_setattr_test.c
1220
ret = open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
324
ret = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
329
ret = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/move_mount_set_group/move_mount_set_group_test.c
334
ret = open(SET_GROUP_A, O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
216
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
332
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
450
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
478
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
621
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
755
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/cred_change_test.c
79
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1034
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
109
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1099
ns_fd = open("/proc/self/ns/pid", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1174
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1245
ns_fd = open("/proc/self/ns/time", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1323
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
1387
ns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
145
ns_fd = open("/proc/self/ns/ipc", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
159
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
195
ns_fd = open("/proc/self/ns/pid", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
209
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
245
ns_fd = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
259
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
295
ns_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
309
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
345
ns_fd = open("/proc/self/ns/cgroup", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
361
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
397
ns_fd = open("/proc/self/ns/time", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
40
ns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
413
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
451
ns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
515
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
54
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
580
ns_fd = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
644
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
709
ns_fd = open("/proc/self/ns/ipc", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
773
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
838
ns_fd = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
902
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
95
ns_fd = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/file_handle_test.c
967
ns_fd = open("/proc/self/ns/cgroup", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
173
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
271
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
480
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
500
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
597
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_permissions_test.c
71
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/listns_test.c
104
fd = open_by_handle_at(-10003, fh, O_RDONLY);
tools/testing/selftests/namespaces/listns_test.c
257
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/listns_test.c
369
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_test.c
520
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/listns_test.c
539
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1014
int c_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1084
int c_fd = open_by_handle_at(FD_NSFS_ROOT, c_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1101
int p_fd = open_by_handle_at(FD_NSFS_ROOT, p_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1105
int gp_fd = open_by_handle_at(FD_NSFS_ROOT, gp_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1141
int p_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1159
int c1_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
116
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1179
int c2_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1249
int c1_fd = open_by_handle_at(FD_NSFS_ROOT, c1_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1250
int c2_fd = open_by_handle_at(FD_NSFS_ROOT, c2_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1265
int p_fd = open_by_handle_at(FD_NSFS_ROOT, p_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1272
p_fd = open_by_handle_at(FD_NSFS_ROOT, p_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1279
p_fd = open_by_handle_at(FD_NSFS_ROOT, p_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1311
int u_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1329
int n_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1347
int ut_fd = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1417
int n_fd = open_by_handle_at(FD_NSFS_ROOT, n_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1418
int ut_fd = open_by_handle_at(FD_NSFS_ROOT, ut_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1436
int u_fd = open_by_handle_at(FD_NSFS_ROOT, u_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1443
u_fd = open_by_handle_at(FD_NSFS_ROOT, u_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1450
u_fd = open_by_handle_at(FD_NSFS_ROOT, u_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1484
int ua_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1501
int ub_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1518
int net_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
157
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1588
int net_fd = open_by_handle_at(FD_NSFS_ROOT, net_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1600
int ub_fd = open_by_handle_at(FD_NSFS_ROOT, ub_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1604
int ua_fd = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1610
int ub_fd2 = open_by_handle_at(FD_NSFS_ROOT, ub_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1617
int ua_fd2 = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1626
ua_fd = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1662
int p_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1681
int n1_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1703
int n2_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1782
int n1_fd = open_by_handle_at(FD_NSFS_ROOT, net1_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1783
int n2_fd = open_by_handle_at(FD_NSFS_ROOT, net2_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1806
int p_fd = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1813
p_fd = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1820
p_fd = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1852
int ua_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1870
int ub_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1924
int ub_fd = open_by_handle_at(FD_NSFS_ROOT, ub_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1936
int ua_fd = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1944
int ua_fd2 = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1952
ua_fd = open_by_handle_at(FD_NSFS_ROOT, ua_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
1983
int u_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2000
int n_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
201
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2017
int ut_fd = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2087
int n_fd = open_by_handle_at(FD_NSFS_ROOT, net_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2088
int ut_fd = open_by_handle_at(FD_NSFS_ROOT, uts_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2102
int u_fd = open_by_handle_at(FD_NSFS_ROOT, user_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2109
u_fd = open_by_handle_at(FD_NSFS_ROOT, user_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2116
u_fd = open_by_handle_at(FD_NSFS_ROOT, user_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2142
int fd = open("/proc/thread-self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2226
int nsfd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2248
nsfd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2310
int nsfd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2333
int nsfd2 = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2347
nsfd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2410
int user_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2438
int net_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
247
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2555
int user_fd = open_by_handle_at(FD_NSFS_ROOT, user_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2558
int net_fd = open_by_handle_at(FD_NSFS_ROOT, net_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2626
user_fd = open_by_handle_at(FD_NSFS_ROOT, user_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
2632
net_fd = open_by_handle_at(FD_NSFS_ROOT, net_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
278
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
337
fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
372
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
416
fd = open("/proc/self/ns/pid", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
454
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
47
fd1 = open("/proc/1/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
503
nsfd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
559
nsfd = open(proc_path, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
588
int fd2 = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
607
fd2 = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
63
fd2 = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
654
int parent_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
685
int child_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
71
fd1 = open("/proc/1/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
758
child_nsfd = open_by_handle_at(FD_NSFS_ROOT, child_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
783
int parent_fd = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
816
int parent_fd3 = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
826
parent_fd = open_by_handle_at(FD_NSFS_ROOT, parent_handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
895
fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
937
fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
978
int gp_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/ns_active_ref_test.c
996
int p_fd = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
133
fd_child_mntns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
155
fd_cgroupns = open("/proc/self/ns/cgroup", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
182
fd_parent_cgroupns = open("/proc/self/ns/cgroup", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
239
fd_child_cgroupns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
261
fd_ipcns = open("/proc/self/ns/ipc", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
288
fd_parent_ipcns = open("/proc/self/ns/ipc", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
345
fd_child_ipcns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
367
fd_utsns = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
394
fd_parent_utsns = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
451
fd_child_utsns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
473
fd_userns = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
49
fd_mntns = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
500
fd_parent_userns = open("/proc/self/ns/user", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
557
fd_child_userns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
579
fd_timens = open("/proc/self/ns/time", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
608
fd_parent_timens = open("/proc/self/ns/time", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
684
fd_child_timens = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
706
fd_pidns = open("/proc/self/ns/pid", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
733
fd_parent_pidns = open("/proc/self/ns/pid", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
76
fd_parent_mntns = open("/proc/self/ns/mnt", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
805
fd_child_pidns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
830
fd_netns = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
875
fd_parent_netns = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/nsid_test.c
943
fd_child_netns = open(path, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
1172
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
1192
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
1711
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
1761
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
1806
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
185
test_fd = open(path, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
270
netns_a_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
281
netns_b_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
319
fd = open("/dev/null", O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
391
int test_fd = open(path, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
567
current_netns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
59
current_netns_fd = open("/proc/self/ns/net", O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
917
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
940
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/namespaces/siocgskns_test.c
955
reopened_fd = open_by_handle_at(FD_NSFS_ROOT, handle, O_RDONLY);
tools/testing/selftests/net/ipsec.c
152
fd = open(netns_path, O_RDONLY);
tools/testing/selftests/net/ipv6_flowlabel.c
159
fd = open("/proc/sys/net/ipv6/auto_flowlabels", O_RDONLY);
tools/testing/selftests/net/mptcp/mptcp_connect.c
1209
fd = open(cfg_input, O_RDONLY);
tools/testing/selftests/net/mptcp/mptcp_connect.c
1375
fd_in = open(cfg_input, O_RDONLY);
tools/testing/selftests/net/mptcp/mptcp_connect.c
1398
fd_in = open(cfg_input, O_RDONLY);
tools/testing/selftests/net/mptcp/mptcp_sockopt.c
824
int fd = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/net/psock_tpacket.c
763
fd = open("/proc/kallsyms", O_RDONLY);
tools/testing/selftests/net/tcp_ao/lib/setup.c
117
fd = open(netns_path, O_RDONLY);
tools/testing/selftests/net/tcp_mmap.c
431
urandom = open("/dev/urandom", O_RDONLY);
tools/testing/selftests/net/tls.c
436
int filefd = open("/proc/self/exe", O_RDONLY);
tools/testing/selftests/net/tls.c
448
int filefd = open("/proc/self/exe", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1105
fd = open("/proc/sys/kernel/osrelease", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1149
ret = fd = open(files[i], O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1251
null = openat(dev, "null", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1266
original_ns = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1280
new_ns = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1301
new_ns = open("/proc/self/ns/uts", O_RDONLY);
tools/testing/selftests/nolibc/nolibc-test.c
1428
CASE_TEST(open_tty); EXPECT_SYSNE(1, tmp = open("/dev/null", O_RDONLY), -1); if (tmp != -1) close(tmp); break;
tools/testing/selftests/nolibc/nolibc-test.c
1429
CASE_TEST(open_blah); EXPECT_SYSER(1, tmp = open("/proc/self/blah", O_RDONLY), -1, ENOENT); if (tmp != -1) close(tmp); break;
tools/testing/selftests/nolibc/nolibc-test.c
759
ret = fd = open(dir, O_RDONLY | O_DIRECTORY, 0);
tools/testing/selftests/openat2/openat2_test.c
197
.how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
220
.how.flags = O_RDONLY,
tools/testing/selftests/openat2/openat2_test.c
226
.how.flags = O_RDONLY,
tools/testing/selftests/openat2/openat2_test.c
240
.how.flags = O_RDONLY | (1ULL << 63),
tools/testing/selftests/openat2/openat2_test.c
58
.arg.inner.flags = O_RDONLY,
tools/testing/selftests/openat2/openat2_test.c
62
.arg.inner.flags = O_RDONLY,
tools/testing/selftests/openat2/openat2_test.c
69
.arg.inner.flags = O_RDONLY, .size = 0, .err = -EINVAL },
tools/testing/selftests/openat2/openat2_test.c
71
.arg.inner.flags = O_RDONLY,
tools/testing/selftests/openat2/openat2_test.c
76
.arg.inner.flags = O_RDONLY, .arg.extra1 = 0xdeadbeef,
tools/testing/selftests/openat2/openat2_test.c
79
.arg.inner.flags = O_RDONLY, .arg.extra2 = 0xfeedcafe,
tools/testing/selftests/openat2/openat2_test.c
82
.arg.inner.flags = O_RDONLY, .arg.extra3 = 0xabad1dea,
tools/testing/selftests/openat2/resolve_test.c
131
hardcoded_fd = open("/dev/null", O_RDONLY);
tools/testing/selftests/pidfd/pidfd_bind_mount.c
103
fd_pidfd_mnt = openat(-EBADF, self->template, O_RDONLY | O_NOCTTY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_bind_mount.c
77
pidfd = open(proc_path, O_RDONLY | O_NOCTTY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_file_handle_test.c
368
O_RDONLY |
tools/testing/selftests/pidfd/pidfd_setns_test.c
119
self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_setns_test.c
269
self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_setns_test.c
282
self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_setns_test.c
295
self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_setns_test.c
365
return open(path, O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_setns_test.c
82
fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_wait.c
44
pidfd = open("/proc/self", O_DIRECTORY | O_RDONLY | O_CLOEXEC);
tools/testing/selftests/pidfd/pidfd_wait.c
52
pidfd = open("/dev/null", O_RDONLY | O_CLOEXEC);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
126
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
15
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
31
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_sysparm/papr_sysparm.c
50
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
111
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
137
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
156
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
179
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
18
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
262
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
31
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/papr_vpd/papr_vpd.c
70
const int devfd = open(DEVPATH, O_RDONLY);
tools/testing/selftests/powerpc/ptrace/core-pkey.c
294
fd = open(filename[i], O_RDONLY);
tools/testing/selftests/powerpc/utils.c
38
fd = open(path, O_RDONLY);
tools/testing/selftests/powerpc/utils.c
76
fd = open(path, O_RDONLY);
tools/testing/selftests/proc/fd-002-posix-eq.c
32
fd0 = open("/", O_DIRECTORY|O_RDONLY);
tools/testing/selftests/proc/fd-002-posix-eq.c
36
fd1 = open(buf, O_RDONLY);
tools/testing/selftests/proc/fd-002-posix-eq.c
40
fd2 = open(buf, O_RDONLY);
tools/testing/selftests/proc/fd-003-kthread.c
48
dir_fd = open(buf, O_RDONLY|O_DIRECTORY);
tools/testing/selftests/proc/fd-003-kthread.c
56
fd = openat(dir_fd, "stat", O_RDONLY);
tools/testing/selftests/proc/fd-003-kthread.c
90
fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY);
tools/testing/selftests/proc/proc-2-is-kthread.c
42
int fd = open("/proc/2/status", O_RDONLY);
tools/testing/selftests/proc/proc-empty-vm.c
220
int fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-empty-vm.c
242
int fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-empty-vm.c
265
int fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-empty-vm.c
329
int fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-empty-vm.c
373
int fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-loadavg-001.c
44
fd = open("/proc/loadavg" , O_RDONLY);
tools/testing/selftests/proc/proc-maps-race.c
493
self->maps_fd = open(fname, O_RDONLY);
tools/testing/selftests/proc/proc-net-dev-lseek.c
40
const int fd = open("/proc/net/dev", O_RDONLY);
tools/testing/selftests/proc/proc-pid-vm.c
212
fd1 = open(buf, O_RDONLY|O_CLOEXEC);
tools/testing/selftests/proc/proc-pid-vm.c
314
if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) {
tools/testing/selftests/proc/proc-pid-vm.c
366
fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-pid-vm.c
385
fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-pid-vm.c
441
fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-pid-vm.c
477
fd = open(buf, O_RDONLY);
tools/testing/selftests/proc/proc-pid-vm.c
507
fd = open(path_buf, O_RDONLY);
tools/testing/selftests/proc/proc-pidns.c
49
self->host_mntns = open("/proc/self/ns/mnt", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/proc/proc-pidns.c
70
self->host_pidns = open("/proc/self/ns/pid", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/proc/proc-pidns.c
90
self->dummy_pidns = open("/tmp/dummy/pidns", O_RDONLY|O_CLOEXEC);
tools/testing/selftests/proc/proc-self-isnt-kthread.c
25
int fd = open("/proc/self/status", O_RDONLY);
tools/testing/selftests/proc/proc-self-map-files-001.c
54
fd = open("/dev/zero", O_RDONLY);
tools/testing/selftests/proc/proc-self-map-files-002.c
60
fd = open("/dev/zero", O_RDONLY);
tools/testing/selftests/proc/proc-self-syscall.c
37
fd = open("/proc/self/syscall", O_RDONLY);
tools/testing/selftests/proc/proc-self-wchan.c
27
fd = open("/proc/self/wchan", O_RDONLY);
tools/testing/selftests/proc/proc-subset-pid.c
117
int fd = open("/proc/cpuinfo", O_RDONLY);
tools/testing/selftests/proc/proc-uptime-001.c
33
fd = open("/proc/uptime", O_RDONLY);
tools/testing/selftests/proc/proc-uptime-002.c
62
fd = open("/proc/uptime", O_RDONLY);
tools/testing/selftests/proc/read.c
109
fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY);
tools/testing/selftests/proc/read.c
45
fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK);
tools/testing/selftests/proc/setns-dcache.c
102
(void)open("/proc/net/unix", O_RDONLY);
tools/testing/selftests/proc/setns-dcache.c
116
fd = open("/proc/net/unix", O_RDONLY);
tools/testing/selftests/proc/setns-dcache.c
95
nsfd = open(buf, O_RDONLY);
tools/testing/selftests/proc/setns-sysvipc.c
101
(void)open("/proc/sysvipc/shm", O_RDONLY);
tools/testing/selftests/proc/setns-sysvipc.c
115
fd = open("/proc/sysvipc/shm", O_RDONLY);
tools/testing/selftests/proc/setns-sysvipc.c
94
nsfd = open(buf, O_RDONLY);
tools/testing/selftests/ptp/testptp.c
323
fd = open(device, readonly ? O_RDONLY : O_RDWR);
tools/testing/selftests/ptrace/vmaccess.c
39
f = open(mm, O_RDONLY);
tools/testing/selftests/ring-buffer/map_test.c
90
desc->cpu_fd = open(cpu_path, O_RDONLY | O_NONBLOCK);
tools/testing/selftests/rtc/rtctest.c
40
self->fd = open(rtc_file, O_RDONLY);
tools/testing/selftests/sched_ext/util.c
19
fd = open(path, O_RDONLY);
tools/testing/selftests/seccomp/seccomp_bpf.c
785
fd = open("/dev/zero", O_RDONLY);
tools/testing/selftests/sgx/load.c
51
fd = open(path, O_RDONLY);
tools/testing/selftests/splice/splice_read.c
23
fd = open(argv[1], O_RDONLY);
tools/testing/selftests/thermal/intel/power_floor/power_floor_test.c
68
fd = open(POWER_FLOOR_STATUS_ATTRIBUTE, O_RDONLY);
tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test.c
132
fd = open(WORKLOAD_TYPE_INDEX_ATTRIBUTE, O_RDONLY);
tools/testing/selftests/timens/clock_nanosleep.c
134
nsfd = open("/proc/self/ns/time_for_children", O_RDONLY);
tools/testing/selftests/timens/gettime_perf.c
86
nsfd = open("/proc/self/ns/time_for_children", O_RDONLY);
tools/testing/selftests/timens/procfs.c
42
parent_ns = open(path, O_RDONLY);
tools/testing/selftests/timens/procfs.c
52
child_ns = open(path, O_RDONLY);
tools/testing/selftests/timens/timens.c
64
parent_ns = open(path, O_RDONLY);
tools/testing/selftests/timens/timens.c
75
child_ns = open(path, O_RDONLY);
tools/testing/selftests/timers/clocksource-switch.c
47
fd = open("/sys/devices/system/clocksource/clocksource0/available_clocksource", O_RDONLY);
tools/testing/selftests/timers/clocksource-switch.c
79
fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_RDONLY);
tools/testing/selftests/timers/mqueue-lat.c
66
q = mq_open("/foo", O_CREAT | O_RDONLY, 0666, NULL);
tools/testing/selftests/timers/rtcpie.c
42
fd = open(default_rtc, O_RDONLY);
tools/testing/selftests/timers/rtcpie.c
54
fd = open(rtc, O_RDONLY);
tools/testing/selftests/ublk/metadata_size.c
20
fd = open(filename, O_RDONLY);
tools/testing/selftests/user_events/dyn_test.c
44
int fd = open(enable_file, O_RDONLY);
tools/testing/selftests/user_events/ftrace_test.c
111
int fd = open(enable_file, O_RDONLY);
tools/testing/selftests/user_events/ftrace_test.c
213
self->status_fd = open(status_file, O_RDONLY);
tools/testing/selftests/user_events/ftrace_test.c
29
int fd = open(trace_file, O_RDONLY);
tools/testing/selftests/vfio/vfio_pci_device_test.c
48
ASSERT_GT((__fd = open(__sysfs_path, O_RDONLY)), 0); \
tools/testing/selftests/wireguard/qemu/init.c
179
fd = open("/proc/cmdline", O_RDONLY);
tools/testing/selftests/wireguard/qemu/init.c
258
fd = open("/sys/kernel/debug/kmemleak", O_RDONLY);
tools/testing/selftests/x86/lam.c
679
int file_fd = open(path, O_RDONLY);
tools/thermal/thermometer/thermometer.c
266
fd = open(tz_path, O_RDONLY);
tools/tracing/latency/latency-collector.c
1152
trace_fd = open(debug_tracefile, O_RDONLY);
tools/tracing/latency/latency-collector.c
1641
ufd = open(DEV_URANDOM, O_RDONLY);
tools/tracing/rtla/src/timerlat_u.c
78
timerlat_fd = tracefs_instance_file_open(NULL, buffer, O_RDONLY);
tools/tracing/rtla/src/trace.c
80
in_fd = tracefs_instance_file_open(inst, file, O_RDONLY);
tools/tracing/rtla/src/utils.c
306
comm_fd = open(buffer, O_RDONLY);
tools/tracing/rtla/src/utils.c
748
fd = open(path, O_RDONLY);
tools/usb/usbip/libsrc/usbip_host_common.c
46
fd = open(status_attr_path, O_RDONLY);
tools/virtio/virtio-trace/trace-agent-ctl.c
36
ctl_fd = open(ctl_path, O_RDONLY);
tools/virtio/virtio-trace/trace-agent-rw.c
49
rw_ti->in_fd = open(in_path, O_RDONLY);
usr/gen_init_cpio.c
374
file = open (location, O_RDONLY);
virt/kvm/kvm_main.c
4327
O_RDONLY, FMODE_PREAD);
virt/kvm/kvm_main.c
5134
&kvm_vm_stats_fops, kvm, O_RDONLY, FMODE_PREAD);