| /linux/tools/include/nolibc/ |
| H A D | fcntl.h | 32 * int openat(int dirfd, const char *path, int flags[, mode_t mode]); in openat() 36 int _sys_openat(int dirfd, const char *path, int flags, mode_t mode) in openat() 38 return __nolibc_syscall4(__NR_openat, dirfd, path, flags, mode); in openat() 42 int openat(int dirfd, const char *path, int flags, ...) 44 return __sysret(_sys_openat(dirfd, path, __nolibc_open_flags(flags), 22 sys_openat(int dirfd,const char * path,int flags,mode_t mode) sys_openat() argument 28 openat(int dirfd,const char * path,int flags,...) openat() argument
|
| /linux/tools/perf/tests/ |
| H A D | pmu.c | 66 int dirfd, file; in test_pmu_get() local 77 dirfd = open(dir, O_DIRECTORY); in test_pmu_get() 78 if (dirfd < 0) { in test_pmu_get() 84 if (mkdirat(dirfd, "perf-pmu-test", 0755) < 0) { in test_pmu_get() 88 file = openat(dirfd, "perf-pmu-test/type", O_WRONLY | O_CREAT, 0600); in test_pmu_get() 102 if (mkdirat(dirfd, "perf-pmu-test/format", 0755) < 0) { in test_pmu_get() 113 file = openat(dirfd, name, O_WRONLY | O_CREAT, 0600); in test_pmu_get() 128 if (mkdirat(dirfd, "perf-pmu-test/events", 0755) < 0) { in test_pmu_get() 132 file = openat(dirfd, "perf-pmu-test/events/test-event", O_WRONLY | O_CREAT, 0600); in test_pmu_get() 146 pmu = perf_pmus__add_test_pmu(dirfd, "per in test_pmu_get() [all...] |
| H A D | builtin-test.c | 210 if (fd <= 3 || fd == dirfd(dir)) in check_leaks() 240 if (fd <= 3 || fd == dirfd(dir)) in test_suite__num_test_cases() 244 len = readlinkat(dirfd(dir), ent->d_name, path, sizeof(path)); in skip_reason()
|
| /linux/tools/testing/selftests/proc/ |
| H A D | read.c | 45 fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK); in f_reg() 60 fd = openat(dirfd(d), filename, O_WRONLY); in f_reg_write() 73 rv = readlinkat(dirfd(d), filename, buf, sizeof(buf)); in f_lnk() 109 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY); in f() 137 if (fstatfs(dirfd(d), &sfs) == -1) { in main()
|
| H A D | fd-003-kthread.c | 116 static inline int sys_statx(int dirfd, const char *pathname, int flags, in sys_statx() argument 119 return syscall(SYS_statx, dirfd, pathname, flags, mask, stx); in sys_statx()
|
| H A D | fd-001-lookup.c | 136 if (fd == dirfd(d)) in main()
|
| H A D | proc-pid-vm.c | 56 static inline long sys_execveat(int dirfd, const char *pathname, char **argv, char **envp, int flag… in sys_execveat() argument 58 return syscall(SYS_execveat, dirfd, pathname, argv, envp, flags); in sys_execveat()
|
| /linux/tools/perf/arch/x86/util/ |
| H A D | intel-pt.c | 195 int dirfd; in intel_pt_default_config() 197 dirfd = perf_pmu__event_source_devices_fd(); in intel_pt_default_config() 201 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc", "%d", in intel_pt_default_config() 206 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc_periods", "%x", in intel_pt_default_config() 216 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_cyc", "%d", in intel_pt_default_config() 221 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_periods", "%x", in intel_pt_default_config() 231 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/pt", "%c", &c) == 1 && in intel_pt_default_config() 232 perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/branch", "%c", &c) == 1) in intel_pt_default_config() 239 close(dirfd); 495 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, int dirfd, in intel_pt_val_config_term() 192 int dirfd; intel_pt_default_config() local 491 intel_pt_val_config_term(struct perf_pmu * intel_pt_pmu,int dirfd,const char * caps,const char * name,const char * supported,u64 config) intel_pt_val_config_term() argument 534 int err, dirfd; intel_pt_validate_config() local [all...] |
| /linux/tools/testing/selftests/openat2/ |
| H A D | rename_attack_test.c | |
| /linux/tools/perf/util/ |
| H A D | tp_pmu.c | 42 if (evt_dir.dirfd < 0) { in tp_pmu__for_each_tp_event() 60 close(evt_dir.dirfd); in tp_pmu__for_each_tp_event() 75 if (events_dir.dirfd < 0) { in tp_pmu__for_each_tp_sys() 92 close(events_dir.dirfd); in tp_pmu__for_each_tp_sys()
|
| H A D | pmu.c | 190 static int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load) in perf_pmu__format_parse() argument 196 io_dir__init(&format_dir, dirfd); in perf_pmu__format_parse() 213 int fd = openat(dirfd, name, O_RDONLY); in perf_pmu__format_parse() 229 close(format_dir.dirfd); in perf_pmu__format_parse() 238 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name, bool eager_load) in pmu_format() argument 242 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY); in pmu_format() 809 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *pmu_name, bool is_core) in pmu_cpumask() argument 826 io.fd = perf_pmu__pathname_fd(dirfd, pmu_name, *template, O_RDONLY); in pmu_cpumask() 846 static bool pmu_is_uncore(int dirfd, const char *name) in pmu_is_uncore() argument 850 fd = perf_pmu__pathname_fd(dirfd, nam in pmu_is_uncore() 1126 pmu_find_alias_name(struct perf_pmu * pmu,int dirfd) pmu_find_alias_name() argument 1149 pmu_max_precise(int dirfd,struct perf_pmu * pmu) pmu_max_precise() argument 1225 perf_pmu__lookup(struct list_head * pmus,int dirfd,const char * name,bool eager_load) perf_pmu__lookup() argument 2403 perf_pmu__open_file_at(const struct perf_pmu * pmu,int dirfd,const char * name) perf_pmu__open_file_at() argument 2431 perf_pmu__scan_file_at(const struct perf_pmu * pmu,int dirfd,const char * name,const char * fmt,...) perf_pmu__scan_file_at() argument 2685 perf_pmu__pathname_fd(int dirfd,const char * pmu_name,const char * filename,int flags) perf_pmu__pathname_fd() argument [all...] |
| H A D | pmu.h | 309 FILE *perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name); 313 int perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name, 343 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags); 346 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *lookup_name,
|
| H A D | pmus.c | 149 int dirfd; in perf_pmus__find() local 171 dirfd = perf_pmu__event_source_devices_fd(); in perf_pmus__find() 172 pmu = perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name, in perf_pmus__find() 174 close(dirfd); in perf_pmus__find() 201 static struct perf_pmu *perf_pmu__find2(int dirfd, const char *name) in perf_pmu__find2() 222 return perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name, in perf_pmu__find2() 199 perf_pmu__find2(int dirfd,const char * name) perf_pmu__find2() argument
|
| H A D | hwmon_pmu.c | 251 if (dir.dirfd < 0) in hwmon_pmu__read_events() 287 int fd = openat(dir.dirfd, ent->d_name, O_RDONLY); in hwmon_pmu__read_events() 345 close(dir.dirfd); in hwmon_pmu__new() 722 if (class_hwmon_dir.dirfd < 0) in perf_pmus__read_hwmon_pmus() 756 close(class_hwmon_dir.dirfd);
|
| H A D | util.h | 60 int scandirat(int dirfd, const char *dirp,
|
| H A D | util.c | 535 int scandirat(int dirfd, const char *dirp, in scandirat() 541 int err, fd = openat(dirfd, dirp, O_PATH); in scandirat() 533 scandirat(int dirfd,const char * dirp,struct dirent *** namelist,int (* filter)(const struct dirent *),int (* compar)(const struct dirent **,const struct dirent **)) scandirat() argument
|
| /linux/samples/check-exec/ |
| H A D | inc.c | 27 static int sys_execveat(int dirfd, const char *pathname, char *const argv[], in sys_execveat() argument 30 return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); in sys_execveat()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | cgroup_helpers.c | 475 int dirfd, err, flags, mount_id, fhsize; in get_cgroup_id_from_path() local 483 dirfd = AT_FDCWD; in get_cgroup_id_from_path() 491 err = name_to_handle_at(dirfd, cgroup_workdir, fhp, &mount_id, flags); in get_cgroup_id_from_path() 503 err = name_to_handle_at(dirfd, cgroup_workdir, fhp2, &mount_id, flags); in get_cgroup_id_from_path()
|
| /linux/tools/testing/selftests/pidfd/ |
| H A D | pidfd.h | 308 static inline int sys_execveat(int dirfd, const char *pathname, in sys_execveat() 312 return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); 303 sys_execveat(int dirfd,const char * pathname,char * const argv[],char * const envp[],int flags) sys_execveat() argument
|
| /linux/tools/testing/selftests/iommu/ |
| H A D | iommufd_fail_nth.c | 68 if (writeat(dirfd(debugfs), "failslab/ignore-gfp-wait", "N")) in setup_fault_injection() 70 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-wait", "N"); in setup_fault_injection() 71 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-highmem", "N"); in setup_fault_injection() 81 writeat(dirfd(debugfs), fn, "0"); in setup_fault_injection()
|
| /linux/fs/ |
| H A D | fsopen.c | 446 param.dirfd = aux; in SYSCALL_DEFINE5() 455 param.dirfd = aux; in SYSCALL_DEFINE5()
|
| /linux/tools/testing/selftests/exec/ |
| H A D | check-exec.c | 35 static int sys_execveat(int dirfd, const char *pathname, char *const argv[], in sys_execveat() argument 38 return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); in sys_execveat()
|
| /linux/tools/testing/selftests/landlock/ |
| H A D | fs_test.c | 67 static int sys_execveat(int dirfd, const char *pathname, char *const argv[], in sys_execveat() 70 return syscall(__NR_execveat, dirfd, pathname, argv, envp, flags); 433 static int test_open_rel(const int dirfd, const char *const path, in test_open_rel() 439 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel() 1811 int dirfd, ruleset_fd; in TEST_F_FORK() 1838 dirfd = open(dir_s1d2, O_DIRECTORY); 1839 ASSERT_LE(0, dirfd); 1843 dirfd = AT_FDCWD; in TEST_F_FORK() 1851 dirfd = AT_FDCWD; in TEST_F_FORK() 1859 dirfd in TEST_F_FORK() 63 sys_execveat(int dirfd,const char * pathname,char * const argv[],char * const envp[],int flags) sys_execveat() argument 429 test_open_rel(const int dirfd,const char * const path,const int flags) test_open_rel() argument 1907 int dirfd, ruleset_fd; test_relative_path() local [all...] |
| /linux/tools/power/cpupower/lib/ |
| H A D | powercap.c | 225 if (fstatat(dirfd(zone_dir), dent->d_name, &st, 0) < 0) in powercap_read_zone()
|
| /linux/include/linux/ |
| H A D | fs_context.h | 73 int dirfd; member
|