From nobody Thu Sep 03 16:29:52 2026 X-Original-To: dev-commits-src-branches@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 4hbQ6n2pv2z6rVSR 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 4hbQ6m6lPgz4Plg 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=1788452993; 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=Z4ONQI5NOcBU9OO3hL3AvSXllFketvoEzhAUj2krujgM+XxoUSvEquBf2uS1ztQIZZRgcB lPFIm6INEmwMqSlRye9Ob91jIEm/0ytBPPKYI9p+cb0PD3JykxZmxV9g+HYznvPaTpuJtN dMx7xSMRRB6OBlK1rp5+q0cjsqfk1oNCg1tHia1nzLe6t3na4iUy4YOfuexcSEGv2zTx7N 4ZiHfc+oHkFaLhnlctlJQObEiBpmn/XDmPloPbBNlrCKQKRH1TA4YSO6ojMBa0+zpk5IAI mt4GQxB1AGSp32ZvrmXFUhYQln5PWk2vf20GAqUzBgQhW7XtwdKDwxxmuSojhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788452993; a=rsa-sha256; cv=none; b=BL7Hx9OIGwrBNVYRKb+T94hUw/2EyhR34Kk+abjjxSszjylLGINMZG+JXfuwq8MidmeZ6L BO0UebzcTnt/1F1/vybcDqcXvvVSJ0iTKP6Mhf6dqwaOzdfhDw/xvWTlU0X7R/+HoP3pUe HppEWY5bFnonsw500s6R0j8Ze7nqczMlJ854+qd12KZWjNFTlIgBr6RsLFhZjHqPMx6q4q ABHL0kisbgbyilMHk3Jy8NTwrygdLsGwN82J7HE+SItDZM3RsJyY9XgG6Q5eZY4TqZF6Ns f8WYF5JJoya2LIEBYS8tHOR2KrVU0GUJ/xrmm5dShSK79XeOwmiTYGBVBvkXEQ== 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=1788452993; 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=TO7Q8+sW9eR59mStGautPtAxWiKv1wY9kGzM5CYac8Xs4sUguzmtNzbZkAjXCtjmt+xuRQ NdLRu88Sb6nBc01CyVjOksG8Z6+9QBBSLTqr1efjBtTrykVKuh0EhkWnUD1OxjLPy4z5xo f05Y7bl0Xi8TmIh2vBx1cq3D1SPLmAd1GEiROXF3sQYBeIa7rYRXwGKTchM3VxXf5g9QqV 4brWgV3sY8DUgXX2efZJhM6igzzHhKUoOiOkWhJIYy+sF66QoDobC9Mwrg9svh05r06qir DfSZYlWpCyNfWTZs22g0WjgQ18FZ26K2OlAowKeww1yh/dzBYTwDLRP5zm30oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hbQ6m55XBz4hk 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: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: