Received: by 10.223.185.116 with SMTP id b49csp2462894wrg; Mon, 5 Mar 2018 03:24:36 -0800 (PST) X-Google-Smtp-Source: AG47ELvA/wyDb4SYPZ6t9BJq8HRJ3TvgHqyEO8rPQ2G7uYNOnVSNfUfje+0NkoEiDi3Ux986CBmb X-Received: by 2002:a17:902:5482:: with SMTP id e2-v6mr12735511pli.65.1520249075940; Mon, 05 Mar 2018 03:24:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520249075; cv=none; d=google.com; s=arc-20160816; b=W478jf9XRjK4soA2CeJzdvsji/ejOewHozHL63STXLbcte8I2fdziuhkEdpYg9QchX 20y7vh7B7T4S7+PbdlNSvb/ZkpuwxI4ViXIqGqxGhaPt8P/CeJjrGo41jicuJuOrDGFN KeTruopl0hJ2tgs5duGel/ABmRIIiMfyFX5G3IrVIpXW5VjGrLVXIPeAcfvY/igPGNda rhNh7yA15lu5atbFMNb9O8P7n97z0IcffT1Q5zY656k5M1Wj9k6rSi6jMHcuhniRd5HK SL/nE++6fKqElPkGx7QB7zkmzdUdMce4Dsi+9nR+U6BpvGdeeqeFfXYnDzScaH/v4LRf Wk8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bZlTBQ7TnMdlJzLKKteDNuKBqKGpitP//pbiUgQVl0s=; b=0Xd8BOjc/YUec88ibhh2z9VpFPUxennWFFGxPgblSO5KJEVhg1h584ADK5irTkQBi5 J82aDAbbCTksZQdwCDN6/E4VdOPKc45VRdpDQ2fyOPB16vd3kB7drNUgT3EduOryGvLt 1ZiEJ1D2RcuxyiKhr/jbjqRrwoQO4kiss2G4yLv75fOcIo1fM3xwGnYQU0kJXjUJN5y9 +7nMfOw2nGUSSzc0AOLrmJm28R+05Kvn6Rus9nLVl12o8+kKlkkCOr59ytXhxfM/quqA ny7fYgHGlm1eKw0mDydU/L+h3DUPGJfjx+3JjW5YpzsEHsv6rsEQjjT9hNUB9UsHR2gm 4obg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=ENYlYPHv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x69si8250504pgd.117.2018.03.05.03.24.21; Mon, 05 Mar 2018 03:24:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@8bytes.org header.s=mail-1 header.b=ENYlYPHv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934193AbeCEKby (ORCPT + 99 others); Mon, 5 Mar 2018 05:31:54 -0500 Received: from 8bytes.org ([81.169.241.247]:54374 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933750AbeCEK0P (ORCPT ); Mon, 5 Mar 2018 05:26:15 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 94997923; Mon, 5 Mar 2018 11:26:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=8bytes.org; s=mail-1; t=1520245567; bh=9qfxIAQ8a/U9Y1M9lvUcRyukXFV302vlQqm076ChAfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ENYlYPHvoKSTUK7e+hQurJ7nPf7uvW8jex33YlCNgM7VGAacGR4aodwuM8WmopCkz k/IYrnjq81TSRDmvqkc95gpjsWeZQO8xOjgfWNif+MR7EO3GmT9ORXIiIMichlZdm8 PkaFzPRz3fSoaL0loF1ERiD1cIvAfAYy0wThFUStYbrvjNchlpYI4BOPYa/zAAHW1W fRJEXray9lF9zvFxECq/vdsA8X08Xigf8EvgomNwjwPKD+23CTfEI6Lo0rCQWZf5lq QTQLd/FCHbTKcbcX8OZTdqC14NTSg2Y7wJyUw6G3lmqEJwBdNvLBjdlzdTtZmYp/BC 9f/aNJoir2xBQ== From: Joerg Roedel To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , jroedel@suse.de, joro@8bytes.org Subject: [PATCH 15/34] x86/pgtable: Rename pti_set_user_pgd to pti_set_user_pgtbl Date: Mon, 5 Mar 2018 11:25:44 +0100 Message-Id: <1520245563-8444-16-git-send-email-joro@8bytes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520245563-8444-1-git-send-email-joro@8bytes.org> References: <1520245563-8444-1-git-send-email-joro@8bytes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel With the way page-table folding is implemented on 32 bit, we are not only setting PGDs with this functions, but also PUDs and even PMDs. Give the function a more generic name to reflect that. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/pgtable_64.h | 12 ++++++------ arch/x86/mm/pti.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 81462e9..b68bda5 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -195,21 +195,21 @@ static inline bool pgdp_maps_userspace(void *__ptr) } #ifdef CONFIG_PAGE_TABLE_ISOLATION -pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd); +pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd); /* * Take a PGD location (pgdp) and a pgd value that needs to be set there. * Populates the user and returns the resulting PGD that must be set in * the kernel copy of the page tables. */ -static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) +static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) { if (!static_cpu_has(X86_FEATURE_PTI)) return pgd; - return __pti_set_user_pgd(pgdp, pgd); + return __pti_set_user_pgtbl(pgdp, pgd); } #else -static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) +static inline pgd_t pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) { return pgd; } @@ -218,7 +218,7 @@ static inline pgd_t pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d) { #if defined(CONFIG_PAGE_TABLE_ISOLATION) && !defined(CONFIG_X86_5LEVEL) - p4dp->pgd = pti_set_user_pgd(&p4dp->pgd, p4d.pgd); + p4dp->pgd = pti_set_user_pgtbl(&p4dp->pgd, p4d.pgd); #else *p4dp = p4d; #endif @@ -236,7 +236,7 @@ static inline void native_p4d_clear(p4d_t *p4d) static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd) { #ifdef CONFIG_PAGE_TABLE_ISOLATION - *pgdp = pti_set_user_pgd(pgdp, pgd); + *pgdp = pti_set_user_pgtbl(pgdp, pgd); #else *pgdp = pgd; #endif diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index ce38f16..8f53d21 100644 --- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c @@ -102,7 +102,7 @@ void __init pti_check_boottime_disable(void) setup_force_cpu_cap(X86_FEATURE_PTI); } -pgd_t __pti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) +pgd_t __pti_set_user_pgtbl(pgd_t *pgdp, pgd_t pgd) { /* * Changes to the high (kernel) portion of the kernelmode page -- 2.7.4