From patchwork Sat Dec 17 18:55:30 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: 34231 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp1636096wrn; Sat, 17 Dec 2022 10:57:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4cCKvSiuiV0OgXiGmnsTs2OTk1aXMsnkmphmZWk1tUwlrVOscTDOainYnMx02UhhcrDIBR X-Received: by 2002:a05:6402:4cf:b0:463:c960:7589 with SMTP id n15-20020a05640204cf00b00463c9607589mr29811983edw.40.1671303450650; Sat, 17 Dec 2022 10:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671303450; cv=none; d=google.com; s=arc-20160816; b=lVN05FlxfdeVU1LgSClwHdTbkaZiKwyX9d60MnezSIRcooovF+u9swwVGhYpWCSbvw RNnVyPWLBYuhDGn3ww+fihPBisQVo02Kh4naEit74c38jzNtu2liYI1sRS9uQmB7YBQb cXcSKTd2BiVA/yAJRiR6Kl8MRim/Xs8J4RO2yrauQuiD8/9qy/9LOeLJg7D3EsZn1Liv SCYmIX06GDmifUwJFrJQfMx3erdkRJIeOi4Y7pO7sg3PkhfHK9BFvlCHZspDE9UFMcB6 meSx/biNi4/LMMWCbPKdmodwoWXf+7ES3dzgpjXuVl2qsh1DD+TBDn3P0+q856QFWJaf XkLQ== 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:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=7WoHnbBUf+eaFgX0tansF4F+ZZl7V5KaZrpki5k9zWU=; b=gZ8hC8W3Bwkh9OGM87dxUnvqqH8az5+XqToDhQY+2ki/YhMd06oVTpb4WywHsmhZ6T Msg0lIpHWJiiEGrtqMPydLwOf2E4pj5AmHKJu53Glk+ctsdntX0Cows+N1Sz15K2KrpY vNIkVjvuynyaLx/JRqJDiKcVLnvS1TifVdOYMNxwZbtN8g848tZr5kpm7V6UjKWt/SyB XyqV/hgHtaka3sEp0/WsBcXcvS09VV1e4Y1PAI9qoB2MlCeHwjGlqxtPNBVDFXg/Kdi4 f1vPZOVqZyf6i5iEWmYqFoShLChtazp2xevMW9zT3J6QQz6zWmFNx5KBV5cL8ccs6FZ6 5qug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HThoaR0p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=N8xLEwQ1; 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 l1-20020a056402230100b0046a711ae23csi5032595eda.515.2022.12.17.10.57.05; Sat, 17 Dec 2022 10:57:30 -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=HThoaR0p; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=N8xLEwQ1; 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 S230155AbiLQS4O (ORCPT + 99 others); Sat, 17 Dec 2022 13:56:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbiLQSzf (ORCPT ); Sat, 17 Dec 2022 13:55:35 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E0410B79; Sat, 17 Dec 2022 10:55:35 -0800 (PST) Date: Sat, 17 Dec 2022 18:55:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1671303330; 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=7WoHnbBUf+eaFgX0tansF4F+ZZl7V5KaZrpki5k9zWU=; b=HThoaR0pbIT71c3Lc5Fh3ZP2Uu/y4zMkj7hXm9VqdIBZ+VZvqa0CLP2y2eYofdTlZb6iwm ij2finYPkH9VN+bX7+qDGspLJFkdEz707OlV3O9pERmx2Oef6Nt0ncVl2erNCTKMAN2TwD 5J0cWxC9+17vj6I2S73hL5nCgAx6D1yKp4W0Fyjr7HD/cwMv4WSjT7ohDDAUE6IrFyTN3Q aLZLdQPnWcS2gRjt4lNQREfrbVM3weOTq4e8je//Fg3GJzvTvvUyiZxCEZRntim3bSYve3 E2GFCyAHda6vocn1fvH1O7dKm0bl/2RVwBwcjUAxoDLhN5Ppe6nCPjDOempRIg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1671303330; 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=7WoHnbBUf+eaFgX0tansF4F+ZZl7V5KaZrpki5k9zWU=; b=N8xLEwQ1oiFRu7ghlNx3+fv2lOImUVoufw5leaJjWurHIQEyz9hLdP4wf9QOB5WfeOWpA1 q3q2fSVrAOOtpRBg== From: "tip-bot2 for Sean Christopherson" 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: Recompute physical address for every page of per-CPU CEA mapping Cc: Sean Christopherson , "Peter Zijlstra (Intel)" , Andrey Ryabinin , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221110203504.1985010-2-seanjc@google.com> References: <20221110203504.1985010-2-seanjc@google.com> MIME-Version: 1.0 Message-ID: <167130333036.4906.9488227521049793904.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?1749143078140208181?= X-GMAIL-MSGID: =?utf-8?q?1752488687330472249?= The following commit has been merged into the x86/mm branch of tip: Commit-ID: 80d72a8f76e8f3f0b5a70b8c7022578e17bde8e7 Gitweb: https://git.kernel.org/tip/80d72a8f76e8f3f0b5a70b8c7022578e17bde8e7 Author: Sean Christopherson AuthorDate: Thu, 10 Nov 2022 20:35:00 Committer: Dave Hansen CommitterDate: Thu, 15 Dec 2022 10:37:28 -08:00 x86/mm: Recompute physical address for every page of per-CPU CEA mapping Recompute the physical address for each per-CPU page in the CPU entry area, a recent commit inadvertantly modified cea_map_percpu_pages() such that every PTE is mapped to the physical address of the first page. Fixes: 9fd429c28073 ("x86/kasan: Map shadow for percpu pages on demand") Signed-off-by: Sean Christopherson Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrey Ryabinin Link: https://lkml.kernel.org/r/20221110203504.1985010-2-seanjc@google.com --- arch/x86/mm/cpu_entry_area.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c index dff9001..d831aae 100644 --- a/arch/x86/mm/cpu_entry_area.c +++ b/arch/x86/mm/cpu_entry_area.c @@ -97,7 +97,7 @@ cea_map_percpu_pages(void *cea_vaddr, void *ptr, int pages, pgprot_t prot) early_pfn_to_nid(PFN_DOWN(pa))); for ( ; pages; pages--, cea_vaddr+= PAGE_SIZE, ptr += PAGE_SIZE) - cea_set_pte(cea_vaddr, pa, prot); + cea_set_pte(cea_vaddr, per_cpu_ptr_to_phys(ptr), prot); } static void __init percpu_setup_debug_store(unsigned int cpu)