Update for the KDB framework:
o Call kdb_enter() instead of Debugger().
This commit is contained in:
parent
f33ca0c961
commit
32240d082c
@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/eventhandler.h>
|
||||
#include <sys/extattr.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/kthread.h>
|
||||
#include <sys/mac.h>
|
||||
@ -3775,7 +3776,7 @@ vfs_badlock(const char *msg, const char *str, struct vnode *vp)
|
||||
if (vfs_badlock_print)
|
||||
printf("%s: %p %s\n", str, (void *)vp, msg);
|
||||
if (vfs_badlock_ddb)
|
||||
Debugger("lock violation");
|
||||
kdb_enter("lock violation");
|
||||
}
|
||||
|
||||
void
|
||||
@ -3884,7 +3885,7 @@ vop_strategy_pre(void *ap)
|
||||
printf(
|
||||
"VOP_STRATEGY: bp is not locked but should be\n");
|
||||
if (vfs_badlock_ddb)
|
||||
Debugger("lock violation");
|
||||
kdb_enter("lock violation");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/limits.h>
|
||||
@ -799,7 +800,7 @@ vn_ioctl(fp, com, data, active_cred, td)
|
||||
error = VOP_IOCTL(vp, com, data, fp->f_flag, active_cred, td);
|
||||
if (error == ENOIOCTL) {
|
||||
#ifdef DIAGNOSTIC
|
||||
Debugger("ENOIOCTL leaked through");
|
||||
kdb_enter("ENOIOCTL leaked through");
|
||||
#endif
|
||||
error = ENOTTY;
|
||||
}
|
||||
|
@ -179,6 +179,7 @@ __FBSDID("$FreeBSD$");
|
||||
#ifdef _KERNEL
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/sysctl.h>
|
||||
@ -256,7 +257,7 @@ __FBSDID("$FreeBSD$");
|
||||
(void)printf("assertion \"%s\" failed: " \
|
||||
"file \"%s\", line %d\n", \
|
||||
#expression, __FILE__, __LINE__); \
|
||||
Debugger(""); \
|
||||
kdb_enter(""); \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/acl.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/kdb.h>
|
||||
#include <sys/extattr.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/mac.h>
|
||||
@ -395,9 +396,9 @@ mac_test_destroy_bpfdesc_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_bpfdesc, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_bpfdesc: dup destroy");
|
||||
kdb_enter("mac_test_destroy_bpfdesc: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_bpfdesc: corrupted label");
|
||||
kdb_enter("mac_test_destroy_bpfdesc: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,9 +410,9 @@ mac_test_destroy_cred_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_cred, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_cred: dup destroy");
|
||||
kdb_enter("mac_test_destroy_cred: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_cred: corrupted label");
|
||||
kdb_enter("mac_test_destroy_cred: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,9 +424,9 @@ mac_test_destroy_devfsdirent_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_devfsdirent, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_devfsdirent: dup destroy");
|
||||
kdb_enter("mac_test_destroy_devfsdirent: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_devfsdirent: corrupted label");
|
||||
kdb_enter("mac_test_destroy_devfsdirent: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -437,9 +438,9 @@ mac_test_destroy_ifnet_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_ifnet, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_ifnet: dup destroy");
|
||||
kdb_enter("mac_test_destroy_ifnet: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_ifnet: corrupted label");
|
||||
kdb_enter("mac_test_destroy_ifnet: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,9 +452,9 @@ mac_test_destroy_inpcb_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_inpcb, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_inpcb: dup destroy");
|
||||
kdb_enter("mac_test_destroy_inpcb: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_inpcb: corrupted label");
|
||||
kdb_enter("mac_test_destroy_inpcb: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,9 +466,9 @@ mac_test_destroy_ipq_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_ipq, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_ipq: dup destroy");
|
||||
kdb_enter("mac_test_destroy_ipq: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_ipq: corrupted label");
|
||||
kdb_enter("mac_test_destroy_ipq: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -487,9 +488,9 @@ mac_test_destroy_mbuf_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_mbuf, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_mbuf: dup destroy");
|
||||
kdb_enter("mac_test_destroy_mbuf: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_mbuf: corrupted label");
|
||||
kdb_enter("mac_test_destroy_mbuf: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -501,9 +502,9 @@ mac_test_destroy_mount_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_mount, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_mount: dup destroy");
|
||||
kdb_enter("mac_test_destroy_mount: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_mount: corrupted label");
|
||||
kdb_enter("mac_test_destroy_mount: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -515,9 +516,9 @@ mac_test_destroy_mount_fs_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_mount_fslabel, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_mount_fslabel: dup destroy");
|
||||
kdb_enter("mac_test_destroy_mount_fslabel: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_mount_fslabel: corrupted label");
|
||||
kdb_enter("mac_test_destroy_mount_fslabel: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -529,9 +530,9 @@ mac_test_destroy_socket_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_socket, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_socket: dup destroy");
|
||||
kdb_enter("mac_test_destroy_socket: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_socket: corrupted label");
|
||||
kdb_enter("mac_test_destroy_socket: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -543,9 +544,9 @@ mac_test_destroy_socket_peer_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_socket_peerlabel, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_socket_peerlabel: dup destroy");
|
||||
kdb_enter("mac_test_destroy_socket_peerlabel: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_socket_peerlabel: corrupted label");
|
||||
kdb_enter("mac_test_destroy_socket_peerlabel: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -557,9 +558,9 @@ mac_test_destroy_pipe_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_pipe, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_pipe: dup destroy");
|
||||
kdb_enter("mac_test_destroy_pipe: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_pipe: corrupted label");
|
||||
kdb_enter("mac_test_destroy_pipe: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -571,9 +572,9 @@ mac_test_destroy_proc_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_proc, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_proc: dup destroy");
|
||||
kdb_enter("mac_test_destroy_proc: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_proc: corrupted label");
|
||||
kdb_enter("mac_test_destroy_proc: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
@ -585,9 +586,9 @@ mac_test_destroy_vnode_label(struct label *label)
|
||||
atomic_add_int(&destroy_count_vnode, 1);
|
||||
SLOT(label) = EXMAGIC;
|
||||
} else if (SLOT(label) == EXMAGIC) {
|
||||
Debugger("mac_test_destroy_vnode: dup destroy");
|
||||
kdb_enter("mac_test_destroy_vnode: dup destroy");
|
||||
} else {
|
||||
Debugger("mac_test_destroy_vnode: corrupted label");
|
||||
kdb_enter("mac_test_destroy_vnode: corrupted label");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user