Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp739156lqb; Wed, 29 May 2024 09:08:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL8rYN5V8wRB2SwZO4WsHpYDEMCkZGFXv4h9HrD8RrYKvuNGFH4lly5KJ64yzGuHcp+eCvE9garzm/Brpp5tcctDfBzHWhDv/VybHXdg== X-Google-Smtp-Source: AGHT+IFkoN1dhjLsqm91h++pw2L1tTsLtEedPs5Tkz39xG0mSgj792gsapd4RcWLiJpvICDCEo0N X-Received: by 2002:a9d:6e83:0:b0:6f0:36b4:71f1 with SMTP id 46e09a7af769-6f8d0a73df2mr15878079a34.13.1716998904677; Wed, 29 May 2024 09:08:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716998904; cv=pass; d=google.com; s=arc-20160816; b=KdDdwToT3IxN+pPXYWgvgx8anhnc/gSxhXAw+GeQN7i5G2qft5QFIh3s0OZ5EIDuEA LAWTgHvphUk0cjnfZAvz1EhbfplKrbQqeH/dxEjOt1AmIAqaKMoteDJz5aXNuZpLFUdE IXzi/wT1RXq1kRmzj6ENbZIMwTEgCaWgdKmym8QKoNC8JgCe1F8T0/cr+Xvg91y4PpIn YocFiKxbzxYCQkdpWKFzbl2wdS4pbvLsnB+l4xjH5pj2xt68ftzy168G1/El50ttqFpx z8V6oKGzpvkpjX46HTbDa3gdtLZMK3Mrpn3mayvSe7r1IIB22o5LhYe7cdRUIHKAdFGJ en2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:cc:subject:to:reply-to:sender:from:dkim-signature :dkim-signature:date; bh=IZ5KrLuQPjQcfxHwIY9kyaClanAHjDrIe9KVBwV9SRg=; fh=1RdzwlqYiPIxXYjoL6EzERuHN0iFlJHyxNK6b/EOM2U=; b=PvxDCoqJTgRokvP4GIxvyCTUPHAqvgsIOcW/wQZitkUB9GlHmbmkZ2HcLzJYpTYKf0 bgfooZJkGmNqwMA0oE91PF/2sxlSyayOJ/mCRjwg4NI5g1JVNpXZ+Y0Q6rvsfK+DtiJY zKAptwdA1Guunz9Lkh9meiGn5+8g+xSWMs+kzLfjzceEJ90pHdsvDPaY1rRp8DPHtcxb iEMaPJ+5S1MmwCaC/DLjLk3fwtVOV2yOZjr0NFOkN/Wrt9fhwHg1y25pYjr6a+Lkpigp 0NIAxq4dygp0qfoWJDfEpr/go8OWSlb6yA/N+YN/oOBBsriBKHCC1XD3PzS4KW6MtXjV KR4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=m7LIY1sE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-194418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4e4f0745497si2991844e0c.86.2024.05.29.09.08.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 09:08:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=m7LIY1sE; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-194418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 60B041C233AA for ; Wed, 29 May 2024 16:08:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFC77184138; Wed, 29 May 2024 16:07:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="m7LIY1sE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BVIzFoiS" 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 71BDB184132; Wed, 29 May 2024 16:07:34 +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=1716998856; cv=none; b=ZxMkuSdc+IgidJwKHt5v5yGL0Iw0Hns/IutkT9FGFq/Ga4oHi0zFE7cWuRdd2KuP9el6STYvAm62cmjkxKgYxc8QC/SvzJNdICPX+zYs8cHGutsXyZymXC5DFMvV6wBPAFbnZk9el4XjOjSYid8pMUlL4h/jffyqjO4xmA/ZQKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716998856; c=relaxed/simple; bh=vUdByjXl2zg+uUnpkmlVAihlQDf9yJ+YyNK0BBAvWvE=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=GH2y7hVHFkVnSx6epCoKby0UxzId0A3nTvdDJF9GThcYB6ecxX38haq9UNs7kIrl+n50cJRFGnOHqqtbrS3xPSdZJH4ZaPxdlR+ZI/rNA7U5XhFZJoZSIy27eYKSf6tiOEKWUgLjxGN63OOLhcXrsORV2r6QJzqedlaqMJNdvkk= 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=m7LIY1sE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BVIzFoiS; 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 Date: Wed, 29 May 2024 16:07:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1716998852; 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; bh=IZ5KrLuQPjQcfxHwIY9kyaClanAHjDrIe9KVBwV9SRg=; b=m7LIY1sERjaxG9VqA+hjyq94Td1CnS6+Oqu/TuvBsrFQivooX4G5u3Pz2GdyFC6EB95fNA POTCW9b50iamafKKtCiPUQRx0fFoBB9c2xmz44lPNPtydXBUZ5Vp6yxq89Hl6dlkKainuC /Vc70oZj+b3kjIM0a0A0egh3juJ234ruDRmPYDfKBeja33ehwyLMIitQI1o3kLhp0MXjNq l4qWrgr3TpjZL1QrWSRJsjy0zInIkyarQbeGGd9p0fa1Hg/uJuzNHljMPBHKJq8H1fmwLP s6HKrPUcQT0455kVUVUU7o9SvAlbCIMGT2aP5cKxf5CgrGsWK929N/S85qOQGA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1716998852; 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; bh=IZ5KrLuQPjQcfxHwIY9kyaClanAHjDrIe9KVBwV9SRg=; b=BVIzFoiSEvrPssplanhIs4bXyN9L4NFkQ0RF4PyvU+quQ4j4PWziLRQ0DWs7dkKg3Ldqm5 rVB2Xj1MBWPp7rDw== From: "tip-bot2 for Nikolay Borisov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cc] x86/kexec: Remove spurious unconditional JMP from from identity_mapped() Cc: Nikolay Borisov , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171699885209.10875.2411538078061299720.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: 7bit The following commit has been merged into the x86/cc branch of tip: Commit-ID: 3f3d80f505f3d7273f374935558db5188acdd162 Gitweb: https://git.kernel.org/tip/3f3d80f505f3d7273f374935558db5188acdd162 Author: Nikolay Borisov AuthorDate: Wed, 29 May 2024 18:28:50 +03:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 29 May 2024 17:53:57 +02:00 x86/kexec: Remove spurious unconditional JMP from from identity_mapped() This seemingly straightforward JMP was introduced in the initial version of the the 64bit kexec code without any explanation. It turns out (check accompanying Link) it's likely a copy/paste artefact from 32-bit code, where such a JMP could be used as a serializing instruction for the 486's prefetch queue. On x86_64 that's not needed because there's already a preceding write to cr4 which itself is a serializing operation. [ bp: Typos. Let's try this and see what cries out. If it does, reverting it is trivial. ] Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/all/55bc0649-c017-49ab-905d-212f140a403f@citrix.com/ --- arch/x86/kernel/relocate_kernel_64.S | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S index 56cab1b..54e6200 100644 --- a/arch/x86/kernel/relocate_kernel_64.S +++ b/arch/x86/kernel/relocate_kernel_64.S @@ -153,9 +153,6 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) 1: movq %rax, %cr4 - jmp 1f -1: - /* Flush the TLB (needed?) */ movq %r9, %cr3