From nobody Tue Aug 11 16:22:43 2026 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 4hKH37571zz6nxZC for ; Tue, 11 Aug 2026 16:22:43 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hKH372BWTz3MPF for ; Tue, 11 Aug 2026 16:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786465363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2z0Iptw2icQvg+rUz/UybZmxrT32Wzp2HQTtcDNZiI=; b=hC4w04Ay1jZKNvgmxFlpWZzFy0S0c8+gEMjn2V/DrMMMJtrsQxDDVR9gamsG/ALK9zkkL2 pONbnvM4ezFU1Fb1fXDtCEmVFFrp4iqfmtE1CcehPHyIa6/1Ofi2TZqHZySMEQyZVPbrA4 nm+bu22QoDS9GpW8stJMDTw0q3K/WX/jRAJmHQmXi5OZREIIOKTULYmBxyBcVHNXbhFTnS ueODMBZYORMyxBxkl8dUUmfl2sWm/HD2Dvxm5zpkcQiSwSsWIUwSET9TthFWT0eoal8hLb bxgdnvsiVz3iWP0rYxdhjhjqhddRTPLOIte+1T2jD8jLYF1hgDaBZbirSt+Plw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786465363; a=rsa-sha256; cv=none; b=CwVNKEMQPaqWiaXoHC1gA/kgEAaBw7AZ5hZTxlS7PtTrGHSDmUFYq/Zmq1vF8kfSs0D8mC lbGzbCtmqjkOk98NAKd/UB10lgtwlDo29R5sgPyH7HiKM8LAyXC+R0o5TD93aGAQoWsqLE CX4LCpSkKbp8kPk7Sd0nH+N3qOPZqxvDiJtNSJoBO/s41+1elEgMtHQQdRYx0lou5EmEgB 8AZ09yhN0o7Tp62z+wQAROvCO1hlFzdyCBXRMBPlhYpUF3Zzi81BYxf6iKIECVtuROEeLj iJpr7wM2d2b25Qs9lYVyJ8RiTltl9x6GcnzFKMZEQegGF3LbsBYgU09O0JomqA== 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=1786465363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U2z0Iptw2icQvg+rUz/UybZmxrT32Wzp2HQTtcDNZiI=; b=yIydaYRQonemj6iv4n6vDDEpBw55uIZxQJPQsbm9PsGIW03H/UzYvWwLv6ji14qTi3K1Wt pNs8D91X6Edz1NtH6gPaypQJsMFe7bvJ/DtWhu9ALFaoZT+NqplFxDuD3xv3MPIYef9gka zbMjJ3VcRbOrn/A/fj7fF5KKoGDm0ZvAFGfsksutbXX6+sBWh7fVUU0atBIZTtFFkZEQmr rEZSKjnuwBA8ptVtoeIdgZ3ekbMlfG1T7PFuZMpeYIEJfcP+jJP2UJrE7BJrjJujgHOmlh wvVvMMY3/KuFnYsAedSLjFIlfba0XXM58zS/jjKLgfiKvNyo0bOLJ1UCJ6zNeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hKH370yjKz11dR for ; Tue, 11 Aug 2026 16:22:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 11 Aug 2026 16:22:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Andre Silva From: Mitchell Horne Subject: git: af3929c5152b - main - hwpmc: fix false callchain assertion on the PMC_UR ring 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af3929c5152b47278c0b6ea66efbb782b9637495 Auto-Submitted: auto-generated Date: Tue, 11 Aug 2026 16:22:43 +0000 Message-Id: <6a7b4c53.3ab9b.14b70db6@gitrepo.freebsd.org> The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=af3929c5152b47278c0b6ea66efbb782b9637495 commit af3929c5152b47278c0b6ea66efbb782b9637495 Author: Andre Silva AuthorDate: 2026-08-11 16:17:57 +0000 Commit: Mitchell Horne CommitDate: 2026-08-11 16:22:01 +0000 hwpmc: fix false callchain assertion on the PMC_UR ring pmc_capture_user_callchain() asserts that TDP_CALLCHAIN is set on the current thread, but PMC_UR samples never set that flag -- only PMC_HR and PMC_SR do. That makes the assertion always fail for PMC_UR, panicking INVARIANTS kernels as soon as pmcstat -U is used. Skip the assertion for PMC_UR. No functional change on kernels built without INVARIANTS. Signed-off-by: Andre Silva Reviewed by: mhorne MFC after: 1 week Sponsored by: AMD Differential Revision: https://reviews.freebsd.org/D58572 --- sys/dev/hwpmc/hwpmc_mod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index e2d5a044e0b8..bfa8a217235e 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -4983,7 +4983,7 @@ pmc_capture_user_callchain(int cpu, int ring, struct trapframe *tf) pass = 0; start_ticks = ticks; - KASSERT(td->td_pflags & TDP_CALLCHAIN, + KASSERT(ring == PMC_UR || (td->td_pflags & TDP_CALLCHAIN) != 0, ("[pmc,%d] Retrieving callchain for thread that doesn't want it", __LINE__)); restart: