From patchwork Sat Dec 17 18:55:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 34237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1636197wrn; Sat, 17 Dec 2022 10:57:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf7g4i4vyvoNYAI4/p9/uVpbLY/79f3y/Byw/0Uf/dI2dvL/KzCWT16CmFmHsOtPV+/F602Q X-Received: by 2002:a05:6402:175c:b0:46d:89e8:fc24 with SMTP id v28-20020a056402175c00b0046d89e8fc24mr20164872edx.19.1671303474945; Sat, 17 Dec 2022 10:57:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671303474; cv=none; d=google.com; s=arc-20160816; b=aANpgkdHmYY9nXrbnV0y0yP7mU79NMPKTshBak4m61dOKpxScUHMlf0X3rQOLYpBzu d0C+0dfSdNrDuj9bI0FCgzfBLKnSujJ9rOzVJhNB266mPG9s51Ye7vggWdZVs0+LlrLQ n7GCJyIGL+isqhmjP7xXkyMMcRelZHzXr839oi4hhC+zLBNS8TS3t98WpsbMIrAkU6Cy bhaBq66S76iQAtvKdC0/8ZK9EmoeVzT86JZy+5ToKoFNtycqzGEdcLVgev8tDa+xRQdr zPWaekCJnHsstrsjry8vstGfBqwmEnl5SMR1+sME7uo+6v6oVHXIb0/nyZX2V0sznyAP tVFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=dApqMKl2xsD3ucsCOdsZ6oYT0fYa/78y/uWMGa5ShYc=; b=EuDgYUBPYdGgKLeur7f8VEnDNf/FPwTTsZdUv4XvT+qfmWdkIj7rb6GBFyaRQqT3Ok ye9I7vUxQ/UAnqpy0qm0FJeJRcWCu98X5nJg2vyv4LEjXxf/QE+TrYiArK0/ciy7p1DV NqB0FDfjNzva9UrVRf5PP4lU4gfQZdE7kZG2mr+R7IYZwGxwff/Z2eI9yExrAbYsto30 7GXjJ46lBtM9D13g+wcFlVuV/SvPOXYWs9hrE5wj2zJ5THQPl4wuHNNOIQ4trna6XGs1 +rpLClG2q8/IU1cCJLl41jYnNo+X6uqouUjRPZ+4u0B//OYSwNCJh4wTP6KhwdfGr2xz RtMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=q0QqYMz8; dkim=neutral (no key) header.i=@linutronix.de header.b=KXjv6Tff; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m20-20020aa7c2d4000000b00461f0d84ee1si4503282edp.228.2022.12.17.10.57.31; Sat, 17 Dec 2022 10:57:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=q0QqYMz8; dkim=neutral (no key) header.i=@linutronix.de header.b=KXjv6Tff; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbiLQS4V (ORCPT + 99 others); Sat, 17 Dec 2022 13:56:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbiLQSzg (ORCPT ); Sat, 17 Dec 2022 13:55:36 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90B7D10B7D; Sat, 17 Dec 2022 10:55:35 -0800 (PST) Date: Sat, 17 Dec 2022 18:55:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1671303331; 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=dApqMKl2xsD3ucsCOdsZ6oYT0fYa/78y/uWMGa5ShYc=; b=q0QqYMz8beerO8pNOWHJm3gthEyOnHU7wEczTGjT+GVyZ4ULWWT4PXxKA52nvz2m3uncY3 chwHUnd1MU9lZusNFtRd7zHW/C0mkIuW3VIreyh3Z1qo6KLZhDRxpM3B4svxjsHEFKR+di uYtUkDZDZFuBfBVYoH1sHYDBAyJ0w/aJhvdo69cUirKkaw8+FTVqBTQoVBe/RqyOv/KTlM n8+DVacBybGECHmf3x5q5Eq86QrdIfcIbSX1pkfrlP00AFqqJE/sUshl8QDkzW7zW88VYg TfK4GznNpNKpFVuBX7ofnZgkATBEbbIl/8IsfBfq6iNe0+YUuVkJkK/qAVX1QQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1671303331; 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=dApqMKl2xsD3ucsCOdsZ6oYT0fYa/78y/uWMGa5ShYc=; b=KXjv6TffSdgNWrXLmrndbYOJv0NcDpA28CaDaRPzhqBAJli7yhMQbMqrFceSGx0X3EPHeY Ba9j4FncAhK/TGDA== From: "tip-bot2 for Kirill A. Shutemov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm: Fix CR3_ADDR_MASK Cc: "Kirill A. Shutemov" , Dave Hansen , Rick Edgecombe , Alexander Potapenko , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167130333123.4906.2814725328778322721.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752488712581037224?= X-GMAIL-MSGID: =?utf-8?q?1752488712581037224?= The following commit has been merged into the x86/mm branch of tip: Commit-ID: 80d0969aa7832bfeb287cb22563a1ad08fea937d Gitweb: https://git.kernel.org/tip/80d0969aa7832bfeb287cb22563a1ad08fea937d Author: Kirill A. Shutemov AuthorDate: Wed, 09 Nov 2022 19:51:25 +03:00 Committer: Dave Hansen CommitterDate: Thu, 15 Dec 2022 10:37:28 -08:00 x86/mm: Fix CR3_ADDR_MASK The mask must not include bits above physical address mask. These bits are reserved and can be used for other things. Bits 61 and 62 are used for Linear Address Masking. Signed-off-by: Kirill A. Shutemov Signed-off-by: Dave Hansen Reviewed-by: Rick Edgecombe Reviewed-by: Alexander Potapenko Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20221109165140.9137-2-kirill.shutemov%40linux.intel.com --- arch/x86/include/asm/processor-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/processor-flags.h b/arch/x86/include/asm/processor-flags.h index 02c2cbd..a7f3d91 100644 --- a/arch/x86/include/asm/processor-flags.h +++ b/arch/x86/include/asm/processor-flags.h @@ -35,7 +35,7 @@ */ #ifdef CONFIG_X86_64 /* Mask off the address space ID and SME encryption bits. */ -#define CR3_ADDR_MASK __sme_clr(0x7FFFFFFFFFFFF000ull) +#define CR3_ADDR_MASK __sme_clr(PHYSICAL_PAGE_MASK) #define CR3_PCID_MASK 0xFFFull #define CR3_NOFLUSH BIT_ULL(63)