/freebsd-11-stable/lib/libkvm/ |
H A D | kvm_i386.c | 76 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument 78 struct vmstate *vm = kd->vmst; 82 if (kd->rawdump) { 98 _i386_freevtop(kvm_t *kd) argument 100 struct vmstate *vm = kd->vmst; 106 kd->vmst = NULL; 110 _i386_probe(kvm_t *kd) argument 113 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_386) && 114 !_kvm_is_minidump(kd)); 118 _i386_initvtop(kvm_t *kd) argument 217 _i386_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 307 _i386_vatop_pae(kvm_t *kd, kvaddr_t va, off_t *pa) argument 398 _i386_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm_pcpu.c | 74 _kvm_pcpu_init(kvm_t *kd) argument 80 if (kvm_nlist(kd, kvm_pcpu_nl) < 0) 83 _kvm_err(kd, kd->program, "unable to find cpuid_to_pcpu"); 87 _kvm_err(kd, kd->program, "unable to find mp_maxcpus"); 90 if (kvm_read(kd, kvm_pcpu_nl[NL_MP_MAXCPUS].n_value, &max, 92 _kvm_err(kd, kd->program, "cannot read mp_maxcpus"); 96 _kvm_err(kd, k 131 kvm_getpcpu(kvm_t *kd, int cpu) argument 162 kvm_getmaxcpu(kvm_t *kd) argument 177 kvm_getncpus(kvm_t *kd) argument 187 _kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu, int report_error) argument 217 _kvm_dpcpu_init(kvm_t *kd) argument 273 _kvm_dpcpu_initialized(kvm_t *kd, int intialize) argument 289 _kvm_dpcpu_validaddr(kvm_t *kd, kvaddr_t value) argument 305 kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) argument 325 kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) argument 338 kvm_counter_u64_fetch(kvm_t *kd, u_long base) argument [all...] |
H A D | kvm_vnet.c | 58 _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) argument 94 if (!kvm_native(kd)) 103 if (_kvm_nlist(kd, nl, 0) != 0) { 112 /* _kvm_err(kd, kd->program, "%s: no namelist", __func__); */ 121 if (kvm_read(kd, nl[NLIST_DUMPTID].n_value, &dumptid, 123 _kvm_err(kd, kd->program, "%s: dumptid", __func__); 143 if (kvm_read(kd, procp, &proc, sizeof(proc)) != sizeof(proc)) { 144 _kvm_err(kd, k 215 _kvm_vnet_initialized(kvm_t *kd, int intialize) argument 231 _kvm_vnet_validaddr(kvm_t *kd, kvaddr_t value) argument [all...] |
H A D | kvm_cptime.c | 56 _kvm_cp_time_init(kvm_t *kd) argument 59 if (kvm_nlist(kd, kvm_cp_time_nl) < 0) 66 getsysctl(kvm_t *kd, const char *name, void *buf, size_t len) argument 72 _kvm_err(kd, kd->program, "cannot read sysctl %s:%s", name, 77 _kvm_err(kd, kd->program, "sysctl %s has unexpected size", 85 kvm_getcptime(kvm_t *kd, long *cp_time) argument 90 if (kd == NULL) { 95 if (ISALIVE(kd)) [all...] |
H A D | kvm_minidump_mips.c | 61 _mips_minidump_probe(kvm_t *kd) argument 64 if (kd->nlehdr.e_ident[EI_CLASS] != ELFCLASS32 && 65 kd->nlehdr.e_ident[EI_CLASS] != ELFCLASS64) 67 if (kd->nlehdr.e_machine != EM_MIPS) 69 return (_kvm_is_minidump(kd)); 73 _mips_minidump_freevtop(kvm_t *kd) argument 75 struct vmstate *vm = kd->vmst; 81 kd->vmst = NULL; 85 _mips_minidump_initvtop(kvm_t *kd) argument 91 vmst = _kvm_malloc(kd, sizeo 175 _mips_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 260 _mips_native(kvm_t *kd) argument [all...] |
H A D | kvm_amd64.c | 71 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument 73 struct vmstate *vm = kd->vmst; 77 if (kd->rawdump) { 93 _amd64_freevtop(kvm_t *kd) argument 95 struct vmstate *vm = kd->vmst; 101 kd->vmst = NULL; 105 _amd64_probe(kvm_t *kd) argument 108 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_X86_64) && 109 !_kvm_is_minidump(kd)); 113 _amd64_initvtop(kvm_t *kd) argument 170 _amd64_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 308 _amd64_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm_getloadavg.c | 65 kvm_getloadavg(kvm_t *kd, double loadavg[], int nelem) argument 71 if (ISALIVE(kd)) 74 if (!kd->arch->ka_native(kd)) { 75 _kvm_err(kd, kd->program, 80 if (kvm_nlist(kd, nl) != 0) { 82 _kvm_err(kd, kd->program, 87 #define KREAD(kd, add [all...] |
H A D | kvm_arm.c | 66 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) argument 68 struct vmstate *vm = kd->vmst; 86 _arm_freevtop(kvm_t *kd) argument 88 struct vmstate *vm = kd->vmst; 92 kd->vmst = NULL; 96 _arm_probe(kvm_t *kd) argument 99 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_ARM) && 100 !_kvm_is_minidump(kd)); 104 _arm_initvtop(kvm_t *kd) argument 114 if (kd 194 _arm_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 240 _kvm_mdopen(kvm_t *kd) argument 253 _arm_native(kvm_t *kd) argument [all...] |
H A D | kvm_minidump_i386.c | 57 _i386_minidump_probe(kvm_t *kd) argument 60 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_386) && 61 _kvm_is_minidump(kd)); 65 _i386_minidump_freevtop(kvm_t *kd) argument 67 struct vmstate *vm = kd->vmst; 73 kd->vmst = NULL; 77 _i386_minidump_initvtop(kvm_t *kd) argument 83 vmst = _kvm_malloc(kd, sizeof(*vmst)); 85 _kvm_err(kd, kd 149 _i386_minidump_vatop_pae(kvm_t *kd, kvaddr_t va, off_t *pa) argument 194 _i386_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 239 _i386_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm.c | 75 kvm_fdnlist(kvm_t *kd, struct kvm_nlist *list) argument 80 if (kd->resolve_symbol == NULL) { 90 nfail = __fdnlist(kd->nlfd, nl); 101 error = kd->resolve_symbol(list->n_name, &addr); 116 kvm_geterr(kvm_t *kd) argument 119 if (kd == NULL) 121 return (kd->errbuf); 127 * Report an error using printf style arguments. "program" is kd->program 133 _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...) argument 143 (void)vsnprintf(kd 150 _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...) argument 172 _kvm_malloc(kvm_t *kd, size_t n) argument 183 _kvm_read_kernel_ehdr(kvm_t *kd) argument 219 _kvm_probe_elf_kernel(kvm_t *kd, int class, int machine) argument 228 _kvm_is_minidump(kvm_t *kd) argument 249 _kvm_read_core_phdrs(kvm_t *kd, size_t *phnump, GElf_Phdr **phdrp) argument 325 _kvm_hpt_init(kvm_t *kd, struct hpt *hpt, void *base, size_t len, off_t off, int page_size, int word_size) argument 379 _kvm_open(kvm_t *kd, const char *uf, const char *mf, int flag, char *errout) argument 494 kvm_t *kd; local 509 kvm_t *kd; local 525 kvm_t *kd; local 538 kvm_close(kvm_t *kd) argument 574 kvm_fdnlist_prefix(kvm_t *kd, struct kvm_nlist *nl, int missing, const char *prefix, kvaddr_t (*validate_fn)(kvm_t *, kvaddr_t)) argument 672 _kvm_nlist(kvm_t *kd, struct kvm_nlist *nl, int initialize) argument 771 kvm_nlist2(kvm_t *kd, struct kvm_nlist *nl) argument 782 kvm_nlist(kvm_t *kd, struct nlist *nl) argument 820 kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) argument 827 kvm_read2(kvm_t *kd, kvaddr_t kva, void *buf, size_t len) argument 887 kvm_write(kvm_t *kd, u_long kva, const void *buf, size_t len) argument 951 kvm_native(kvm_t *kd) argument [all...] |
H A D | kvm_minidump_arm.c | 60 _arm_minidump_probe(kvm_t *kd) argument 63 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_ARM) && 64 _kvm_is_minidump(kd)); 68 _arm_minidump_freevtop(kvm_t *kd) argument 70 struct vmstate *vm = kd->vmst; 76 kd->vmst = NULL; 80 _arm_minidump_initvtop(kvm_t *kd) argument 86 vmst = _kvm_malloc(kd, sizeof(*vmst)); 88 _kvm_err(kd, kd 168 _arm_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm_minidump_amd64.c | 57 _amd64_minidump_probe(kvm_t *kd) argument 60 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_X86_64) && 61 _kvm_is_minidump(kd)); 65 _amd64_minidump_freevtop(kvm_t *kd) argument 67 struct vmstate *vm = kd->vmst; 73 kd->vmst = NULL; 77 _amd64_minidump_initvtop(kvm_t *kd) argument 83 vmst = _kvm_malloc(kd, sizeof(*vmst)); 85 _kvm_err(kd, kd 155 _amd64_minidump_vatop_v1(kvm_t *kd, kvaddr_t va, off_t *pa) argument 211 _amd64_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 299 _amd64_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm_minidump_aarch64.c | 58 _aarch64_minidump_probe(kvm_t *kd) argument 61 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_AARCH64) && 62 _kvm_is_minidump(kd)); 66 _aarch64_minidump_freevtop(kvm_t *kd) argument 68 struct vmstate *vm = kd->vmst; 73 kd->vmst = NULL; 77 _aarch64_minidump_initvtop(kvm_t *kd) argument 83 vmst = _kvm_malloc(kd, sizeof(*vmst)); 85 _kvm_err(kd, kd 166 _aarch64_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument 223 _aarch64_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument [all...] |
H A D | kvm_getswapinfo.c | 71 #define KREAD(kd, addr, obj) \ 72 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj)) 76 if (KREAD(kd, (u_long)(addr), (var))) { \ 77 _kvm_err(kd, kd->program, "cannot read %s", msg); \ 93 kvm_getswapinfo(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument 99 if (kd == NULL) { 104 if (ISALIVE(kd)) { 105 return kvm_getswapinfo_sysctl(kd, swap_ary, swap_max, flags); 107 return kvm_getswapinfo_kvm(kd, swap_ar 112 kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument 164 kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument 228 nlist_init(kvm_t *kd) argument 256 getsysctl(kvm_t *kd, const char *name, void *ptr, size_t len) argument [all...] |
H A D | kvm_proc.c | 85 #define KREAD(kd, addr, obj) \ 86 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj)) 115 kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p, argument 145 if (KREAD(kd, (u_long)p, &proc)) { 146 _kvm_err(kd, kd->program, "can't read proc at %p", p); 152 if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads), 154 _kvm_err(kd, kd->program, 160 if (KREAD(kd, (u_lon 467 kvm_deadprocs(kvm_t *kd, int what, int arg, u_long a_allproc, u_long a_zombproc, int maxcnt) argument 494 kvm_getprocs(kvm_t *kd, int op, int arg, int *cnt) argument 636 _kvm_freeprocs(kvm_t *kd) argument 644 _kvm_realloc(kvm_t *kd, void *p, size_t n) argument 658 kvm_argv(kvm_t *kd, const struct kinfo_proc *kp, int env, int nchr) argument 735 kvm_getargv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument 741 kvm_getenvv(kvm_t *kd, const struct kinfo_proc *kp, int nchr) argument [all...] |
H A D | kvm_powerpc.c | 93 powerpc_maphdrs(kvm_t *kd) argument 98 vm = kd->vmst; 101 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0); 103 _kvm_err(kd, kd->program, "cannot map corefile"); 128 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0); 130 _kvm_err(kd, kd->program, "cannot map corefile headers"); 138 _kvm_err(kd, kd 148 powerpc_va2off(kvm_t *kd, kvaddr_t va, off_t *ofs) argument 171 _powerpc_freevtop(kvm_t *kd) argument 182 _powerpc_probe(kvm_t *kd) argument 190 _powerpc_initvtop(kvm_t *kd) argument 204 _powerpc_kvatop(kvm_t *kd, kvaddr_t va, off_t *ofs) argument [all...] |
H A D | kvm_powerpc64.c | 93 powerpc_maphdrs(kvm_t *kd) argument 98 vm = kd->vmst; 101 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0); 103 _kvm_err(kd, kd->program, "cannot map corefile"); 128 vm->map = mmap(NULL, vm->mapsz, PROT_READ, MAP_PRIVATE, kd->pmfd, 0); 130 _kvm_err(kd, kd->program, "cannot map corefile headers"); 139 _kvm_err(kd, kd 149 powerpc64_va2off(kvm_t *kd, kvaddr_t va, off_t *ofs) argument 172 _powerpc64_freevtop(kvm_t *kd) argument 183 _powerpc64_probe(kvm_t *kd) argument 191 _powerpc64_initvtop(kvm_t *kd) argument 205 _powerpc64_kvatop(kvm_t *kd, kvaddr_t va, off_t *ofs) argument [all...] |
/freebsd-11-stable/sys/cddl/compat/opensolaris/sys/ |
H A D | sid.h | 41 ksiddomain_t *kd; local 45 kd = kmem_alloc(sizeof(*kd), KM_SLEEP); 46 kd->kd_len = (uint_t)len; 47 kd->kd_name = kmem_alloc(len, KM_SLEEP); 48 strcpy(kd->kd_name, domain); 49 return (kd); 53 ksiddomain_rele(ksiddomain_t *kd) argument 56 kmem_free(kd->kd_name, kd [all...] |
/freebsd-11-stable/usr.sbin/asf/ |
H A D | asf_kvm.c | 62 kvm_t *kd; local 69 kd = kvm_openfiles(kernfile, corefile, NULL, O_RDONLY, errbuf); 70 if (kd == NULL) 79 switch (kvm_nlist(kd, nl)) { 83 warnx("%s: %s", LINKER_HEAD, kvm_geterr(kd)); 84 kvm_close(kd); 87 kvm_close(kd); 94 n = kvm_read(kd, nl[0].n_value, &linker_files, sizeof(linker_files)); 98 kvm_close(kd); 107 n = kvm_read(kd, (u_lon [all...] |
/freebsd-11-stable/lib/libprocstat/ |
H A D | common_kvm.h | 32 dev_t dev2udev(kvm_t *kd, struct cdev *dev); 33 int kdevtoname(kvm_t *kd, struct cdev *dev, char *); 34 int kvm_read_all(kvm_t *kd, unsigned long addr, void *buf, 40 int devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 41 int isofs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 42 int msdosfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 43 int nfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 44 int smbfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 45 int udf_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn); 46 int ufs_filestat(kvm_t *kd, struc [all...] |
H A D | libprocstat_internal.h | 34 kvm_t *kd; member in struct:procstat
|
/freebsd-11-stable/crypto/heimdal/lib/krb5/ |
H A D | krbhst.c | 165 krbhst_empty(const struct krb5_krbhst_data *kd) argument 167 return kd->index == &kd->hosts; 171 * Return the default protocol for the `kd' (either TCP or UDP) 175 krbhst_get_default_proto(struct krb5_krbhst_data *kd) argument 177 if (kd->flags & KD_LARGE_MSG) 198 parse_hostspec(krb5_context context, struct krb5_krbhst_data *kd, argument 208 hi->proto = krbhst_get_default_proto(kd); 290 append_host_hostinfo(struct krb5_krbhst_data *kd, struct krb5_krbhst_info *host) argument 294 for(h = kd 306 append_host_string(krb5_context context, struct krb5_krbhst_data *kd, const char *host, int def_port, int port) argument 422 get_next(struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument 434 srv_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *proto, const char *service) argument 458 config_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *conf_string) argument 486 fallback_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, const char *serv_string, int port, int proto) argument 553 struct krb5_krbhst_data *kd = ctx; local 589 plugin_get_hosts(krb5_context context, struct krb5_krbhst_data *kd, enum locate_service_type type) argument 631 kdc_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument 696 admin_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument 750 kpasswd_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument 810 krb524_get_next(krb5_context context, struct krb5_krbhst_data *kd, krb5_krbhst_info **host) argument 871 struct krb5_krbhst_data *kd; local 914 struct krb5_krbhst_data *kd; local [all...] |
H A D | salt-aes.c | 49 struct _krb5_key_data kd; local 64 kd.schedule = NULL; 65 ALLOC(kd.key, 1); 66 if(kd.key == NULL) { 70 kd.key->keytype = enctype; 71 ret = krb5_data_alloc(&kd.key->keyvalue, et->keytype->size); 80 et->keytype->size, kd.key->keyvalue.data); 82 _krb5_free_key_data(context, &kd, et); 88 ret = _krb5_derive_key(context, et, &kd, "kerberos", strlen("kerberos")); 90 ret = krb5_copy_keyblock_contents(context, kd [all...] |
/freebsd-11-stable/lib/libkvm/tests/ |
H A D | kvm_geterr_test.c | 65 "test that kvm_geterr(kd) when kd doesn't contain an error returns \"\""); 71 kvm_t *kd; local 75 kd = kvm_open2(NULL, NULL, O_RDONLY, errbuf, NULL); 77 ATF_REQUIRE_MSG(kd != NULL, "kvm_open2 failed: %s", errbuf); 78 ATF_REQUIRE_MSG(kvm_write(kd, 0, NULL, 0) == -1, 80 error_msg = kvm_geterr(kd); 82 ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s", 91 "test that kvm_geterr(kd) when kd contain 98 kvm_t *kd; local [all...] |
/freebsd-11-stable/contrib/apr-util/dbm/ |
H A D | apr_dbm_ndbm.c | 124 datum kd, rd; local 126 kd.dptr = key.dptr; 127 kd.dsize = key.dsize; 129 rd = dbm_fetch(dbm->file, kd); 143 datum kd, vd; local 145 kd.dptr = key.dptr; 146 kd.dsize = key.dsize; 151 rc = dbm_store(dbm->file, kd, vd, DBM_REPLACE); 160 datum kd; local 162 kd 173 datum kd, rd; local 198 datum kd, rd; local [all...] |