From nobody Mon Dec 15 22:43:13 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FB7DC4332F for ; Tue, 15 Nov 2022 22:27:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238602AbiKOW1S (ORCPT ); Tue, 15 Nov 2022 17:27:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231935AbiKOW0j (ORCPT ); Tue, 15 Nov 2022 17:26:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1718F3120B; Tue, 15 Nov 2022 14:26:27 -0800 (PST) Date: Tue, 15 Nov 2022 22:26:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668551185; 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=+JtffAj+2E6g0CcEyxya1ard296ICfPdvweSfJug0Ww=; b=PCg4IE122wfMfXgTYuRsl2pC/fRifjH5YyruypjNTp8E4d7Zv1GJF8aL52dmMdXZNcuwoe qdIDFMkCcq9nWcU9E3kCRKbqAcuHqNXzAIRi1XoHumud5IunTdnM7JS88kFbdEACd9KFZ6 OweUVFBvosgGaaspSw3ab0bW2T/ZMssOQkpw2uUEULKNS8WvnIB5MjjIZAv6g1yAIVCySr I4fWnivCK3iL9NcIN5xqa9jhPDX9l2wKDzmAY0J5LjPoR+/dd2+rGIVC6NKxBbi+DGhjoX wIJWjXc+1YbUBJkCV8ydlZySOnLRpIsP8cWWwej83SeWp5KCfgMbUcDPV6v7nA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668551185; 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=+JtffAj+2E6g0CcEyxya1ard296ICfPdvweSfJug0Ww=; b=yphQOfhfwdnV12cTOD9x7HkB7J32qLus4a2aevCuCSKeDh5tAHOqTiaHKd50yBQt7uteNI LJkcj0QJWlpAb/Dw== 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: <166855118442.4906.2253990342203519446.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/mm branch of tip: Commit-ID: 991ab455645118e83fe9f2f9aea6ee383908ffd4 Gitweb: https://git.kernel.org/tip/991ab455645118e83fe9f2f9aea6ee383= 908ffd4 Author: Sean Christopherson AuthorDate: Thu, 10 Nov 2022 20:35:00=20 Committer: Peter Zijlstra CommitterDate: Tue, 15 Nov 2022 22:29:58 +01: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 page= s, pgprot_t prot) early_pfn_to_nid(PFN_DOWN(pa))); =20 for ( ; pages; pages--, cea_vaddr+=3D PAGE_SIZE, ptr +=3D PAGE_SIZE) - cea_set_pte(cea_vaddr, pa, prot); + cea_set_pte(cea_vaddr, per_cpu_ptr_to_phys(ptr), prot); } =20 static void __init percpu_setup_debug_store(unsigned int cpu)