From nobody Thu Sep 03 16:29:52 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 4hbQ6n01mGz6rVQ4 for ; Thu, 03 Sep 2026 16:29:53 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hbQ6m5n1Bz4Pyh for ; Thu, 03 Sep 2026 16:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788452992; 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=APAo+/5pyC3dCuNI6qG6EoarWs+i2lrnp5vT/3KzSJ4=; b=WMUQeiCy46ZNpv0qWYfgAKGDdQhQ/4b6Gc2rYpn5OEiiwShEpZ2yEEi1nz5K/EYcPrqHJn PxG1aIOip/YkQmBKiJr+W/ups+7pofaVTB8+PTAYmxiD4o1cyrtCeeJuZVCLO2LcLgIhpy QXIpMohtWBAD2+kVfpCe0549fny2ZdYt7+dtvtrryl8WWh20+tVj77KKpcoKy30EJVYy3l QEPRRB6H3cLz9DYIucpGhn7zYE32di996Yac5WMQMRPbEC4o35+grz9Izi5QMAyFQs+ceX WsqEDl7mdWYI/JiStBMYg5rbJYjoAeAUkM+cgsVUNW2e8H8fv8n3mt498yiK9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788452992; a=rsa-sha256; cv=none; b=RPyGrHGQdKeVr17R9KuFrYr2xNPvir0//iWNdVHjYQ/r/8RQfX0IW4tuvBEbS8WtFdtYzG GEpf09vCXT5Cggk6APjIjTN6+ABUED63uD0G7OC+ZKar/Jikf88eidRn4x4t28Jj6dKgop 1mxuVXShZscO+AtMr6j0Lxz2Io7fvDi5tk/M8ILH1sZE7oJbk0RZcALlRa101N86w7N9r1 LNXLiRkWf0KWO1uivA9o0TBl7+vKoTJ1qjQ2oPym09SOE72QDr1+fDR8we/3KixRHOkGZk EyFziOTgk20sVuyu0cx0Gbua4LNttrSUpg8SDbxKNNB1MkL0AJ5IU1ew5XNKUA== 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=1788452992; 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=APAo+/5pyC3dCuNI6qG6EoarWs+i2lrnp5vT/3KzSJ4=; b=IwY5e95CMi1kTPgCb9DbTofLuPbrXTRPhUzdg0uoEfwwoTuzqKgB+AZDZS4VZHjKeHSwk8 46y5LPmEbnK3yg/zQ56t7rSdBovyJ+GN90yu6nbfNwdJLajtbtE4e+otLIiOHlg7/dVE7u tN2hU7hYaxK2CHR2AVEUJ8b3nUuXc8ig/OXk1sFXVE0aDjQtHiCAH/sIbPmSs5P7jLWA/m 2qz2yhb2Kt+q3KfLQgvK3TFs5QHQkudVHDwXk/iGvge+VRXReXz1NGKbhDR6VAKxiIJMLk Ythi9OWTvov7ORv+lUcUdkA6FvdN7Q1Foa8s3on48F4HtTE/b06BpCu+AKKpxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hbQ6m4htfz5bp for ; Thu, 03 Sep 2026 16:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 03 Sep 2026 16:29:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andre Silva From: Mitchell Horne Subject: git: 84b241f1cc12 - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 84b241f1cc122a8735abffa74ea5f74b56b61648 Auto-Submitted: auto-generated Date: Thu, 03 Sep 2026 16:29:52 +0000 Message-Id: <6a99a080.38a23.3bf8736d@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=84b241f1cc122a8735abffa74ea5f74b56b61648 commit 84b241f1cc122a8735abffa74ea5f74b56b61648 Author: Andre Silva AuthorDate: 2026-08-11 16:17:57 +0000 Commit: Mitchell Horne CommitDate: 2026-09-03 16:27:28 +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 (cherry picked from commit af3929c5152b47278c0b6ea66efbb782b9637495) --- 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 21effa80a4bb..342b600276b0 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -4776,7 +4776,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: