amd64: Convert a cheap DIAGNOSTIC check to a KASSERT

MFC after:	1 week
This commit is contained in:
Mark Johnston 2023-08-11 11:54:34 -04:00
parent 8f26ed01bd
commit f7c733e4fe

View file

@ -1188,12 +1188,9 @@ amd64_syscall(struct thread *td, int traced)
kmsan_mark(td->td_frame, sizeof(*td->td_frame), KMSAN_STATE_INITED);
#ifdef DIAGNOSTIC
if (!TRAPF_USERMODE(td->td_frame)) {
panic("syscall");
/* NOT REACHED */
}
#endif
KASSERT(TRAPF_USERMODE(td->td_frame),
("%s: not from user mode", __func__));
syscallenter(td);
/*