From nobody Mon Jun 15 00:04:36 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0ABAA3921C8; Tue, 7 Apr 2026 07:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775545604; cv=none; b=oVoynxl0eQD04UUqMOloXqxfdX6d2lOCQ14AL/qM2851GUSWfMC5ty/buZZL1XwlJuewhKH5CLW+ABlEPpoaW3cWB9WLG7kJG/k+zdkuQJZQCkKntM4/LrOOih6lX2n2Uuw/nrMp2wHMy2Fvy7RM15x+2XLFhUtOudNo7iNAcg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775545604; c=relaxed/simple; bh=cmib/UictePTMmibNZkNIWC16mC5UCQ5EyJrAOrqg9Q=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=e4JCL1g6GezFHzkWOU7AMrjeJQPbp+yNq7a1bGtZEJevzwOZfEC4/cgP6JkcubVfon5TZmVQyE77gIfm3i7pKSj92AYtKjiE16596+UhO02Bb4n3zpOyAaj1inLMinTQADaoCUpiQf4nIeVyFUa+0v2EsP/KcnsjL3bUEz/AJPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Dw5c7DS6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hRM/ezxA; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Dw5c7DS6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hRM/ezxA" Date: Tue, 07 Apr 2026 07:06:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1775545601; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=sdHhR7J54/OcE+KaagRcxF+bQPk26XznpEVhgmwEx8M=; b=Dw5c7DS6gQwttvH8/CO5E8TclvsohtvFPZRE6G+7LNDVcNgOBFTs97824eHF4ONMXeLmHv GDuNcofGfdzo6Rz4HNz4PBQZqYDXf2ggGQkIao7BFNNVL/qe/Jkyo2REESW3GOziqZebmN TK4iHNAZcFOjXpp7BlcDSNp05hWmnj+gZK3obcVg5seIn3izjwWjWMeFZi1QrYVja/TSs2 OQ8qCCfad0FylxfE+/PI4iJqB8L6JAoYmlOgE5mliE2G6FSivW4GJg3do/4pJOyosY0YTD QeV7xUf5AXOslJTdqswpna1z+Yw9j/VDHmPrlZRgvJny7H5j3eLSigfYLzF6AA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1775545601; h=from:from:sender:sender:reply-to: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: in-reply-to:in-reply-to:references:references; bh=sdHhR7J54/OcE+KaagRcxF+bQPk26XznpEVhgmwEx8M=; b=hRM/ezxAN+y1JRcjqSwgzfhKwpLHXB5xph1GBleaKmYoImtjA5nWMCYO02YbcXzkn4VMWG uorNW81QxaLb9qCA== From: "tip-bot2 for Zide Chen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/urgent] perf/x86/intel/uncore: Skip discovery table for offline dies Cc: Steve Wahl , Zide Chen , "Peter Zijlstra (Intel)" , Dapeng Mi , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260313174050.171704-3-zide.chen@intel.com> References: <20260313174050.171704-3-zide.chen@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177554559987.226963.3746298599233294057.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the perf/urgent branch of tip: Commit-ID: 7b568e9eba2fad89a696f22f0413d44cf4a1f892 Gitweb: https://git.kernel.org/tip/7b568e9eba2fad89a696f22f0413d44cf= 4a1f892 Author: Zide Chen AuthorDate: Fri, 13 Mar 2026 10:40:48 -07:00 Committer: Peter Zijlstra CommitterDate: Tue, 07 Apr 2026 09:05:29 +02:00 perf/x86/intel/uncore: Skip discovery table for offline dies This warning can be triggered if NUMA is disabled and the system boots with fewer CPUs than the number of CPUs in die 0. WARNING: CPU: 9 PID: 7257 at uncore.c:1157 uncore_pci_pmu_register+0x136/0x= 160 [intel_uncore] Currently, the discovery table continues to be parsed even if all CPUs in the associated die are offline. This can lead to an array overflow at "pmu->boxes[die] =3D box" in uncore_pci_pmu_register(), which may trigger the warning above or cause other issues. Fixes: edae1f06c2cd ("perf/x86/intel/uncore: Parse uncore discovery tables") Reported-by: Steve Wahl Signed-off-by: Zide Chen Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dapeng Mi Tested-by: Steve Wahl Link: https://patch.msgid.link/20260313174050.171704-3-zide.chen@intel.com --- arch/x86/events/intel/uncore_discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/events/intel/uncore_discovery.c b/arch/x86/events/int= el/uncore_discovery.c index 427939b..583cbd0 100644 --- a/arch/x86/events/intel/uncore_discovery.c +++ b/arch/x86/events/intel/uncore_discovery.c @@ -371,7 +371,7 @@ static bool uncore_discovery_pci(struct uncore_discover= y_domain *domain) (val & UNCORE_DISCOVERY_DVSEC2_BIR_MASK) * UNCORE_DISCOVERY_BIR_S= TEP; =20 die =3D get_device_die_id(dev); - if (die < 0) + if ((die < 0) || (die >=3D uncore_max_dies())) continue; =20 parse_discovery_table(domain, dev, die, bar_offset, &parsed);