From nobody Wed Sep 27 12:53:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rwc3c1kFjz4vQxv; Wed, 27 Sep 2023 12:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rwc3c11JPz4VSQ; Wed, 27 Sep 2023 12:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/tJV9ZSBkQdFpgA8X0LfgS6AaTQ27A36VpRjXDvGUc=; b=FsrRaJwYlTiu3T9glB6xN+n7372g/rvrcd2zdTFtwmzxZpfK+qBvgHbuJmqtrbB2KgoAfO 8z0OhShtHNLRuXjn7xVE5wRStwoprv2MduBGsCQ8yjEIC8NPcj3Bx6Af4mZu3gxLUPhGBR x+LK0qkSBip73MbnCirKW4ZDsNgehh53FZI+NEgPhn6bRYfX3xF1cpqv6dN46xL3++imkB C/GFdVAQbHALTmlVQnvlDZOZbhJ+0IS2BhPO6DkcQpO5aOXCnztNBb/rNBNy22lnekCvXB x/3OFEh9KcAemO0F98mULrzWt2sln78vHx6o7j0udm4typD+gRtK+aJyH9zhrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695819196; a=rsa-sha256; cv=none; b=ln1QANUkaofq4QYTmXJ+FqXdXONdp+/xyhp1SrMgp59+LrOD3J2HUZcapeaY9xRPeTiYUk GgNW80pBtjzIvIbqBP1g/EStXZYJMIMdQ5CRxzC/1Q2rCQhFKGCTkCNemYOCGILVpd3+tP msT2fU3JwtArUnPVDVi8OT/0vTKo7wF7OJ0QzZBq8TJ6m+329R1tBH04/W4cSSl0kizu9W RMWZfH2RYQSgCp+IsrrAGgHgNZDIS0WFbja9KrR1Bg7/rL4F2yJuCbfedOc6hvLlq/BLIh f3sxc1r9hpFScoDyVuEkYhCj1VowXCeEUqcHJ9423beCuRewBNzCzXQP54ioIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695819196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1/tJV9ZSBkQdFpgA8X0LfgS6AaTQ27A36VpRjXDvGUc=; b=a99Mp9k0b8bzCpS4ldtNEZcTffKVLEJl66lSWpBKvI/JeDsLZOYDOJ7Zi247wCsN3BYZvC lkWBFHH0nB8wq4PykVIcEhSiQ0r6GgbSCCNwOJ2yfQPHPFJ1VHtru5ctGS+82OOPYW4dkW y6gvLWHZevkip7f7nFMHqRhl70zE69IdhWfC0wvgm25fJcbWexV7uwhCBrVjoN33u4z+q4 k9DBbTM2Cw5oJoVdH34+WlJepU4k0YbU+dPHJlnTjh6tV+KcDn/hHIk7rZ1DfULbiVJmi4 fOcdrfdy8EpkHt1bF5vMw/kH59scF5LjHoAPf4SjOtEB/0N52Sol6lK3tWCs1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rwc3c02cQzfxH; Wed, 27 Sep 2023 12:53:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38RCrFQg024431; Wed, 27 Sep 2023 12:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38RCrFoW024428; Wed, 27 Sep 2023 12:53:15 GMT (envelope-from git) Date: Wed, 27 Sep 2023 12:53:15 GMT Message-Id: <202309271253.38RCrFoW024428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fa1ffd9f4b14 - stable/14 - amd64: Convert a cheap DIAGNOSTIC check to a KASSERT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 commit fa1ffd9f4b1486075fcbd1ffa90430d66936d7f6 Author: Mark Johnston AuthorDate: 2023-08-11 15:54:34 +0000 Commit: Mark Johnston 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); /*