/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, "perf-pmu-test"); in test_pmu_get() [all …]
|
/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 | 52 static inline long sys_execveat(int dirfd, const char *pathname, char **argv, char **envp, int flag… in sys_execveat() argument 54 return syscall(SYS_execveat, dirfd, pathname, argv, envp, flags); in sys_execveat()
|
/linux/tools/perf/arch/x86/util/ |
H A D | intel-pt.c | 189 int dirfd; in intel_pt_default_config() local 191 dirfd = perf_pmu__event_source_devices_fd(); in intel_pt_default_config() 195 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc", "%d", in intel_pt_default_config() 200 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc_periods", "%x", in intel_pt_default_config() 210 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_cyc", "%d", in intel_pt_default_config() 215 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_periods", "%x", in intel_pt_default_config() 225 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/pt", "%c", &c) == 1 && in intel_pt_default_config() 226 perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/branch", "%c", &c) == 1) in intel_pt_default_config() 233 close(dirfd); in intel_pt_default_config() 488 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, int dirfd, in intel_pt_val_config_term() argument [all …]
|
/linux/tools/perf/util/ |
H A D | pmu.c | 193 static int perf_pmu__format_parse(struct perf_pmu *pmu, int dirfd, bool eager_load) in perf_pmu__format_parse() argument 199 format_dir = fdopendir(dirfd); in perf_pmu__format_parse() 218 int fd = openat(dirfd, name, O_RDONLY); in perf_pmu__format_parse() 243 static int pmu_format(struct perf_pmu *pmu, int dirfd, const char *name, bool eager_load) in pmu_format() argument 247 fd = perf_pmu__pathname_fd(dirfd, name, "format", O_DIRECTORY); in pmu_format() 749 static struct perf_cpu_map *pmu_cpumask(int dirfd, const char *name, bool is_core) in pmu_cpumask() argument 764 file = perf_pmu__open_file_at(&pmu, dirfd, *template); in pmu_cpumask() 777 static bool pmu_is_uncore(int dirfd, const char *name) in pmu_is_uncore() argument 781 fd = perf_pmu__pathname_fd(dirfd, name, "cpumask", O_PATH); in pmu_is_uncore() 1044 static char *pmu_find_alias_name(struct perf_pmu *pmu, int dirfd) in pmu_find_alias_name() argument [all …]
|
H A D | pmu.h | 241 FILE *perf_pmu__open_file_at(const struct perf_pmu *pmu, int dirfd, const char *name); 245 int perf_pmu__scan_file_at(const struct perf_pmu *pmu, int dirfd, const char *name, 276 int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename, int flags); 278 struct perf_pmu *perf_pmu__lookup(struct list_head *pmus, int dirfd, const char *lookup_name,
|
H A D | pmus.c | 128 int dirfd; in perf_pmus__find() local 147 dirfd = perf_pmu__event_source_devices_fd(); in perf_pmus__find() 148 pmu = perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name, in perf_pmus__find() 150 close(dirfd); in perf_pmus__find() 163 static struct perf_pmu *perf_pmu__find2(int dirfd, const char *name) in perf_pmu__find2() argument 184 return perf_pmu__lookup(core_pmu ? &core_pmus : &other_pmus, dirfd, name, in perf_pmu__find2()
|
H A D | util.h | 61 int scandirat(int dirfd, const char *dirp,
|
H A D | util.c | 563 int scandirat(int dirfd, const char *dirp, in scandirat() argument 569 int err, fd = openat(dirfd, dirp, O_PATH); in scandirat()
|
/linux/tools/testing/selftests/openat2/ |
H A D | rename_attack_test.c | 55 pid_t spawn_attack(int dirfd, char *a, char *b) in spawn_attack() argument 66 renameat2(dirfd, a, dirfd, b, RENAME_EXCHANGE); in spawn_attack()
|
/linux/tools/testing/selftests/bpf/ |
H A D | cgroup_helpers.c | 434 int dirfd, err, flags, mount_id, fhsize; in get_cgroup_id_from_path() local 442 dirfd = AT_FDCWD; in get_cgroup_id_from_path() 450 err = name_to_handle_at(dirfd, cgroup_workdir, fhp, &mount_id, flags); in get_cgroup_id_from_path() 462 err = name_to_handle_at(dirfd, cgroup_workdir, fhp2, &mount_id, flags); in get_cgroup_id_from_path()
|
/linux/tools/testing/selftests/iommu/ |
H A D | iommufd_fail_nth.c | 65 if (writeat(dirfd(debugfs), "failslab/ignore-gfp-wait", "N")) in setup_fault_injection() 67 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-wait", "N"); in setup_fault_injection() 68 writeat(dirfd(debugfs), "fail_page_alloc/ignore-gfp-highmem", "N"); in setup_fault_injection() 78 writeat(dirfd(debugfs), fn, "0"); in setup_fault_injection()
|
/linux/fs/nfs/ |
H A D | nfs4super.c | 158 .dirfd = -1, in do_nfs4_mount() 164 .dirfd = -1, in do_nfs4_mount()
|
/linux/tools/testing/selftests/landlock/ |
H A D | fs_test.c | 410 static int test_open_rel(const int dirfd, const char *const path, in test_open_rel() argument 416 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel() 1848 int dirfd, ruleset_fd; in test_relative_path() local 1878 dirfd = open(dir_s1d2, O_DIRECTORY); in test_relative_path() 1879 ASSERT_LE(0, dirfd); in test_relative_path() 1883 dirfd = AT_FDCWD; in test_relative_path() 1891 dirfd = AT_FDCWD; in test_relative_path() 1899 dirfd = AT_FDCWD; in test_relative_path() 1904 test_open_rel(dirfd, "..", O_RDONLY)); in test_relative_path() 1905 ASSERT_EQ(0, test_open_rel(dirfd, ".", O_RDONLY)); in test_relative_path() [all …]
|
/linux/fs/bcachefs/ |
H A D | fs-ioctl.c | 411 error = user_path_at(arg.dirfd, in bch2_ioctl_subvolume_create() 426 dst_dentry = user_path_create(arg.dirfd, in bch2_ioctl_subvolume_create() 510 victim = user_path_locked_at(arg.dirfd, name, &path); in bch2_ioctl_subvolume_destroy()
|
H A D | bcachefs_ioctl.h | 392 __u32 dirfd; member
|
/linux/fs/ |
H A D | fsopen.c | 455 param.dirfd = aux; in SYSCALL_DEFINE5() 464 param.dirfd = aux; in SYSCALL_DEFINE5()
|
H A D | fs_parser.c | 169 ret = filename_lookup(param->dirfd, f, flags, _path, NULL); in fs_lookup_param() 300 result->uint_32 = param->dirfd; in fs_param_is_fd()
|
/linux/include/linux/ |
H A D | fs_context.h | 73 int dirfd; member
|
/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/Documentation/filesystems/ |
H A D | mount_api.rst | 498 fs_value_is_filename Value is a filename* + dirfd
|
/linux/tools/power/x86/turbostat/ |
H A D | turbostat.c | 8724 if (fstatat(dirfd(dirp), entry->d_name, &st, 0) == -1) { in pmt_mmio_open() 8731 fd_telem_dir = openat(dirfd(dirp), entry->d_name, O_RDONLY); in pmt_mmio_open()
|