ddb: annotate some commands with DB_CMD_MEMSAFE

This is not completely exhaustive, but covers a large majority of
commands in the tree.

Reviewed by:	markj
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35583
This commit is contained in:
Mitchell Horne 2022-07-18 17:21:38 -04:00 committed by Allan Jude
parent bb61cba751
commit c84c5e00ac
33 changed files with 56 additions and 56 deletions

View File

@ -521,7 +521,7 @@ extern inthand_t
* Display the index and function name of any IDT entries that don't use * Display the index and function name of any IDT entries that don't use
* the default 'rsvd' entry point. * the default 'rsvd' entry point.
*/ */
DB_SHOW_COMMAND(idt, db_show_idt) DB_SHOW_COMMAND_FLAGS(idt, db_show_idt, DB_CMD_MEMSAFE)
{ {
struct gate_descriptor *ip; struct gate_descriptor *ip;
int idx; int idx;
@ -540,7 +540,7 @@ DB_SHOW_COMMAND(idt, db_show_idt)
} }
/* Show privileged registers. */ /* Show privileged registers. */
DB_SHOW_COMMAND(sysregs, db_show_sysregs) DB_SHOW_COMMAND_FLAGS(sysregs, db_show_sysregs, DB_CMD_MEMSAFE)
{ {
struct { struct {
uint16_t limit; uint16_t limit;
@ -573,7 +573,7 @@ DB_SHOW_COMMAND(sysregs, db_show_sysregs)
db_printf("GSBASE\t0x%016lx\n", rdmsr(MSR_GSBASE)); db_printf("GSBASE\t0x%016lx\n", rdmsr(MSR_GSBASE));
} }
DB_SHOW_COMMAND(dbregs, db_show_dbregs) DB_SHOW_COMMAND_FLAGS(dbregs, db_show_dbregs, DB_CMD_MEMSAFE)
{ {
db_printf("dr0\t0x%016lx\n", rdr0()); db_printf("dr0\t0x%016lx\n", rdr0());
@ -581,7 +581,7 @@ DB_SHOW_COMMAND(dbregs, db_show_dbregs)
db_printf("dr2\t0x%016lx\n", rdr2()); db_printf("dr2\t0x%016lx\n", rdr2());
db_printf("dr3\t0x%016lx\n", rdr3()); db_printf("dr3\t0x%016lx\n", rdr3());
db_printf("dr6\t0x%016lx\n", rdr6()); db_printf("dr6\t0x%016lx\n", rdr6());
db_printf("dr7\t0x%016lx\n", rdr7()); db_printf("dr7\t0x%016lx\n", rdr7());
} }
#endif #endif

View File

@ -511,7 +511,7 @@ db_command(struct db_command **last_cmdp, struct db_command_table *cmd_table,
* At least one non-optional command must be implemented using * At least one non-optional command must be implemented using
* DB_COMMAND() so that db_cmd_set gets created. Here is one. * DB_COMMAND() so that db_cmd_set gets created. Here is one.
*/ */
DB_COMMAND(panic, db_panic) DB_COMMAND_FLAGS(panic, db_panic, DB_CMD_MEMSAFE)
{ {
db_disable_pager(); db_disable_pager();
panic("from debugger"); panic("from debugger");

View File

@ -216,7 +216,7 @@ db_watchpoint_cmd(db_expr_t addr, bool have_addr, db_expr_t count,
* At least one non-optional show-command must be implemented using * At least one non-optional show-command must be implemented using
* DB_SHOW_COMMAND() so that db_show_cmd_set gets created. Here is one. * DB_SHOW_COMMAND() so that db_show_cmd_set gets created. Here is one.
*/ */
DB_SHOW_COMMAND(watches, db_listwatch_cmd) DB_SHOW_COMMAND_FLAGS(watches, db_listwatch_cmd, DB_CMD_MEMSAFE)
{ {
db_list_watchpoints(); db_list_watchpoints();
db_md_list_watchpoints(); db_md_list_watchpoints();

View File

@ -5376,7 +5376,7 @@ pci_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
* List resources based on pci map registers, used for within ddb * List resources based on pci map registers, used for within ddb
*/ */
DB_SHOW_COMMAND(pciregs, db_pci_dump) DB_SHOW_COMMAND_FLAGS(pciregs, db_pci_dump, DB_CMD_MEMSAFE)
{ {
struct pci_devinfo *dinfo; struct pci_devinfo *dinfo;
struct devlist *devlist_head; struct devlist *devlist_head;
@ -6787,7 +6787,7 @@ pci_print_faulted_dev(void)
} }
#ifdef DDB #ifdef DDB
DB_SHOW_COMMAND(pcierr, pci_print_faulted_dev_db) DB_SHOW_COMMAND_FLAGS(pcierr, pci_print_faulted_dev_db, DB_CMD_MEMSAFE)
{ {
pci_print_faulted_dev(); pci_print_faulted_dev();
@ -6816,7 +6816,7 @@ db_clear_pcie_errors(const struct pci_devinfo *dinfo)
pci_write_config(dev, aer + PCIR_AER_COR_STATUS, r, 4); pci_write_config(dev, aer + PCIR_AER_COR_STATUS, r, 4);
} }
DB_COMMAND(pci_clearerr, db_pci_clearerr) DB_COMMAND_FLAGS(pci_clearerr, db_pci_clearerr, DB_CMD_MEMSAFE)
{ {
struct pci_devinfo *dinfo; struct pci_devinfo *dinfo;
device_t dev; device_t dev;

View File

@ -644,7 +644,7 @@ extern inthand_t
* Display the index and function name of any IDT entries that don't use * Display the index and function name of any IDT entries that don't use
* the default 'rsvd' entry point. * the default 'rsvd' entry point.
*/ */
DB_SHOW_COMMAND(idt, db_show_idt) DB_SHOW_COMMAND_FLAGS(idt, db_show_idt, DB_CMD_MEMSAFE)
{ {
struct gate_descriptor *ip; struct gate_descriptor *ip;
int idx; int idx;
@ -677,7 +677,7 @@ DB_SHOW_COMMAND(idt, db_show_idt)
} }
/* Show privileged registers. */ /* Show privileged registers. */
DB_SHOW_COMMAND(sysregs, db_show_sysregs) DB_SHOW_COMMAND_FLAGS(sysregs, db_show_sysregs, DB_CMD_MEMSAFE)
{ {
uint64_t idtr, gdtr; uint64_t idtr, gdtr;
@ -708,7 +708,7 @@ DB_SHOW_COMMAND(sysregs, db_show_sysregs)
db_printf("PAT\t0x%016llx\n", rdmsr(MSR_PAT)); db_printf("PAT\t0x%016llx\n", rdmsr(MSR_PAT));
} }
DB_SHOW_COMMAND(dbregs, db_show_dbregs) DB_SHOW_COMMAND_FLAGS(dbregs, db_show_dbregs, DB_CMD_MEMSAFE)
{ {
db_printf("dr0\t0x%08x\n", rdr0()); db_printf("dr0\t0x%08x\n", rdr0());
@ -716,7 +716,7 @@ DB_SHOW_COMMAND(dbregs, db_show_dbregs)
db_printf("dr2\t0x%08x\n", rdr2()); db_printf("dr2\t0x%08x\n", rdr2());
db_printf("dr3\t0x%08x\n", rdr3()); db_printf("dr3\t0x%08x\n", rdr3());
db_printf("dr6\t0x%08x\n", rdr6()); db_printf("dr6\t0x%08x\n", rdr6());
db_printf("dr7\t0x%08x\n", rdr7()); db_printf("dr7\t0x%08x\n", rdr7());
} }
DB_SHOW_COMMAND(frame, db_show_frame) DB_SHOW_COMMAND(frame, db_show_frame)

View File

@ -893,7 +893,7 @@ db_show_print_syinit(struct sysinit *sip, bool ddb)
#undef xprint #undef xprint
} }
DB_SHOW_COMMAND(sysinit, db_show_sysinit) DB_SHOW_COMMAND_FLAGS(sysinit, db_show_sysinit, DB_CMD_MEMSAFE)
{ {
struct sysinit **sipp; struct sysinit **sipp;

View File

@ -2485,7 +2485,7 @@ ddb_display_domainset(const domainset_t *set)
ddb_display_bitset((const struct bitset *)set, DOMAINSET_SETSIZE); ddb_display_bitset((const struct bitset *)set, DOMAINSET_SETSIZE);
} }
DB_SHOW_COMMAND(cpusets, db_show_cpusets) DB_SHOW_COMMAND_FLAGS(cpusets, db_show_cpusets, DB_CMD_MEMSAFE)
{ {
struct cpuset *set; struct cpuset *set;
@ -2505,7 +2505,7 @@ DB_SHOW_COMMAND(cpusets, db_show_cpusets)
} }
} }
DB_SHOW_COMMAND(domainsets, db_show_domainsets) DB_SHOW_COMMAND_FLAGS(domainsets, db_show_domainsets, DB_CMD_MEMSAFE)
{ {
struct domainset *set; struct domainset *set;

View File

@ -4971,7 +4971,7 @@ DB_SHOW_COMMAND(file, db_show_file)
db_print_file(fp, 1); db_print_file(fp, 1);
} }
DB_SHOW_COMMAND(files, db_show_files) DB_SHOW_COMMAND_FLAGS(files, db_show_files, DB_CMD_MEMSAFE)
{ {
struct filedesc *fdp; struct filedesc *fdp;
struct file *fp; struct file *fp;

View File

@ -1599,7 +1599,7 @@ db_dump_intr_event(struct intr_event *ie, int handlers)
/* /*
* Dump data about interrupt handlers * Dump data about interrupt handlers
*/ */
DB_SHOW_COMMAND(intr, db_show_intr) DB_SHOW_COMMAND_FLAGS(intr, db_show_intr, DB_CMD_MEMSAFE)
{ {
struct intr_event *ie; struct intr_event *ie;
int all, verbose; int all, verbose;
@ -1683,7 +1683,7 @@ SYSCTL_PROC(_hw, OID_AUTO, intrcnt,
/* /*
* DDB command to dump the interrupt statistics. * DDB command to dump the interrupt statistics.
*/ */
DB_SHOW_COMMAND(intrcnt, db_show_intrcnt) DB_SHOW_COMMAND_FLAGS(intrcnt, db_show_intrcnt, DB_CMD_MEMSAFE)
{ {
u_long *i; u_long *i;
char *cp; char *cp;

View File

@ -417,7 +417,7 @@ static struct tstate tstate;
static int db_ktr_verbose; static int db_ktr_verbose;
static int db_mach_vtrace(void); static int db_mach_vtrace(void);
DB_SHOW_COMMAND(ktr, db_ktr_all) DB_SHOW_COMMAND_FLAGS(ktr, db_ktr_all, DB_CMD_MEMSAFE)
{ {
tstate.cur = (ktr_idx - 1) % ktr_entries; tstate.cur = (ktr_idx - 1) % ktr_entries;

View File

@ -1387,7 +1387,7 @@ kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat)
} }
#ifdef DDB #ifdef DDB
DB_COMMAND(kldstat, db_kldstat) DB_COMMAND_FLAGS(kldstat, db_kldstat, DB_CMD_MEMSAFE)
{ {
linker_file_t lf; linker_file_t lf;

View File

@ -1482,7 +1482,7 @@ get_malloc_stats(const struct malloc_type_internal *mtip, uint64_t *allocs,
return (alloced - freed); return (alloced - freed);
} }
DB_SHOW_COMMAND(malloc, db_show_malloc) DB_SHOW_COMMAND_FLAGS(malloc, db_show_malloc, DB_CMD_MEMSAFE)
{ {
const char *fmt_hdr, *fmt_entry; const char *fmt_hdr, *fmt_entry;
struct malloc_type *mtp; struct malloc_type *mtp;

View File

@ -997,7 +997,7 @@ db_print_pgrp_one(struct pgrp *pgrp, struct proc *p)
p->p_pptr == NULL ? 0 : isjobproc(p->p_pptr, pgrp)); p->p_pptr == NULL ? 0 : isjobproc(p->p_pptr, pgrp));
} }
DB_SHOW_COMMAND(pgrpdump, pgrpdump) DB_SHOW_COMMAND_FLAGS(pgrpdump, pgrpdump, DB_CMD_MEMSAFE)
{ {
struct pgrp *pgrp; struct pgrp *pgrp;
struct proc *p; struct proc *p;

View File

@ -1827,7 +1827,7 @@ dump_init_header(const struct dumperinfo *di, struct kerneldumpheader *kdh,
} }
#ifdef DDB #ifdef DDB
DB_SHOW_COMMAND(panic, db_show_panic) DB_SHOW_COMMAND_FLAGS(panic, db_show_panic, DB_CMD_MEMSAFE)
{ {
if (panicstr == NULL) if (panicstr == NULL)

View File

@ -1528,7 +1528,7 @@ _show_last_callout(int cpu, int direct, const char *dirstr)
db_printf("\ncpu %d last%s callout argument: %p\n", cpu, dirstr, arg); db_printf("\ncpu %d last%s callout argument: %p\n", cpu, dirstr, arg);
} }
DB_SHOW_COMMAND(callout_last, db_show_callout_last) DB_SHOW_COMMAND_FLAGS(callout_last, db_show_callout_last, DB_CMD_MEMSAFE)
{ {
int cpu, last; int cpu, last;

View File

@ -298,7 +298,7 @@ config_intrhook_drain(struct intr_config_hook *hook)
#ifdef DDB #ifdef DDB
#include <ddb/ddb.h> #include <ddb/ddb.h>
DB_SHOW_COMMAND(conifhk, db_show_conifhk) DB_SHOW_COMMAND_FLAGS(conifhk, db_show_conifhk, DB_CMD_MEMSAFE)
{ {
struct intr_config_hook *hook_entry; struct intr_config_hook *hook_entry;
char namebuf[64]; char namebuf[64];

View File

@ -344,7 +344,7 @@ pmap_unmapdev(vm_offset_t va, vm_size_t size)
#ifdef DDB #ifdef DDB
#include <ddb/ddb.h> #include <ddb/ddb.h>
DB_SHOW_COMMAND(devmap, db_show_devmap) DB_SHOW_COMMAND_FLAGS(devmap, db_show_devmap, DB_CMD_MEMSAFE)
{ {
devmap_dump_table(db_printf); devmap_dump_table(db_printf);
} }

View File

@ -1546,7 +1546,7 @@ intr_pic_init_secondary(void)
#endif #endif
#ifdef DDB #ifdef DDB
DB_SHOW_COMMAND(irqs, db_show_irqs) DB_SHOW_COMMAND_FLAGS(irqs, db_show_irqs, DB_CMD_MEMSAFE)
{ {
u_int i, irqsum; u_int i, irqsum;
u_long num; u_long num;

View File

@ -338,7 +338,7 @@ sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS)
} }
#ifdef DDB #ifdef DDB
DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) DB_SHOW_COMMAND_FLAGS(dpcpu_off, db_show_dpcpu_off, DB_CMD_MEMSAFE)
{ {
int id; int id;
@ -390,7 +390,7 @@ show_pcpu(struct pcpu *pc)
#endif #endif
} }
DB_SHOW_COMMAND(pcpu, db_show_pcpu) DB_SHOW_COMMAND_FLAGS(pcpu, db_show_pcpu, DB_CMD_MEMSAFE)
{ {
struct pcpu *pc; struct pcpu *pc;
int id; int id;
@ -421,5 +421,5 @@ DB_SHOW_ALL_COMMAND(pcpu, db_show_cpu_all)
} }
} }
} }
DB_SHOW_ALIAS(allpcpu, db_show_cpu_all); DB_SHOW_ALIAS_FLAGS(allpcpu, db_show_cpu_all, DB_CMD_MEMSAFE);
#endif #endif

View File

@ -515,7 +515,7 @@ physmem_init_kernel_globals(void)
#ifdef DDB #ifdef DDB
#include <ddb/ddb.h> #include <ddb/ddb.h>
DB_SHOW_COMMAND(physmem, db_show_physmem) DB_SHOW_COMMAND_FLAGS(physmem, db_show_physmem, DB_CMD_MEMSAFE)
{ {
physmem_dump_tables(db_printf); physmem_dump_tables(db_printf);

View File

@ -1127,7 +1127,7 @@ SYSCTL_PROC(_kern, OID_AUTO, msgbuf_clear,
#ifdef DDB #ifdef DDB
DB_SHOW_COMMAND(msgbuf, db_show_msgbuf) DB_SHOW_COMMAND_FLAGS(msgbuf, db_show_msgbuf, DB_CMD_MEMSAFE)
{ {
int i, j; int i, j;

View File

@ -1116,7 +1116,7 @@ DB_SHOW_COMMAND(rman, db_show_rman)
} }
} }
DB_SHOW_COMMAND(rmans, db_show_rmans) DB_SHOW_COMMAND_FLAGS(rmans, db_show_rmans, DB_CMD_MEMSAFE)
{ {
struct rman *rm; struct rman *rm;
@ -1134,5 +1134,5 @@ DB_SHOW_ALL_COMMAND(rman, db_show_all_rman)
dump_rman(rm); dump_rman(rm);
} }
} }
DB_SHOW_ALIAS(allrman, db_show_all_rman); DB_SHOW_ALIAS_FLAGS(allrman, db_show_all_rman, DB_CMD_MEMSAFE);
#endif #endif

View File

@ -1263,7 +1263,7 @@ DB_SHOW_ALL_COMMAND(chains, db_show_allchains)
} }
} }
} }
DB_SHOW_ALIAS(allchains, db_show_allchains) DB_SHOW_ALIAS_FLAGS(allchains, db_show_allchains, DB_CMD_MEMSAFE)
static void print_waiters(struct turnstile *ts, int indent); static void print_waiters(struct turnstile *ts, int indent);

View File

@ -2604,9 +2604,9 @@ DB_SHOW_ALL_COMMAND(locks, db_witness_list_all)
} }
} }
} }
DB_SHOW_ALIAS(alllocks, db_witness_list_all) DB_SHOW_ALIAS_FLAGS(alllocks, db_witness_list_all, DB_CMD_MEMSAFE)
DB_SHOW_COMMAND(witness, db_witness_display) DB_SHOW_COMMAND_FLAGS(witness, db_witness_display, DB_CMD_MEMSAFE)
{ {
witness_ddb_display(db_printf); witness_ddb_display(db_printf);
@ -2782,7 +2782,7 @@ sbuf_db_printf_drain(void *arg __unused, const char *data, int len)
return (db_printf("%.*s", len, data)); return (db_printf("%.*s", len, data));
} }
DB_SHOW_COMMAND(badstacks, db_witness_badstacks) DB_SHOW_COMMAND_FLAGS(badstacks, db_witness_badstacks, DB_CMD_MEMSAFE)
{ {
struct sbuf sb; struct sbuf sb;
char buffer[128]; char buffer[128];

View File

@ -5484,7 +5484,7 @@ DB_SHOW_COMMAND(buffer, db_show_buffer)
db_printf(" "); db_printf(" ");
} }
DB_SHOW_COMMAND(bufqueues, bufqueues) DB_SHOW_COMMAND_FLAGS(bufqueues, bufqueues, DB_CMD_MEMSAFE)
{ {
struct bufdomain *bd; struct bufdomain *bd;
struct buf *bp; struct buf *bp;
@ -5550,7 +5550,7 @@ DB_SHOW_COMMAND(bufqueues, bufqueues)
} }
} }
DB_SHOW_COMMAND(lockedbufs, lockedbufs) DB_SHOW_COMMAND_FLAGS(lockedbufs, lockedbufs, DB_CMD_MEMSAFE)
{ {
struct buf *bp; struct buf *bp;
int i; int i;
@ -5588,7 +5588,7 @@ DB_SHOW_COMMAND(vnodebufs, db_show_vnodebufs)
} }
} }
DB_COMMAND(countfreebufs, db_coundfreebufs) DB_COMMAND_FLAGS(countfreebufs, db_coundfreebufs, DB_CMD_MEMSAFE)
{ {
struct buf *bp; struct buf *bp;
int i, used = 0, nfree = 0; int i, used = 0, nfree = 0;

View File

@ -4271,7 +4271,7 @@ vn_printf(struct vnode *vp, const char *fmt, ...)
* List all of the locked vnodes in the system. * List all of the locked vnodes in the system.
* Called when debugging the kernel. * Called when debugging the kernel.
*/ */
DB_SHOW_COMMAND(lockedvnods, lockedvnodes) DB_SHOW_COMMAND_FLAGS(lockedvnods, lockedvnodes, DB_CMD_MEMSAFE)
{ {
struct mount *mp; struct mount *mp;
struct vnode *vp; struct vnode *vp;

View File

@ -769,7 +769,7 @@ db_show_vnet_print_vs(struct vnet_sysinit *vs, int ddb)
#undef xprint #undef xprint
} }
DB_SHOW_COMMAND(vnet_sysinit, db_show_vnet_sysinit) DB_SHOW_COMMAND_FLAGS(vnet_sysinit, db_show_vnet_sysinit, DB_CMD_MEMSAFE)
{ {
struct vnet_sysinit *vs; struct vnet_sysinit *vs;
@ -783,7 +783,7 @@ DB_SHOW_COMMAND(vnet_sysinit, db_show_vnet_sysinit)
} }
} }
DB_SHOW_COMMAND(vnet_sysuninit, db_show_vnet_sysuninit) DB_SHOW_COMMAND_FLAGS(vnet_sysuninit, db_show_vnet_sysuninit, DB_CMD_MEMSAFE)
{ {
struct vnet_sysinit *vs; struct vnet_sysinit *vs;
@ -799,7 +799,7 @@ DB_SHOW_COMMAND(vnet_sysuninit, db_show_vnet_sysuninit)
} }
#ifdef VNET_DEBUG #ifdef VNET_DEBUG
DB_SHOW_COMMAND(vnetrcrs, db_show_vnetrcrs) DB_SHOW_COMMAND_FLAGS(vnetrcrs, db_show_vnetrcrs, DB_CMD_MEMSAFE)
{ {
struct vnet_recursion *vnr; struct vnet_recursion *vnr;

View File

@ -1951,7 +1951,7 @@ db_show_drivers(void)
} }
} }
DB_SHOW_COMMAND(crypto, db_show_crypto) DB_SHOW_COMMAND_FLAGS(crypto, db_show_crypto, DB_CMD_MEMSAFE)
{ {
struct cryptop *crp; struct cryptop *crp;
struct crypto_ret_worker *ret_worker; struct crypto_ret_worker *ret_worker;

View File

@ -5822,7 +5822,7 @@ get_uma_stats(uma_keg_t kz, uma_zone_t z, uint64_t *allocs, uint64_t *used,
return (((int64_t)*used + *cachefree) * kz->uk_size); return (((int64_t)*used + *cachefree) * kz->uk_size);
} }
DB_SHOW_COMMAND(uma, db_show_uma) DB_SHOW_COMMAND_FLAGS(uma, db_show_uma, DB_CMD_MEMSAFE)
{ {
const char *fmt_hdr, *fmt_entry; const char *fmt_hdr, *fmt_entry;
uma_keg_t kz; uma_keg_t kz;
@ -5895,7 +5895,7 @@ DB_SHOW_COMMAND(uma, db_show_uma)
} }
} }
DB_SHOW_COMMAND(umacache, db_show_umacache) DB_SHOW_COMMAND_FLAGS(umacache, db_show_umacache, DB_CMD_MEMSAFE)
{ {
uma_zone_t z; uma_zone_t z;
uint64_t allocs, frees; uint64_t allocs, frees;

View File

@ -2706,7 +2706,7 @@ vm_object_in_map(vm_object_t object)
return 0; return 0;
} }
DB_SHOW_COMMAND(vmochk, vm_object_check) DB_SHOW_COMMAND_FLAGS(vmochk, vm_object_check, DB_CMD_MEMSAFE)
{ {
vm_object_t object; vm_object_t object;
@ -2804,7 +2804,7 @@ vm_object_print(
vm_object_print_static(addr, have_addr, count, modif); vm_object_print_static(addr, have_addr, count, modif);
} }
DB_SHOW_COMMAND(vmopag, vm_object_print_pages) DB_SHOW_COMMAND_FLAGS(vmopag, vm_object_print_pages, DB_CMD_MEMSAFE)
{ {
vm_object_t object; vm_object_t object;
vm_pindex_t fidx; vm_pindex_t fidx;

View File

@ -5533,7 +5533,7 @@ vm_page_assert_pga_writeable(vm_page_t m, uint16_t bits)
#include <ddb/ddb.h> #include <ddb/ddb.h>
DB_SHOW_COMMAND(page, vm_page_print_page_info) DB_SHOW_COMMAND_FLAGS(page, vm_page_print_page_info, DB_CMD_MEMSAFE)
{ {
db_printf("vm_cnt.v_free_count: %d\n", vm_free_count()); db_printf("vm_cnt.v_free_count: %d\n", vm_free_count());
@ -5547,7 +5547,7 @@ DB_SHOW_COMMAND(page, vm_page_print_page_info)
db_printf("vm_cnt.v_inactive_target: %d\n", vm_cnt.v_inactive_target); db_printf("vm_cnt.v_inactive_target: %d\n", vm_cnt.v_inactive_target);
} }
DB_SHOW_COMMAND(pageq, vm_page_print_pageq_info) DB_SHOW_COMMAND_FLAGS(pageq, vm_page_print_pageq_info, DB_CMD_MEMSAFE)
{ {
int dom; int dom;

View File

@ -1860,7 +1860,7 @@ vm_phys_early_startup(void)
/* /*
* Show the number of physical pages in each of the free lists. * Show the number of physical pages in each of the free lists.
*/ */
DB_SHOW_COMMAND(freepages, db_show_freepages) DB_SHOW_COMMAND_FLAGS(freepages, db_show_freepages, DB_CMD_MEMSAFE)
{ {
struct vm_freelist *fl; struct vm_freelist *fl;
int flind, oind, pind, dom; int flind, oind, pind, dom;

View File

@ -1701,7 +1701,7 @@ apic_idt_to_irq(u_int apic_id, u_int vector)
/* /*
* Dump data about APIC IDT vector mappings. * Dump data about APIC IDT vector mappings.
*/ */
DB_SHOW_COMMAND(apic, db_show_apic) DB_SHOW_COMMAND_FLAGS(apic, db_show_apic, DB_CMD_MEMSAFE)
{ {
struct intsrc *isrc; struct intsrc *isrc;
int i, verbose; int i, verbose;
@ -1765,7 +1765,7 @@ dump_mask(const char *prefix, uint32_t v, int base)
} }
/* Show info from the lapic regs for this CPU. */ /* Show info from the lapic regs for this CPU. */
DB_SHOW_COMMAND(lapic, db_show_lapic) DB_SHOW_COMMAND_FLAGS(lapic, db_show_lapic, DB_CMD_MEMSAFE)
{ {
uint32_t v; uint32_t v;