From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 1529D3EB6EA; Sat, 28 Feb 2026 17:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300520; cv=none; b=ndmJwKpCrzjMVyJXybQ/TrXZFO2qiVHqK7ovxMfzQAMN9Ssv5H+ojSEDtdSOzHiC+CVYy49vvP+BVMAKIhp9cTBDRiWQswfg+gnOwesKUp9r2X2L9s6eatZEqE+E82K3iv3BtIW247EcWea1jktt3Ynog91m/GnVrsgOoWzC3EE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300520; c=relaxed/simple; bh=NIe5ewymfBNyGwxS6oPATd5QwlJVEWcZ8T7S1YXObKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mBHXhG7fEI2oI0oLyJLc3icrWjHW5KVSqJwV+9YokYgCpaXG+yBwB38ybHKxmVFPp9hrQctW/ImzGxNaVN50mIc9R6BY3I1oHsbjW/dtv14zZTXjvajm764+CmKaaMGIo43XWJreqGpzAdFGJz6Ys4J39eTjMqsVpd8D+ACmnww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=g3kufk04; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="g3kufk04" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AECAC19423; Sat, 28 Feb 2026 17:41:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300520; bh=NIe5ewymfBNyGwxS6oPATd5QwlJVEWcZ8T7S1YXObKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g3kufk04BpuzW9DJCkf0BtAqw7taQISi0IQ2bwMYC/QV1gKm86qKEHkay0G18D7E0 FaKpIzYhhHhLLD+EZtsoZ4CMIQU2/SwF59Q0pZ7qEP6XDyaG8O3KZ7KIolndV6KfBb XDCZZBx+jSecJzC0b8gVkQNRzo7lN1NxjOMo7uZcbxya7BYkg/32ZVSF3by5WTcPKW cSbcY2+ujJh/e6X4B2pWRfADUY3y63G5iSuJGD/w6YUlfXAFZM9GKhh9segPOsT4+M FXFwCCHMNjuNQ9P8tLkOhzQa4YEPIpKjTxxGGFb2H/Oves+r7zXc1E5jHAgofvhOqy AsWMpFyzSTdMQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Breno Leitao , Mark Rutland , Will Deacon , Sasha Levin Subject: [PATCH 6.19 558/844] arm64: Disable branch profiling for all arm64 code Date: Sat, 28 Feb 2026 12:27:51 -0500 Message-ID: <20260228173244.1509663-559-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Breno Leitao [ Upstream commit f22c81bebf8bda6e54dc132df0ed54f6bf8756f9 ] The arm64 kernel doesn't boot with annotated branches (PROFILE_ANNOTATED_BRANCHES) enabled and CONFIG_DEBUG_VIRTUAL together. Bisecting it, I found that disabling branch profiling in arch/arm64/mm solved the problem. Narrowing down a bit further, I found that physaddr.c is the file that needs to have branch profiling disabled to get the machine to boot. I suspect that it might invoke some ftrace helper very early in the boot process and ftrace is still not enabled(!?). Rather than playing whack-a-mole with individual files, disable branch profiling for the entire arch/arm64 tree, similar to what x86 already does in arch/x86/Kbuild. Cc: stable@vger.kernel.org Signed-off-by: Breno Leitao Acked-by: Mark Rutland Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/Kbuild | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kbuild b/arch/arm64/Kbuild index 5bfbf7d79c99b..d876bc0e54211 100644 --- a/arch/arm64/Kbuild +++ b/arch/arm64/Kbuild @@ -1,4 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only + +# Branch profiling isn't noinstr-safe +subdir-ccflags-$(CONFIG_TRACE_BRANCH_PROFILING) += -DDISABLE_BRANCH_PROFILING + obj-y += kernel/ mm/ net/ obj-$(CONFIG_KVM) += kvm/ obj-$(CONFIG_XEN) += xen/ -- 2.51.0