Home
last modified time | relevance | path

Searched full:dfd (Results 1 – 25 of 45) sorted by relevance

12

/Linux-v5.10/fs/
Dutimes.c78 static int do_utimes_path(int dfd, const char __user *filename, in do_utimes_path() argument
93 error = user_path_at(dfd, filename, lookup_flags, &path); in do_utimes_path()
125 * @dfd: open file descriptor, -1 or AT_FDCWD
130 * If filename is NULL and dfd refers to an open file, then operate on
131 * the file. Otherwise look up filename, possibly using dfd as a
138 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument
141 if (filename == NULL && dfd != AT_FDCWD) in do_utimes()
142 return do_utimes_fd(dfd, times, flags); in do_utimes()
143 return do_utimes_path(dfd, filename, times, flags); in do_utimes()
146 SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE4() argument
[all …]
Dstat.c153 * @dfd: A file descriptor representing the base dir for a relative filename
166 static int vfs_statx(int dfd, const char __user *filename, int flags, in vfs_statx() argument
185 error = user_path_at(dfd, filename, lookup_flags, &path); in vfs_statx()
204 int vfs_fstatat(int dfd, const char __user *filename, in vfs_fstatat() argument
207 return vfs_statx(dfd, filename, flags | AT_NO_AUTOMOUNT, in vfs_fstatat()
370 SYSCALL_DEFINE4(newfstatat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE4() argument
376 error = vfs_fstatat(dfd, filename, &stat, flag); in SYSCALL_DEFINE4()
395 static int do_readlinkat(int dfd, const char __user *pathname, in do_readlinkat() argument
407 error = user_path_at_empty(dfd, pathname, lookup_flags, &path, &empty); in do_readlinkat()
431 SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname, in SYSCALL_DEFINE4() argument
[all …]
Dinternal.h74 extern int filename_lookup(int dfd, struct filename *name, unsigned flags,
78 long do_rmdir(int dfd, struct filename *name);
79 long do_unlinkat(int dfd, struct filename *name);
130 extern struct file *do_filp_open(int dfd, struct filename *pathname,
139 int do_fchownat(int dfd, const char __user *filename, uid_t user, gid_t group,
195 int do_statx(int dfd, const char __user *filename, unsigned flags,
Dopen.c397 static long do_faccessat(int dfd, const char __user *filename, int mode, int flags) in do_faccessat() argument
423 res = user_path_at(dfd, filename, lookup_flags, &path); in do_faccessat()
469 SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) in SYSCALL_DEFINE3() argument
471 return do_faccessat(dfd, filename, mode, 0); in SYSCALL_DEFINE3()
474 SYSCALL_DEFINE4(faccessat2, int, dfd, const char __user *, filename, int, mode, in SYSCALL_DEFINE4() argument
477 return do_faccessat(dfd, filename, mode, flags); in SYSCALL_DEFINE4()
613 static int do_fchmodat(int dfd, const char __user *filename, umode_t mode) in do_fchmodat() argument
619 error = user_path_at(dfd, filename, lookup_flags, &path); in do_fchmodat()
631 SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, in SYSCALL_DEFINE3() argument
634 return do_fchmodat(dfd, filename, mode); in SYSCALL_DEFINE3()
[all …]
Dnamei.c521 int dfd; member
526 static void set_nameidata(struct nameidata *p, int dfd, struct filename *name) in set_nameidata() argument
530 p->dfd = dfd; in set_nameidata()
649 * for these lookups (nd->dfd is the root, not the filesystem root). in legitimize_root()
2242 /* Absolute pathname -- fetch the root (LOOKUP_IN_ROOT uses nd->dfd). */ in path_init()
2251 if (nd->dfd == AT_FDCWD) { in path_init()
2268 struct fd f = fdget_raw(nd->dfd); in path_init()
2355 int filename_lookup(int dfd, struct filename *name, unsigned flags, in filename_lookup() argument
2366 set_nameidata(&nd, dfd, name); in filename_lookup()
2398 static struct filename *filename_parentat(int dfd, struct filename *name, in filename_parentat() argument
[all …]
Dfhandle.c82 * @dfd: directory relative to which name is interpreted if not absolute
93 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-v5.10/tools/testing/selftests/openat2/
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()
Dresolve_test.c49 int dfd, tmpfd; in setup_testdir() local
59 dfd = open(dirname, O_PATH | O_DIRECTORY); in setup_testdir()
60 if (dfd < 0) in setup_testdir()
64 E_mkdirat(dfd, "root", 0755); in setup_testdir()
65 tmpfd = openat(dfd, "root", O_PATH | O_DIRECTORY); in setup_testdir()
68 close(dfd); in setup_testdir()
69 dfd = tmpfd; in setup_testdir()
71 E_symlinkat("/proc/self/exe", dfd, "procexe"); in setup_testdir()
72 E_symlinkat("/proc/self/root", dfd, "procroot"); in setup_testdir()
73 E_mkdirat(dfd, "root", 0755); in setup_testdir()
[all …]
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 …]
Dhelpers.h94 int raw_openat2(int dfd, const char *path, void *how, size_t size);
95 int sys_openat2(int dfd, const char *path, struct open_how *how);
96 int sys_openat(int dfd, const char *path, struct open_how *how);
100 int touchat(int dfd, const char *path);
102 bool fdequal(int fd, int dfd, const char *path);
/Linux-v5.10/Documentation/trace/
Dkprobetrace.rst161 p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)
165 p:myprobe,do_sys_open,dfd=%ax,filename=%dx,flags=%cx,mode=+4($stack)
173 …echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/debug/tr…
202 field:unsigned long dfd; offset:20; size:4; signed:0;
208 print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->__probe_ip,
209 REC->dfd, REC->filename, REC->flags, REC->mode
247 …<...>-1447 [001] 1038282.286875: myprobe: (do_sys_open+0x0/0xd6) dfd=3 filename=7fffd1ec4440 flag…
249 …<...>-1447 [001] 1038282.286885: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=40413c fla…
251 …<...>-1447 [001] 1038282.286969: myprobe: (do_sys_open+0x0/0xd6) dfd=ffffff9c filename=4041c6 fla…
/Linux-v5.10/arch/powerpc/platforms/cell/spufs/
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-v5.10/include/linux/
Dsyscalls.h393 asmlinkage long sys_mknodat(int dfd, const char __user * filename, umode_t mode,
395 asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, umode_t mode);
396 asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag);
429 asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode);
430 asmlinkage long sys_faccessat2(int dfd, const char __user *filename, int mode,
436 asmlinkage long sys_fchmodat(int dfd, const char __user * filename,
438 asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user,
441 asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
443 asmlinkage long sys_openat2(int dfd, const char __user *filename,
516 asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
[all …]
Dnamei.h56 static inline int user_path_at(int dfd, const char __user *name, unsigned flags, in user_path_at() argument
59 return user_path_at_empty(dfd, name, flags, path, NULL); in user_path_at()
/Linux-v5.10/arch/parisc/kernel/
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-v5.10/fs/notify/fanotify/
Dfanotify_user.c665 static int fanotify_find_path(int dfd, const char __user *filename, in fanotify_find_path() argument
671 pr_debug("%s: dfd=%d filename=%p flags=%x\n", __func__, in fanotify_find_path()
672 dfd, filename, flags); in fanotify_find_path()
675 struct fd f = fdget(dfd); in fanotify_find_path()
699 ret = user_path_at(dfd, filename, lookup_flags, path); in fanotify_find_path()
1110 int dfd, const char __user *pathname) in do_fanotify_mark() argument
1125 pr_debug("%s: fanotify_fd=%d flags=%x dfd=%d pathname=%p mask=%llx\n", in do_fanotify_mark()
1126 __func__, fanotify_fd, flags, dfd, pathname, mask); in do_fanotify_mark()
1215 ret = fanotify_find_path(dfd, pathname, &path, flags, in do_fanotify_mark()
1289 __u64, mask, int, dfd, in SYSCALL_DEFINE5() argument
[all …]
/Linux-v5.10/arch/sparc/kernel/
Dsystbls.h65 asmlinkage long compat_sys_fstatat64(unsigned int dfd,
98 asmlinkage long compat_sys_fstatat64(unsigned int dfd,
Dsys_sparc32.c127 COMPAT_SYSCALL_DEFINE4(fstatat64, unsigned int, dfd, in COMPAT_SYSCALL_DEFINE4() argument
134 error = vfs_fstatat(dfd, filename, &stat, flag); in COMPAT_SYSCALL_DEFINE4()
/Linux-v5.10/tools/testing/selftests/exec/
Dexecveat.c263 /* dfd + path */ in run_tests()
269 /* absolute path with nonsense dfd */ in run_tests()
296 /* dfd + path */ in run_tests()
307 /* dfd + path */ in run_tests()
321 /* dfd + path */ in run_tests()
/Linux-v5.10/tools/perf/Documentation/
Dperf-trace.txt287 2272.992 ( 0.037 ms): gnome-shell/1370 openat(dfd: CWD, filename: /proc/self/stat) = 31
288 2277.481 ( 0.139 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
289 3026.398 ( 0.076 ms): gnome-shell/3039 openat(dfd: CWD, filename: /proc/self/stat) = 65
290 4294.665 ( 0.015 ms): sed/15879 openat(dfd: CWD, filename: /etc/ld.so.cache, flags: CLOEXEC) = 3
/Linux-v5.10/tools/perf/examples/bpf/
Dsys_enter_openat.c22 long dfd; member
Detcsnoop.c58 long dfd; member
/Linux-v5.10/tools/perf/tests/shell/
Dtrace+probe_vfs_getname.sh25 …egrep " +[0-9]+\.[0-9]+ +\( +[0-9]+\.[0-9]+ ms\): +touch\/[0-9]+ open(at)?\((dfd: +CWD, +)?filenam…
/Linux-v5.10/arch/x86/kernel/
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()
/Linux-v5.10/samples/vfs/
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()

12