git: fa1ffd9f4b14 - stable/14 - amd64: Convert a cheap DIAGNOSTIC check to a KASSERT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Sep 2023 12:53:15 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 commit fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-08-11 15:54:34 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-09-27 12:32:25 +0000 amd64: Convert a cheap DIAGNOSTIC check to a KASSERT MFC after: 1 week (cherry picked from commit f7c733e4fe5d55fd78cd2b0c27483eeaff3f79a3) --- sys/amd64/amd64/trap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 0d9a660abdb8..4d5887369207 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -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); /*