From nobody Thu Dec 18 12:13:01 2025 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 3CAAB1A2FBF; Tue, 18 Jun 2024 14:01:53 +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=1718719314; cv=none; b=u28Zbn+IvypFt3x7Q0RgNHRi30Ztw7IaHdj6iTesneQx4QirRFbKgI7DaxAlWkZ3Dbwv1cpA630n90MLOxXAq8z9oQELhb0jfdusLTkRmJmNr6pUI6TrsgQVhAE3LILtvzr1PNW8CLx2YLPQxlBT/U9bgXM19wcy0HfMMNpqlAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718719314; c=relaxed/simple; bh=hP1Sutuk6GwUvPJcUtrxyool9tgsm6NiPeXLPxY+b3g=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=brFCd49U+7TM8PJrYY9fMWGmaEY9jkcaWbqU4rE3KEeeNSaFXWlVUtDr+U8Oz53HmaYBb66VS6dvrXoeyoxp3qsIOYwOyXwRaPblzLNy9Y+swvIBsg2y2lhMis91ZJuJ287puOztme1IL6lpM9pfDLLma5PHcfbQfG6Oe1j9pMk= 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=pa1ytrrc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OTtu2J87; 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="pa1ytrrc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OTtu2J87" Date: Tue, 18 Jun 2024 14:01:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718719302; 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=ZvoOY9zrd3u9eFjKl+GvukzBW0ic62LEkWCMcrK2X7Y=; b=pa1ytrrcQnqbsDr+pZC6EKpSdqOAhI2xLUp7zo/333+49JvJ12+Yckwc8PiaHHxOwbSHaU pUyPvjbon2srb0bdA2TBGo5y5LrszJkyNoD7fxkXsheDrt/HfnvnsszPd5vcTZIDwPm0in CXRMlaIlidWKq9CNhqjWgXc5bEF38j7n0/bMDa498XVbgfXU+mwJK7ZSXHrRcmOccxWwN8 FNVeM6Gwgj2odGr0H9Obc+JOZu5iDycXTi0nO8Nc1s65sTSW+F7WUCje/guo1I7H0e9gbY 0cgqA0jaXa1xxKowdM+S9NrBMCXuPg8RBqzsHZkGfPO3l2HAc+dswV28JOaLUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718719302; 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=ZvoOY9zrd3u9eFjKl+GvukzBW0ic62LEkWCMcrK2X7Y=; b=OTtu2J87LGZ09JB5nGmQhSNPz+nNUqtUDl8SWw88Nw93b2JjPT2irfL0tykx1LBJSq5i2m JK5eIPwCL9Ck7oBw== From: "tip-bot2 for Borislav Petkov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cc] x86/relocate_kernel: Use named labels for less confusion Cc: "Borislav Petkov (AMD)" , "Kirill A. Shutemov" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240614095904.1345461-6-kirill.shutemov@linux.intel.com> References: <20240614095904.1345461-6-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171871930260.10875.4112304051280084140.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 x86/cc branch of tip: Commit-ID: 7b46a8997db27ed70b01458fa4437ec2360feddd Gitweb: https://git.kernel.org/tip/7b46a8997db27ed70b01458fa4437ec23= 60feddd Author: Borislav Petkov AuthorDate: Fri, 14 Jun 2024 12:58:50 +03:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 17 Jun 2024 17:45:46 +02:00 x86/relocate_kernel: Use named labels for less confusion That identity_mapped() function was loving that "1" label to the point of completely confusing its readers. Use named labels in each place for clarity. No functional changes. Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Kirill A. Shutemov Link: https://lore.kernel.org/r/20240614095904.1345461-6-kirill.shutemov@li= nux.intel.com --- arch/x86/kernel/relocate_kernel_64.S | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocat= e_kernel_64.S index 54e6200..8b8922d 100644 --- a/arch/x86/kernel/relocate_kernel_64.S +++ b/arch/x86/kernel/relocate_kernel_64.S @@ -148,9 +148,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) */ movl $X86_CR4_PAE, %eax testq $X86_CR4_LA57, %r13 - jz 1f + jz .Lno_la57 orl $X86_CR4_LA57, %eax -1: +.Lno_la57: + movq %rax, %cr4 =20 /* Flush the TLB (needed?) */ @@ -162,9 +163,9 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) * used by kexec. Flush the caches before copying the kernel. */ testq %r12, %r12 - jz 1f + jz .Lsme_off wbinvd -1: +.Lsme_off: =20 movq %rcx, %r11 call swap_pages @@ -184,7 +185,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) */ =20 testq %r11, %r11 - jnz 1f + jnz .Lrelocate xorl %eax, %eax xorl %ebx, %ebx xorl %ecx, %ecx @@ -205,7 +206,7 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) ret int3 =20 -1: +.Lrelocate: popq %rdx leaq PAGE_SIZE(%r10), %rsp ANNOTATE_RETPOLINE_SAFE