Searched refs:kd (Results 1 - 25 of 82) sorted by relevance

1234

/freebsd-head/lib/libkvm/
H A Dkvm.c72 kvm_geterr(kvm_t *kd) argument
75 if (kd == NULL)
77 return (kd->errbuf);
81 _kvm_read_kernel_ehdr(kvm_t *kd) argument
86 _kvm_err(kd, kd->program, "Unsupported libelf");
89 elf = elf_begin(kd->nlfd, ELF_C_READ, NULL);
91 _kvm_err(kd, kd->program, "%s", elf_errmsg(0));
95 _kvm_err(kd, k
117 _kvm_open(kvm_t *kd, const char *uf, const char *mf, int flag, char *errout) argument
232 kvm_t *kd; local
247 kvm_t *kd; local
263 kvm_t *kd; local
276 kvm_close(kvm_t *kd) argument
312 kvm_nlist2(kvm_t *kd, struct kvm_nlist *nl) argument
323 kvm_nlist(kvm_t *kd, struct nlist *nl) argument
356 kvm_read(kvm_t *kd, u_long kva, void *buf, size_t len) argument
363 kvm_read2(kvm_t *kd, kvaddr_t kva, void *buf, size_t len) argument
423 kvm_write(kvm_t *kd, u_long kva, const void *buf, size_t len) argument
487 kvm_native(kvm_t *kd) argument
496 kvm_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *closure) argument
506 kvm_kerndisp(kvm_t *kd) argument
[all...]
H A Dkvm_i386.c74 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument
76 struct vmstate *vm = kd->vmst;
80 if (kd->rawdump) {
96 _i386_freevtop(kvm_t *kd) argument
98 struct vmstate *vm = kd->vmst;
104 kd->vmst = NULL;
108 _i386_probe(kvm_t *kd) argument
111 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_386) &&
112 !_kvm_is_minidump(kd));
116 _i386_initvtop(kvm_t *kd) argument
215 _i386_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
305 _i386_vatop_pae(kvm_t *kd, kvaddr_t va, off_t *pa) argument
396 _i386_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
[all...]
H A Dkvm_pcpu.c76 _kvm_pcpu_init(kvm_t *kd) argument
82 if (kvm_nlist(kd, kvm_pcpu_nl) < 0)
85 _kvm_err(kd, kd->program, "unable to find cpuid_to_pcpu");
89 _kvm_err(kd, kd->program, "unable to find mp_maxcpus");
92 if (kvm_read(kd, kvm_pcpu_nl[NL_MP_MAXCPUS].n_value, &max,
94 _kvm_err(kd, kd->program, "cannot read mp_maxcpus");
98 _kvm_err(kd, k
133 kvm_getpcpu(kvm_t *kd, int cpu) argument
164 kvm_getmaxcpu(kvm_t *kd) argument
179 kvm_getncpus(kvm_t *kd) argument
189 _kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu, int report_error) argument
219 _kvm_dpcpu_init(kvm_t *kd) argument
275 _kvm_dpcpu_initialized(kvm_t *kd, int intialize) argument
291 _kvm_dpcpu_validaddr(kvm_t *kd, kvaddr_t value) argument
307 kvm_dpcpu_setcpu(kvm_t *kd, u_int cpu) argument
327 kvm_read_zpcpu(kvm_t *kd, u_long base, void *buf, size_t size, int cpu) argument
340 kvm_counter_u64_fetch(kvm_t *kd, u_long base) argument
[all...]
H A Dkvm_vnet.c61 _kvm_vnet_selectpid(kvm_t *kd, pid_t pid) argument
97 if (!kvm_native(kd))
106 if (_kvm_nlist(kd, nl, 0) != 0) {
115 /* _kvm_err(kd, kd->program, "%s: no namelist", __func__); */
124 if (kvm_read(kd, nl[NLIST_DUMPTID].n_value, &dumptid,
126 _kvm_err(kd, kd->program, "%s: dumptid", __func__);
146 if (kvm_read(kd, procp, &proc, sizeof(proc)) != sizeof(proc)) {
147 _kvm_err(kd, k
218 _kvm_vnet_initialized(kvm_t *kd, int intialize) argument
234 _kvm_vnet_validaddr(kvm_t *kd, kvaddr_t value) argument
[all...]
H A Dkvm_cptime.c58 _kvm_cp_time_init(kvm_t *kd) argument
61 if (kvm_nlist(kd, kvm_cp_time_nl) < 0)
68 getsysctl(kvm_t *kd, const char *name, void *buf, size_t len) argument
74 _kvm_err(kd, kd->program, "cannot read sysctl %s:%s", name,
79 _kvm_err(kd, kd->program, "sysctl %s has unexpected size",
87 kvm_getcptime(kvm_t *kd, long *cp_time) argument
92 if (kd == NULL) {
97 if (ISALIVE(kd))
[all...]
H A Dkvm_amd64.c69 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs) argument
71 struct vmstate *vm = kd->vmst;
75 if (kd->rawdump) {
91 _amd64_freevtop(kvm_t *kd) argument
93 struct vmstate *vm = kd->vmst;
99 kd->vmst = NULL;
103 _amd64_probe(kvm_t *kd) argument
106 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_X86_64) &&
107 !_kvm_is_minidump(kd));
111 _amd64_initvtop(kvm_t *kd) argument
168 _amd64_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
306 _amd64_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
[all...]
H A Dkvm_getloadavg.c62 kvm_getloadavg(kvm_t *kd, double loadavg[], int nelem) argument
68 if (ISALIVE(kd))
71 if (!kd->arch->ka_native(kd)) {
72 _kvm_err(kd, kd->program,
77 if (kvm_nlist(kd, nl) != 0) {
79 _kvm_err(kd, kd->program,
84 #define KREAD(kd, add
[all...]
H A Dkvm_arm.c68 _kvm_pa2off(kvm_t *kd, uint64_t pa, off_t *ofs, size_t pgsz) argument
70 struct vmstate *vm = kd->vmst;
88 _arm_freevtop(kvm_t *kd) argument
90 struct vmstate *vm = kd->vmst;
94 kd->vmst = NULL;
98 _arm_probe(kvm_t *kd) argument
101 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_ARM) &&
102 !_kvm_is_minidump(kd));
106 _arm_initvtop(kvm_t *kd) argument
116 if (kd
196 _arm_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
242 _kvm_mdopen(kvm_t *kd) argument
255 _arm_native(kvm_t *kd) argument
[all...]
H A Dkvm_minidump_arm.c61 _arm_pte_get(kvm_t *kd, u_long pteindex) argument
63 arm_pt_entry_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
65 return _kvm32toh(kd, *pte);
69 _arm_minidump_probe(kvm_t *kd) argument
72 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_ARM) &&
73 _kvm_is_minidump(kd));
77 _arm_minidump_freevtop(kvm_t *kd) argument
79 struct vmstate *vm = kd->vmst;
82 kd->vmst = NULL;
86 _arm_minidump_initvtop(kvm_t *kd) argument
147 _arm_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
209 _arm_entry_to_prot(kvm_t *kd, arm_pt_entry_t pte) argument
230 _arm_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_minidump_mips.c64 _mips_minidump_probe(kvm_t *kd) argument
67 if (kd->nlehdr.e_ident[EI_CLASS] != ELFCLASS32 &&
68 kd->nlehdr.e_ident[EI_CLASS] != ELFCLASS64)
70 if (kd->nlehdr.e_machine != EM_MIPS)
72 return (_kvm_is_minidump(kd));
76 _mips_minidump_freevtop(kvm_t *kd) argument
78 struct vmstate *vm = kd->vmst;
81 kd->vmst = NULL;
85 _mips_minidump_initvtop(kvm_t *kd) argument
90 vmst = _kvm_malloc(kd, sizeo
148 _mips_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
239 _mips_native(kvm_t *kd) argument
271 kvm_t *kd; member in struct:mips_iter
277 _mips_iterator_init(struct mips_iter *it, kvm_t *kd) argument
332 _mips_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_private.c75 * Report an error using printf style arguments. "program" is kd->program
81 _kvm_err(kvm_t *kd, const char *program, const char *fmt, ...) argument
91 (void)vsnprintf(kd->errbuf,
92 sizeof(kd->errbuf), fmt, ap);
98 _kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...) argument
109 char *cp = kd->errbuf;
111 (void)vsnprintf(cp, sizeof(kd->errbuf), fmt, ap);
113 (void)snprintf(&cp[n], sizeof(kd->errbuf) - n, ": %s",
120 _kvm_malloc(kvm_t *kd, size_t n) argument
125 _kvm_err(kd, k
131 _kvm_probe_elf_kernel(kvm_t *kd, int class, int machine) argument
141 _kvm_is_minidump(kvm_t *kd) argument
162 _kvm_read_core_phdrs(kvm_t *kd, size_t *phnump, GElf_Phdr **phdrp) argument
267 _kvm_pmap_get(kvm_t *kd, u_long idx, size_t len) argument
277 _kvm_map_get(kvm_t *kd, u_long pa, unsigned int page_size) argument
293 _kvm_pt_init(kvm_t *kd, size_t map_len, off_t map_off, off_t sparse_off, int page_size, int word_size) argument
377 _kvm_pmap_init(kvm_t *kd, uint32_t pmap_size, off_t pmap_off) argument
412 _kvm_pt_find(kvm_t *kd, uint64_t pa, unsigned int page_size) argument
463 kvm_fdnlist(kvm_t *kd, struct kvm_nlist *list) argument
508 kvm_fdnlist_prefix(kvm_t *kd, struct kvm_nlist *nl, int missing, const char *prefix, kvaddr_t (*validate_fn)(kvm_t *, kvaddr_t)) argument
606 _kvm_nlist(kvm_t *kd, struct kvm_nlist *nl, int initialize) argument
753 _kvm_visit_cb(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg, u_long pa, u_long kmap_vaddr, u_long dmap_vaddr, vm_prot_t prot, size_t len, unsigned int page_size) argument
[all...]
H A Dkvm_minidump_i386.c58 _i386_pte_pae_get(kvm_t *kd, u_long pteindex) argument
60 i386_pte_pae_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
66 _i386_pte_get(kvm_t *kd, u_long pteindex) argument
68 i386_pte_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
74 _i386_minidump_probe(kvm_t *kd) argument
77 return (_kvm_probe_elf_kernel(kd, ELFCLASS32, EM_386) &&
78 _kvm_is_minidump(kd));
82 _i386_minidump_freevtop(kvm_t *kd) argument
84 struct vmstate *vm = kd->vmst;
87 kd
91 _i386_minidump_initvtop(kvm_t *kd) argument
143 _i386_minidump_vatop_pae(kvm_t *kd, kvaddr_t va, off_t *pa) argument
188 _i386_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
233 _i386_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
261 kvm_t *kd; member in struct:i386_iter
267 _i386_iterator_init(struct i386_iter *it, kvm_t *kd) argument
316 _i386_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_minidump_aarch64.c57 _aarch64_pte_get(kvm_t *kd, u_long pteindex) argument
59 aarch64_pte_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
65 _aarch64_minidump_probe(kvm_t *kd) argument
68 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_AARCH64) &&
69 _kvm_is_minidump(kd));
73 _aarch64_minidump_freevtop(kvm_t *kd) argument
75 struct vmstate *vm = kd->vmst;
78 kd->vmst = NULL;
82 _aarch64_minidump_initvtop(kvm_t *kd) argument
87 vmst = _kvm_malloc(kd, sizeo
139 _aarch64_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
196 _aarch64_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
232 _aarch64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_minidump_riscv.c58 _riscv_pte_get(kvm_t *kd, u_long pteindex) argument
60 riscv_pt_entry_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
66 _riscv_minidump_probe(kvm_t *kd) argument
69 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_RISCV) &&
70 _kvm_is_minidump(kd));
74 _riscv_minidump_freevtop(kvm_t *kd) argument
76 struct vmstate *vm = kd->vmst;
79 kd->vmst = NULL;
83 _riscv_minidump_initvtop(kvm_t *kd) argument
88 vmst = _kvm_malloc(kd, sizeo
140 _riscv_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
197 _riscv_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
232 _riscv_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_powerpc64.h56 #define PPC64_MMU_OPS(kd) (kd)->vmst->mmu.ops
57 #define PPC64_MMU_OP(kd, op, ...) PPC64_MMU_OPS(kd)->op((kd), ## __VA_ARGS__)
58 #define PPC64_MMU_DATA(kd) (kd)->vmst->mmu.data
H A Dkvm_minidump_amd64.c78 _amd64_pde_get(kvm_t *kd, u_long pdeindex) argument
80 amd64_pde_t *pde = _kvm_pmap_get(kd, pdeindex, sizeof(*pde));
86 _amd64_pte_get(kvm_t *kd, u_long pteindex) argument
88 amd64_pte_t *pte = _kvm_pmap_get(kd, pteindex, sizeof(*pte));
95 _amd64_pde_first_pte(kvm_t *kd, u_long pdeindex) argument
99 pa = _kvm_pmap_get(kd, pdeindex, sizeof(amd64_pde_t));
102 return _kvm_map_get(kd, *pa & AMD64_PG_FRAME, AMD64_PAGE_SIZE);
106 _amd64_minidump_probe(kvm_t *kd) argument
109 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_X86_64) &&
110 _kvm_is_minidump(kd));
114 _amd64_minidump_freevtop(kvm_t *kd) argument
123 _amd64_minidump_initvtop(kvm_t *kd) argument
181 _amd64_minidump_vatop_v1(kvm_t *kd, kvaddr_t va, off_t *pa) argument
237 _amd64_minidump_vatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
325 _amd64_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
340 _amd64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
H A Dkvm_getswapinfo.c74 #define KREAD(kd, addr, obj) \
75 (kvm_read(kd, addr, (char *)(obj), sizeof(*obj)) != sizeof(*obj))
79 if (KREAD(kd, (u_long)(addr), (var))) { \
80 _kvm_err(kd, kd->program, "cannot read %s", msg); \
96 kvm_getswapinfo(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
102 if (kd == NULL) {
107 if (ISALIVE(kd)) {
108 return kvm_getswapinfo_sysctl(kd, swap_ary, swap_max, flags);
110 return kvm_getswapinfo_kvm(kd, swap_ar
115 kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
166 kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) argument
229 nlist_init(kvm_t *kd) argument
257 getsysctl(kvm_t *kd, const char *name, void *ptr, size_t len) argument
[all...]
H A Dkvm_minidump_powerpc64.c47 _powerpc64_minidump_probe(kvm_t *kd) argument
49 return (_kvm_probe_elf_kernel(kd, ELFCLASS64, EM_PPC64) &&
50 _kvm_is_minidump(kd));
54 _powerpc64_minidump_freevtop(kvm_t *kd) argument
56 struct vmstate *vm = kd->vmst;
60 if (PPC64_MMU_OPS(kd))
61 PPC64_MMU_OP(kd, cleanup);
63 kd->vmst = NULL;
67 _powerpc64_minidump_initvtop(kvm_t *kd) argument
75 vmst = _kvm_malloc(kd, sizeo
168 _powerpc64_minidump_kvatop(kvm_t *kd, kvaddr_t va, off_t *pa) argument
188 _powerpc64_kerndisp(kvm_t *kd) argument
194 _powerpc64_minidump_walk_pages(kvm_t *kd, kvm_walk_pages_cb_t *cb, void *arg) argument
[all...]
/freebsd-head/sys/cddl/compat/opensolaris/sys/
H A Dsid.h41 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-head/crypto/heimdal/lib/krb5/
H A Dkrbhst.c165 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 Dsalt-aes.c49 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-head/lib/libprocstat/
H A Dcommon_kvm.h34 dev_t dev2udev(kvm_t *kd, struct cdev *dev);
35 int kdevtoname(kvm_t *kd, struct cdev *dev, char *);
36 int kvm_read_all(kvm_t *kd, unsigned long addr, void *buf,
42 int devfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
43 int isofs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
44 int msdosfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
45 int nfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
46 int smbfs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
47 int udf_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn);
48 int ufs_filestat(kvm_t *kd, struc
[all...]
H A Dlibprocstat_internal.h36 kvm_t *kd; member in struct:procstat
/freebsd-head/lib/libkvm/tests/
H A Dkvm_geterr_test.c65 "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...]
H A Dkvm_read_test.c57 kvm_t *kd; local
69 kd = kvm_open(NULL, NULL, NULL, O_RDONLY, errbuf);
71 ATF_REQUIRE_MSG(kd != NULL, "kvm_open failed: %s", errbuf);
72 retcode = kvm_nlist(kd, nl);
74 "kvm_nlist failed (returned %d): %s", retcode, kvm_geterr(kd));
78 rc = kvm_read(kd, nl[X_MAXCPUS].n_value, &mp_maxcpus,
81 ATF_REQUIRE_MSG(rc != -1, "kvm_read failed: %s", kvm_geterr(kd));
82 ATF_REQUIRE_MSG(kvm_close(kd) == 0, "kvm_close failed: %s",

Completed in 109 milliseconds

1234