Home
last modified time | relevance | path

Searched refs:dfd (Results 1 – 25 of 41) sorted by relevance

12

/linux-6.3-rc2/tools/testing/selftests/openat2/
A Drename_attack_test.c37 int dfd; in setup_testdir() local
43 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
44 if (dfd < 0) in setup_testdir()
47 E_mkdirat(dfd, "a", 0755); in setup_testdir()
48 E_mkdirat(dfd, "b", 0755); in setup_testdir()
49 E_mkdirat(dfd, "a/c", 0755); in setup_testdir()
51 return dfd; in setup_testdir()
86 int dfd, afd; in test_rename_attack() local
101 dfd = setup_testdir(); in test_rename_attack()
102 afd = openat(dfd, "a", O_PATH); in test_rename_attack()
[all …]
A Dresolve_test.c49 int dfd, tmpfd; in setup_testdir() local
60 if (dfd < 0) in setup_testdir()
68 close(dfd); in setup_testdir()
69 dfd = tmpfd; in setup_testdir()
76 E_mkdirat(dfd, "mnt", 0755); in setup_testdir()
77 E_fchdir(dfd); in setup_testdir()
82 E_mkdirat(dfd, "etc", 0755); in setup_testdir()
106 return dfd; in setup_testdir()
442 int dfd, fd; in test_openat2_opath_tests() local
461 dfd = dup(rootfd); in test_openat2_opath_tests()
[all …]
A Dhelpers.c22 int raw_openat2(int dfd, const char *path, void *how, size_t size) in raw_openat2() argument
24 int ret = syscall(__NR_openat2, dfd, path, how, size); in raw_openat2()
28 int sys_openat2(int dfd, const char *path, struct open_how *how) in sys_openat2() argument
30 return raw_openat2(dfd, path, how, sizeof(*how)); in sys_openat2()
33 int sys_openat(int dfd, const char *path, struct open_how *how) in sys_openat() argument
35 int ret = openat(dfd, path, how->flags, how->mode); in sys_openat()
47 int touchat(int dfd, const char *path) in touchat() argument
49 int fd = openat(dfd, path, O_CREAT, 0700); in touchat()
71 bool fdequal(int fd, int dfd, const char *path) in fdequal() argument
77 dfdpath = fdreadlink(dfd); in fdequal()
A Dhelpers.h96 int raw_openat2(int dfd, const char *path, void *how, size_t size);
97 int sys_openat2(int dfd, const char *path, struct open_how *how);
98 int sys_openat(int dfd, const char *path, struct open_how *how);
102 int touchat(int dfd, const char *path);
104 bool fdequal(int fd, int dfd, const char *path);
/linux-6.3-rc2/fs/
A Dutimes.c80 static int do_utimes_path(int dfd, const char __user *filename, in do_utimes_path() argument
95 error = user_path_at(dfd, filename, lookup_flags, &path); in do_utimes_path()
143 if (filename == NULL && dfd != AT_FDCWD) in do_utimes()
144 return do_utimes_fd(dfd, times, flags); in do_utimes()
145 return do_utimes_path(dfd, filename, times, flags); in do_utimes()
199 return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0); in do_futimesat()
206 return do_futimesat(dfd, filename, utimes); in SYSCALL_DEFINE3()
264 return do_utimes(dfd, filename, t ? tv : NULL, flags); in SYSCALL_DEFINE4()
285 return do_utimes(dfd, filename, t ? tv : NULL, 0); in do_compat_futimesat()
288 SYSCALL_DEFINE3(futimesat_time32, unsigned int, dfd, in SYSCALL_DEFINE3() argument
[all …]
A Dinternal.h60 extern int filename_lookup(int dfd, struct filename *name, unsigned flags,
64 int do_rmdir(int dfd, struct filename *name);
65 int do_unlinkat(int dfd, struct filename *name);
69 int do_mkdirat(int dfd, struct filename *name, umode_t mode);
135 extern struct file *do_filp_open(int dfd, struct filename *pathname,
145 int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
196 int do_statx(int dfd, struct filename *filename, unsigned int flags,
A Dstat.c268 int vfs_fstatat(int dfd, const char __user *filename, in vfs_fstatat() argument
276 ret = vfs_statx(dfd, name, statx_flags, stat, STATX_BASIC_STATS); in vfs_fstatat()
446 error = vfs_fstatat(dfd, filename, &stat, flag); in SYSCALL_DEFINE4()
465 static int do_readlinkat(int dfd, const char __user *pathname, in do_readlinkat() argument
504 return do_readlinkat(dfd, pathname, buf, bufsiz); in SYSCALL_DEFINE4()
597 error = vfs_fstatat(dfd, filename, &stat, flag); in SYSCALL_DEFINE4()
659 error = vfs_statx(dfd, filename, flags, &stat, mask); in do_statx()
678 int, dfd, const char __user *, filename, unsigned, flags, in SYSCALL_DEFINE5() argument
686 ret = do_statx(dfd, name, flags, mask, buffer); in SYSCALL_DEFINE5()
753 COMPAT_SYSCALL_DEFINE4(newfstatat, unsigned int, dfd, in COMPAT_SYSCALL_DEFINE4() argument
[all …]
A Dopen.c483 res = user_path_at(dfd, filename, lookup_flags, &path); in do_faccessat()
531 return do_faccessat(dfd, filename, mode, 0); in SYSCALL_DEFINE3()
537 return do_faccessat(dfd, filename, mode, flags); in SYSCALL_DEFINE4()
680 error = user_path_at(dfd, filename, lookup_flags, &path); in do_fchmodat()
695 return do_fchmodat(dfd, filename, mode); in SYSCALL_DEFINE3()
820 return do_fchownat(dfd, filename, user, group, flag); in SYSCALL_DEFINE5()
1348 struct file *f = do_filp_open(dfd, tmp, &op); in do_sys_openat2()
1364 return do_sys_openat2(dfd, filename, &how); in do_sys_open()
1380 return do_sys_open(dfd, filename, flags, mode); in SYSCALL_DEFINE4()
1405 return do_sys_openat2(dfd, filename, &tmp); in SYSCALL_DEFINE4()
[all …]
A Dnamei.c584 int dfd; member
598 p->dfd = dfd; in __set_nameidata()
610 __set_nameidata(p, dfd, name); in set_nameidata()
2392 if (nd->dfd == AT_FDCWD) { in path_init()
2409 struct fd f = fdget_raw(nd->dfd); in path_init()
2503 set_nameidata(&nd, dfd, name, root); in filename_lookup()
2544 set_nameidata(&nd, dfd, name, NULL); in filename_parentat()
3741 set_nameidata(&nd, dfd, pathname, NULL); in do_filp_open()
4139 int do_rmdir(int dfd, struct filename *name) in do_rmdir() argument
4358 return do_rmdir(dfd, getname(pathname)); in SYSCALL_DEFINE3()
[all …]
A Dfhandle.c93 SYSCALL_DEFINE5(name_to_handle_at, int, dfd, const char __user *, name, in SYSCALL_DEFINE5() argument
107 err = user_path_at(dfd, name, lookup_flags, &path); in SYSCALL_DEFINE5()
/linux-6.3-rc2/io_uring/
A Dfs.c29 int dfd; member
36 int dfd; member
114 un->dfd = READ_ONCE(sqe->fd); in io_unlinkat_prep()
138 ret = do_rmdir(un->dfd, un->filename); in io_unlinkat()
140 ret = do_unlinkat(un->dfd, un->filename); in io_unlinkat()
164 mkd->dfd = READ_ONCE(sqe->fd); in io_mkdirat_prep()
184 ret = do_mkdirat(mkd->dfd, mkd->filename, mkd->mode); in io_mkdirat()
A Dstatx.c16 int dfd; member
33 sx->dfd = READ_ONCE(sqe->fd); in io_statx_prep()
62 ret = do_statx(sx->dfd, sx->filename, sx->flags, sx->mask, sx->buffer); in io_statx()
A Dopenclose.c21 int dfd; member
58 open->dfd = READ_ONCE(sqe->fd); in __io_openat_prep()
133 file = do_filp_open(open->dfd, open->filename, &op); in io_openat2()
/linux-6.3-rc2/arch/powerpc/platforms/cell/spufs/
A Dcoredump.c24 static int spufs_ctx_note_size(struct spu_context *ctx, int dfd) in spufs_ctx_note_size() argument
34 sprintf(fullname, "SPU/%d/%s", dfd, name); in spufs_ctx_note_size()
116 struct coredump_params *cprm, int dfd) in spufs_arch_write_note() argument
123 sprintf(fullname, "SPU/%d/%s", dfd, spufs_coredump_read[i].name); in spufs_arch_write_note()
/linux-6.3-rc2/arch/parisc/kernel/
A Dsys_parisc32.c28 compat_uint_t mask0, compat_uint_t mask1, compat_int_t dfd, in sys32_fanotify_mark() argument
33 dfd, pathname); in sys32_fanotify_mark()
/linux-6.3-rc2/include/linux/
A Dsyscalls.h467 asmlinkage long sys_fchmodat(int dfd, const char __user * filename,
474 asmlinkage long sys_openat2(int dfd, const char __user *filename,
551 asmlinkage long sys_newfstatat(int dfd, const char __user *filename,
556 asmlinkage long sys_fstatat64(int dfd, const char __user *filename,
582 asmlinkage long sys_utimensat(int dfd, const char __user *filename,
585 asmlinkage long sys_utimensat_time32(unsigned int dfd,
967 asmlinkage long sys_name_to_handle_at(int dfd, const char __user *name,
1013 asmlinkage long sys_execveat(int dfd, const char __user *filename,
1040 asmlinkage long sys_mount_setattr(int dfd, const char __user *path,
1144 asmlinkage long sys_futimesat(int dfd, const char __user *filename,
[all …]
A Dnamei.h54 static inline int user_path_at(int dfd, const char __user *name, unsigned flags, in user_path_at() argument
57 return user_path_at_empty(dfd, name, flags, path, NULL); in user_path_at()
/linux-6.3-rc2/Documentation/trace/
A Dkprobetrace.rst170 p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)
174 p:myprobe,do_sys_open,dfd=%ax,filename=%dx,flags=%cx,mode=+4($stack)
182 …echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/tracing/…
211 field:unsigned long dfd; offset:20; size:4; signed:0;
217 print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->__probe_ip,
218 REC->dfd, REC->filename, REC->flags, REC->mode
256 …<...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) dfd=3 filename=7fffd1ec4440 flag…
258 …<...>-1447 [001] 1038282.286885: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=40413c fla…
260 …<...>-1447 [001] 1038282.286969: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=4041c6 fla…
/linux-6.3-rc2/tools/testing/selftests/mount_setattr/
A Dmount_setattr_test.c136 static inline int sys_mount_setattr(int dfd, const char *path, unsigned int flags, in sys_mount_setattr() argument
139 return syscall(__NR_mount_setattr, dfd, path, flags, attr, size); in sys_mount_setattr()
154 static inline int sys_open_tree(int dfd, const char *filename, unsigned int flags) in sys_open_tree() argument
156 return syscall(__NR_open_tree, dfd, filename, flags); in sys_open_tree()
666 int fd, dfd; in TEST_F() local
710 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
711 ASSERT_GE(dfd, 0); in TEST_F()
712 EXPECT_EQ(fsync(dfd), 0); in TEST_F()
713 EXPECT_EQ(close(dfd), 0); in TEST_F()
1390 static bool expected_uid_gid(int dfd, const char *path, int flags, in expected_uid_gid() argument
[all …]
/linux-6.3-rc2/Documentation/devicetree/bindings/pinctrl/
A Dmediatek,mt7981-pinctrl.yaml88 "dfd" "dfd" 0, 1, 4, 5
101 "dfd_ntrst" "dfd" 8
159 enum: [wa_aice, dfd, jtag, pta, pcm, udi, usb, ant, eth, i2c, led,
181 const: dfd
185 enum: [dfd, dfd_ntrst]
/linux-6.3-rc2/arch/sparc/kernel/
A Dsystbls.h65 asmlinkage long compat_sys_fstatat64(unsigned int dfd,
98 asmlinkage long compat_sys_fstatat64(unsigned int dfd,
/linux-6.3-rc2/tools/perf/examples/bpf/
A Dsys_enter_openat.c22 long dfd; member
/linux-6.3-rc2/fs/notify/fanotify/
A Dfanotify_user.c992 static int fanotify_find_path(int dfd, const char __user *filename, in fanotify_find_path() argument
999 dfd, filename, flags); in fanotify_find_path()
1002 struct fd f = fdget(dfd); in fanotify_find_path()
1026 ret = user_path_at(dfd, filename, lookup_flags, path); in fanotify_find_path()
1634 int dfd, const char __user *pathname) in do_fanotify_mark() argument
1651 __func__, fanotify_fd, flags, dfd, pathname, mask); in do_fanotify_mark()
1781 ret = fanotify_find_path(dfd, pathname, &path, flags, in do_fanotify_mark()
1867 __u64, mask, int, dfd, in SYSCALL_DEFINE5() argument
1870 return do_fanotify_mark(fanotify_fd, flags, mask, dfd, pathname); in SYSCALL_DEFINE5()
1877 SC_ARG64(mask), int, dfd, in SYSCALL32_DEFINE6() argument
[all …]
/linux-6.3-rc2/samples/vfs/
A Dtest-statx.c42 ssize_t statx(int dfd, const char *filename, unsigned flags, in statx() argument
45 return syscall(__NR_statx, dfd, filename, flags, mask, buffer); in statx()
/linux-6.3-rc2/arch/x86/kernel/
A Dsys_ia32.c195 COMPAT_SYSCALL_DEFINE4(ia32_fstatat64, unsigned int, dfd, in COMPAT_SYSCALL_DEFINE4() argument
202 error = vfs_fstatat(dfd, filename, &stat, flag); in COMPAT_SYSCALL_DEFINE4()

Completed in 66 milliseconds

12