Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp498427lqg; Fri, 1 Mar 2024 11:22:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUHDSUN1B8g6GzEk3+50NzVFKYRLsGBkGNqg5TfHqsK570wvE8ZkoU1ujaXWPrN2KoiNENotSAmHx48v5BNHnL8TkbCysBEwPQaB4HvQ== X-Google-Smtp-Source: AGHT+IFLu/ZmmoJq+WW+cpXFfnHnVZFefernBDhas35uNwP31tCVnbRJUBRXm/p8JL0MWH5et1Lv X-Received: by 2002:a17:903:298e:b0:1dc:7fb4:20cb with SMTP id lm14-20020a170903298e00b001dc7fb420cbmr3277679plb.62.1709320942735; Fri, 01 Mar 2024 11:22:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709320942; cv=pass; d=google.com; s=arc-20160816; b=KWgQC+ayKgCn0KtGwktuMXXIeG08YctCEdXm1ZDVCS0T2bcNmPxJlDOayl/Y1LKyNN 161rY6vvyM4ShV1RCBFY1sdh28HmybyQ3UiRBQ3ZDSz/pcqR9ttQ02eSdxbUIJ2y9JHW BaXfXk932AluZvfAuszYwHS/C2mV17UB4e2Ui/eBSSj4JibE+LgbT3hSy1e+OXg9r79a +UEtMh/gDyLe8lQT9LK8Xywbd3uF3eu2Kz/KrZ/CBc8rQvIZ/OgoNfAEaEg221jocKKO clYoQFn8rq+lavNpX2+VYEAZnAK5/E3IKGuXAwNWQgBB10ISLF0OOCe6/VC/V/xczlor C8AA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5ojWJB0zDyH8dLXev+iJrzcZuG8BNj8ofzNeozEazL4=; fh=GAWDeZ8GLPZlCoEE1g14GdP0AZ4w9Et1LYAW9OtWjwI=; b=mQ9uCNAz4IGhGiYWYSBmXCzKOMWZQR8PZ06ph1kY8VA2+icn6xHfcwyWGI1W3PizKA NXeEZOCbYVTXMfEqsS9qcMVKBXeVflEfdE+Q5Uzy3hFBlyQfayrj1/eLDYNRq/OBnrms PwC7tLgCDpcnCJM5wcT1qniEWtNxS40yofdUsMkuqOXm6gCROk3dCMIr9j7aoR6dds7M uidr29Lf+O9REC+4LZ43tdjbvgWYk83N7gQIfSLkST//Q3DQBKssARv41DSkuaVLgTJy Y6MsZcpVyh/fLwrPVn31yjOEN8TKYxaxTMpY7oF/U0bh0dTxzz8kJqsq03V7Bxk4VImS 3AiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=G5KnqcSv; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-88973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h16-20020a170902f71000b001da17ce989dsi4149655plo.278.2024.03.01.11.22.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:22:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=G5KnqcSv; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-88973-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88973-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D18C0B31E4B for ; Fri, 1 Mar 2024 18:59:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15C883FB16; Fri, 1 Mar 2024 18:56:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="G5KnqcSv" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 35C933EA90 for ; Fri, 1 Mar 2024 18:56:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709319405; cv=none; b=W9NqyJ8eNWw7vfnnGea19rm+Dbe7ZFJThHTkP+XLYN9gsYlePMisurfU7zfp8Q4erFJ9W+RybFUI18SuXL2mHq9a0473T1CwtHD/1fVhJeDo2oCI7cX2PsfZruQbFpKnBzaVqu9c84GBuLm+G0hLzkF0FsRdcdAnlUkCpSNxVAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709319405; c=relaxed/simple; bh=TfcfErpuT6t/nH9b4l53LwwZsv95+LrrGJa3N4lUvOs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kMoR/2VbcyEgN6hRE4wjFalAXEfK4fqRhV8fl6UdZaquudb0CX7BplSOA4WEBHcnirQFUnUa4+/BpBVQpgxVtQbR9OSdfcpstlouTaFs0gR+Wlb9sJDSVRvIlbEs4irZGw6YbQBv4ifoFh3tkhavixGOHoWYk1KCAbPWdGSrntM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=fail (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=G5KnqcSv reason="signature verification failed"; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 2EDB640E0185; Fri, 1 Mar 2024 18:56:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id KvZZqETTfLv7; Fri, 1 Mar 2024 18:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1709319398; bh=/WQ87890KHEPpK3lVDVLOKrC8uxI03kb24WeEwvSTNE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G5KnqcSvp3UKf77rC9RFyaG1IliKafm7uUCpqaVp7D+RP5RotbtDeghd4Zh1djaa1 y8aQ7oZvUC8OV7NykSK3oWy810kyME/1fZXjZ+Ce7fieGpttZqnNpEEyfVxq/i3mmz 3a6yWY1L2OQhUk3UGiURYKiVmYSRcALe6wSOCBhE6DrvwnWbcB5Hmui/A+kPhkIkzC eoUBvUhrB7Qrbl3OJ1M8ThrOaUbO4fMSVciV3VVPPPY6LiItKHorUPOY1OxUmjDfcK +6aZhjfijjiyqxtDfdSIVBYlYAlRqUEqbQ5J9Cko0FIWc6MqK+b7mbyOvYu/4H1XAm 7AbSbIuW+HrlZenwQDrCnlil75hp+hNNqtMYIGz+V6swvWjFCQ5CsZoTIvCvjnt7dj 71gO0TKvZrojVit3Zet/6N0S/EvmXDEsH8Q6YlZHpbwImdf30zN8cQJPEuQa9X0FPy ssdkaULYfUsxFywQJo7IZ0YnwOnW7ivKe7N0RDyY0ZLo/Q76oOzu+fN/cmROIagfOw ttExE4HQGCKArrH+Gs/I88PQlmbi5qzlOyao6UgZ4dunREw88iDOVw6puYgQCqg8WH n1wgrrXPLKetCa/uNTVBD0bcNUtE2bs/lEsDgp2F7HxSKsiNfjJKt9gtzLLIf9+FEe KoPoI5g6etZqPxU5UJw5tTgM= Received: from zn.tnic (pd953021b.dip0.t-ipconnect.de [217.83.2.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id D93CC40E00B2; Fri, 1 Mar 2024 18:56:35 +0000 (UTC) From: Borislav Petkov To: Baoquan He Cc: X86 ML , LKML Subject: [RFC PATCH 2/2] Revert "x86/boot: Add xloadflags bits to check for 5-level paging support" Date: Fri, 1 Mar 2024 19:56:18 +0100 Message-ID: <20240301185618.19663-3-bp@alien8.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240301185618.19663-1-bp@alien8.de> References: <20240301185618.19663-1-bp@alien8.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: "Borislav Petkov (AMD)" This reverts commit f2d08c5d3bcf3f7ef788af122b57a919efa1e9d0. This whole dynamic switching support is silly. I don't see a use case where one would use an old kernel with CONFIG_X86_5LEVEL disabled to kexec into. I.e., you use pretty much the same kernel. But I'm open to corrections. Commit message of f2d08c5d3bcf ("x86/boot: Add xloadflags bits to check for 5-level pagin= g support") claims: The flags will be used by the kernel kexec subsystem and the userspac= e kexec tools. but they're nowhere to be found in kexec tools: [ ~/src/kexec-tools> git describe v2.0.28-4-g6ee2ac1bf739 [ ~/src/kexec-tools> git grep XLF_5LEVEL [ ~/src/kexec-tools> Zap it all. Signed-off-by: Borislav Petkov (AMD) --- arch/x86/boot/header.S | 12 +----------- arch/x86/include/uapi/asm/bootparam.h | 2 -- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index a1bbedd989e4..0f261224acef 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S @@ -364,17 +364,7 @@ xloadflags: # define XLF4 0 #endif =20 -#ifdef CONFIG_X86_64 -#ifdef CONFIG_X86_5LEVEL -#define XLF56 (XLF_5LEVEL|XLF_5LEVEL_ENABLED) -#else -#define XLF56 XLF_5LEVEL -#endif -#else -#define XLF56 0 -#endif - - .word XLF0 | XLF1 | XLF23 | XLF4 | XLF56 + .word XLF0 | XLF1 | XLF23 | XLF4 =20 cmdline_size: .long COMMAND_LINE_SIZE-1 #length of the command l= ine, #added with boot protoco= l diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uap= i/asm/bootparam.h index 4a38e7917756..b53b524f6ed2 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -22,8 +22,6 @@ #define XLF_EFI_HANDOVER_32 (1<<2) #define XLF_EFI_HANDOVER_64 (1<<3) #define XLF_EFI_KEXEC (1<<4) -#define XLF_5LEVEL (1<<5) -#define XLF_5LEVEL_ENABLED (1<<6) =20 #ifndef __ASSEMBLY__ =20 --=20 2.43.0