From nobody Wed Aug 24 19:25:16 2022 X-Original-To: dev-commits-src-main@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 4MCbf43rwzz4Zfky; Wed, 24 Aug 2022 19:25: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 4MCbf434slz3PxP; Wed, 24 Aug 2022 19:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661369116; 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=2PLCOAJ0HWCefuJAQcdIGwq1a/AXA4qxMxau7sJuI9s=; b=S4I8bk95KQQLkqKi6THJF6LVRew2XpYoSp3+fVdiatl4hQde70tg0Inq8nwpPBAfQCzykR IWsiW2GrR4PftkxCT/NJddlAPZbfdmZw0UJhgFahquVJ4Zcgr3OsiSYATmxl2OjaymbUNY 7Omi7RaYDZHlmfzK/rCsH3YyT3sbPSZwM+KPMeY8UMrUk434e9ndHDmxz+EWrjdm4varKa sUBbZx11yLLrR5u5MAdArxbnnJAdccqwqxSZFAkvv8KESEQchx5OQ+x/Q7P5hlMpHdlPW/ LNjh5BcsVJDjJ4Eh6w8UJBEub02WfPCRdJjkuWrkiBkDeaJwh0aZqE7v01yIiw== 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 4MCbf428hDzKgW; Wed, 24 Aug 2022 19:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27OJPGTf069262; Wed, 24 Aug 2022 19:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27OJPG2M069261; Wed, 24 Aug 2022 19:25:16 GMT (envelope-from git) Date: Wed, 24 Aug 2022 19:25:16 GMT Message-Id: <202208241925.27OJPG2M069261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 01a33b2af534 - main - x86: print trap name in addition of trap number List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01a33b2af534445ef4d417175dc77a27d7575a76 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661369116; 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=2PLCOAJ0HWCefuJAQcdIGwq1a/AXA4qxMxau7sJuI9s=; b=mpP09q1HSFhi+SHCtkHAYEMIGRc3EA7/WFsb5L+HMvErDzAEYSA/bT+tf6m4KeB0OOj7za WAfxi3ymccgZq4vdfvMpwEyJS60rbH9GvvTXZKK0HgcL0fhX6u4PtU9j04h0KHPU1Py5Kd xeYSuXtsMEl0bKViKypWtcpjkBDwevZxJBWLg9ucKGUCka63G1z9IdHgqhYI6sfHO5U7jb D/Clv+4+6dW4J5oSAKb+BHhPCtwambg8kanYSjYrhyUTJ1vJ4yn2XKH9fGuC+SHZMLtv3h afyc4cIXAqUF65TPRa1xCCWdKkhdgKxeyLzPbPWmWa5brShmmcwz3t+cOw+/xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661369116; a=rsa-sha256; cv=none; b=rGDFLtqmHQ+9nFz7AATC5YFVVhomNAJ1U/CW0/71rHjeFmXM1+Bg9Pph1BrErZeIu2O+uM QMdKbi/L97APHHydMakNk+yEVzvbU4As+T5G9LYt8WD4oQ7wqKM4HhF4+z2kus/3S/ZM2o oGN//xrPszFNlLfsf9mMxH57nVmb3drJYalKU1ua6VpknLun2uxZDAmvm6+4dopBZINEk6 w0PLs9vDFgW8d0g5IniVC0UHcqEEXyDUGgmj6qd574dEI+RqaGRIvY2C9CG9uJui3BWAPs FEhm+WW1c9i4evt7s4+e+vtvvDJbaE06CSZ0y2xkNWubU9VEhhaPw01+ZEjeng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=01a33b2af534445ef4d417175dc77a27d7575a76 commit 01a33b2af534445ef4d417175dc77a27d7575a76 Author: Konstantin Belousov AuthorDate: 2022-08-21 01:46:13 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-24 19:12:37 +0000 x86: print trap name in addition of trap number for the "trap with interrupts disabled" warning. Reviewed by: jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36302 --- sys/amd64/amd64/trap.c | 6 ++++-- sys/i386/i386/trap.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index df26797ca129..42fb19819111 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -277,8 +277,10 @@ trap(struct trapframe *frame) */ if (TRAPF_USERMODE(frame)) { uprintf( - "pid %ld (%s): trap %d with interrupts disabled\n", - (long)curproc->p_pid, curthread->td_name, type); + "pid %ld (%s): trap %d (%s) " + "with interrupts disabled\n", + (long)curproc->p_pid, curthread->td_name, type, + trap_msg[type]); } else { switch (type) { case T_NMI: diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 8765bebfd5b9..5a247a36d2e9 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -283,8 +283,10 @@ trap(struct trapframe *frame) */ if ((frame->tf_eflags & PSL_I) == 0 && TRAPF_USERMODE(frame) && (curpcb->pcb_flags & PCB_VM86CALL) == 0) - uprintf("pid %ld (%s): trap %d with interrupts disabled\n", - (long)curproc->p_pid, curthread->td_name, type); + uprintf("pid %ld (%s): usermode trap %d (%s) with " + "interrupts disabled\n", + (long)curproc->p_pid, curthread->td_name, type, + trap_data[type].msg); /* * Conditionally reenable interrupts. If we hold a spin lock,