[tip:,x86/mm] x86/mm: Recompute physical address for every page of per-CPU CEA mapping
Message ID | 166855118442.4906.2253990342203519446.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2973200wru; Tue, 15 Nov 2022 14:33:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf5t0GK7nY38XaZUsWh7MokTElZWwtTowGjUQEn4OMcWw8Q0nkLlZ+zQpq9A/tqBrKcFJQOe X-Received: by 2002:a17:906:1458:b0:7ae:d8f:893c with SMTP id q24-20020a170906145800b007ae0d8f893cmr15172617ejc.359.1668551610441; Tue, 15 Nov 2022 14:33:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668551610; cv=none; d=google.com; s=arc-20160816; b=vGrBV24rJpUUnECsXSN3VmA3jqy2UcHYdm8rWaT56Q7RikRQiD4iMZDdlrvRZvRe7I hNDHcafatjJFMdF/MndFUa/zKSGxJ/yU4TL04wCpJRHsRHJO8ZxFgYF5uhC2JJngrv5G wXcI6q1xfEFFoDS2Y95M2JCC2YcGmV4+tZyPmDnU7dNaABLUDjBs9ri6rei9obg9n9Dx R1MkdLmIOccbk1a8d0ZJdbhLK4wLf51wIG97sfvaQ5EX7IL8rucuztnEKNrfPcXJ076v 9eLAOiiQHXaZxDMe8A6vZBQmlU5Tr/7DmcisGMO/xW+bT4cFn3FB3Jjkg4V4iGqOQHSj JikA== 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=+JtffAj+2E6g0CcEyxya1ard296ICfPdvweSfJug0Ww=; b=j9NVzThz17h62Hh5SRw95Z3yeXd1PttU4Zx1fuGw05oAtdtQjZJOsedpop4R4DGamG d75y9c+RSZ3j1p2Uz7AQdyFWkR/wYOyIX9AuUMk93s66yhru5Bk9P8UhbMyH+9TXFG0o CKqq6vPOI8k6oHqooXj2kGtVN469INBB8ClDvRKaDybaO9JvCHuHq9y0UdC1TbP5hIWJ ch/4a6dYPr3oI9U6MhCYKEIv/yuSBhLoo0ZSGJzcbub+LntnEW/O2sL5ulz9YhKYOsmi lAw2CguSd8o94K0TmXfE6QpoRAvMov3IIDZuh02f442886nLmVlG4MxwD1wwKFzs/Mjn L7pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PCg4IE12; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 kx15-20020a170907774f00b007a5cdd9550esi10584841ejc.201.2022.11.15.14.33.06; Tue, 15 Nov 2022 14:33: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=PCg4IE12; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S238595AbiKOW1R (ORCPT <rfc822;maxim.cournoyer@gmail.com> + 99 others); Tue, 15 Nov 2022 17:27:17 -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 <rfc822;linux-kernel@vger.kernel.org>); 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" <tip-bot2@linutronix.de> 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 <seanjc@google.com>, "Peter Zijlstra (Intel)" <peterz@infradead.org>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, 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: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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: <linux-kernel.vger.kernel.org> 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?1749603173523333031?= |
Series |
[tip:,x86/mm] x86/mm: Recompute physical address for every page of per-CPU CEA mapping
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Nov. 15, 2022, 10:26 p.m. UTC
The following commit has been merged into the x86/mm branch of tip: Commit-ID: 991ab455645118e83fe9f2f9aea6ee383908ffd4 Gitweb: https://git.kernel.org/tip/991ab455645118e83fe9f2f9aea6ee383908ffd4 Author: Sean Christopherson <seanjc@google.com> AuthorDate: Thu, 10 Nov 2022 20:35:00 Committer: Peter Zijlstra <peterz@infradead.org> 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 <seanjc@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Andrey Ryabinin <ryabinin.a.a@gmail.com> 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)