Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2252051imm; Thu, 19 Jul 2018 16:28:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdKRCDjiU/bolumrdbeOnzPB0xTEOAm3lANrgI4uXLTmpi0049ZJoWt9+0x/wutf5G9QajV X-Received: by 2002:a63:2404:: with SMTP id k4-v6mr11655387pgk.191.1532042924767; Thu, 19 Jul 2018 16:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532042924; cv=none; d=google.com; s=arc-20160816; b=c6KBK2EaS54Z84Pv1lCBVRE5mIniQ0lYnKqEZ26EJYEoWfQkpDb4OxMrdiJSACJ91y CIfsM06UtsLhPjlvKRzPPF2913ePizzqj8rjTJAiLuw6fy/UhCCGMH6eLuv5O7SDzuuN /R/XhSB3M3WaT7XXsuPokF5D7I1vUPrG6cRXAGXSj6t0O8PsqgAj7oBRKAy1txF8AHDf nTwkvU5V4NCKxxvyu5hPRxbUpIJMqKGCNyfWm9LCNz+ecSLKb1cuF1AcgypAuH75cadB d8xWE9j9JaZaR0xtT56MWhUzp7y8vWY6SXZGZ1LEOMUzzjvGnVtAJ9tFAUyd5hWVkPP2 MnwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=49Ae7eNWP8s7MuUCZMnlOVoIr4ZswCh+1ibO5pIt4Ss=; b=Y+GP9pqACRlfYXzhOJ9Zinr5YD0J+rorcuYIsluhuZqSzXlz0hK3JarpEan74SctIZ zH/G878fhr3MPS6T+FKMsnTiHcORsG+D0mAO1de0Y1HMDBW24RF/I7uzvW3bzeGnM79f svcQx2iXym9lPpKyqeRbuOz36KIYYYPW/1AO03FdnPh27RDI7PaZnqYYwQ7TmhDit7s1 4svcewXQrP3ax+CSy34fkPclo0XbCdGw8ILBJqiMrNgr2VEWC4XXBMiR84JCvnUZPcwC KfZhewjurowwd8+h5NtKMH7F+qLGAZBit6vYuP04fkjzt7iqiz1MzAaLRpyVQHehxGGu 86pQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si346747pgb.300.2018.07.19.16.28.29; Thu, 19 Jul 2018 16:28:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731059AbeGTAMi (ORCPT + 99 others); Thu, 19 Jul 2018 20:12:38 -0400 Received: from terminus.zytor.com ([198.137.202.136]:34797 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727615AbeGTAMi (ORCPT ); Thu, 19 Jul 2018 20:12:38 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w6JNQFQJ2453170 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Jul 2018 16:26:15 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w6JNQFAr2453167; Thu, 19 Jul 2018 16:26:15 -0700 Date: Thu, 19 Jul 2018 16:26:15 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Joerg Roedel Message-ID: Cc: dhgutteridge@sympatico.ca, peterz@infradead.org, llong@redhat.com, gregkh@linuxfoundation.org, aarcange@redhat.com, eduval@amazon.com, jroedel@suse.de, dvlasenk@redhat.com, David.Laight@aculab.com, pavel@ucw.cz, jpoimboe@redhat.com, tglx@linutronix.de, boris.ostrovsky@oracle.com, brgerst@gmail.com, luto@kernel.org, mingo@kernel.org, hpa@zytor.com, will.deacon@arm.com, torvalds@linux-foundation.org, bp@alien8.de, linux-kernel@vger.kernel.org, jkosina@suse.cz, jgross@suse.com, dave.hansen@intel.com Reply-To: dave.hansen@intel.com, jgross@suse.com, jkosina@suse.cz, bp@alien8.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, mingo@kernel.org, will.deacon@arm.com, hpa@zytor.com, luto@kernel.org, brgerst@gmail.com, boris.ostrovsky@oracle.com, pavel@ucw.cz, jpoimboe@redhat.com, tglx@linutronix.de, dvlasenk@redhat.com, David.Laight@aculab.com, jroedel@suse.de, eduval@amazon.com, gregkh@linuxfoundation.org, aarcange@redhat.com, llong@redhat.com, dhgutteridge@sympatico.ca, peterz@infradead.org In-Reply-To: <1531906876-13451-16-git-send-email-joro@8bytes.org> References: <1531906876-13451-16-git-send-email-joro@8bytes.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/pti] x86/pgtable: Rename pti_set_user_pgd() to pti_set_user_pgtbl() Git-Commit-ID: 23b772883d1ddcf7fdf883614b88b2a6205db4da X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 23b772883d1ddcf7fdf883614b88b2a6205db4da Gitweb: https://git.kernel.org/tip/23b772883d1ddcf7fdf883614b88b2a6205db4da Author: Joerg Roedel AuthorDate: Wed, 18 Jul 2018 11:40:52 +0200 Committer: Thomas Gleixner CommitDate: Fri, 20 Jul 2018 01:11:40 +0200 x86/pgtable: Rename pti_set_user_pgd() to pti_set_user_pgtbl() The way page-table folding is implemented on 32 bit, these functions are not only setting, but also PUDs and even PMDs. Give the function a more generic name to reflect that. Signed-off-by: Joerg Roedel Signed-off-by: Thomas Gleixner Tested-by: Pavel Machek Cc: "H . Peter Anvin" Cc: linux-mm@kvack.org Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Dave Hansen Cc: Josh Poimboeuf Cc: Juergen Gross Cc: Peter Zijlstra Cc: Borislav Petkov Cc: Jiri Kosina Cc: Boris Ostrovsky Cc: Brian Gerst Cc: David Laight Cc: Denys Vlasenko Cc: Eduardo Valentin Cc: Greg KH Cc: Will Deacon Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: Andrea Arcangeli Cc: Waiman Long Cc: "David H . Gutteridge" Cc: joro@8bytes.org Link: https://lkml.kernel.org/r/1531906876-13451-16-git-send-email-joro@8bytes.org --- 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 3c5385f9a88f..9406c4fe1d38 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -196,21 +196,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; } @@ -226,7 +226,7 @@ static inline void native_set_p4d(p4d_t *p4dp, p4d_t p4d) } pgd = native_make_pgd(native_p4d_val(p4d)); - pgd = pti_set_user_pgd((pgd_t *)p4dp, pgd); + pgd = pti_set_user_pgtbl((pgd_t *)p4dp, pgd); *p4dp = native_make_p4d(native_pgd_val(pgd)); } @@ -237,7 +237,7 @@ static inline void native_p4d_clear(p4d_t *p4d) static inline void native_set_pgd(pgd_t *pgdp, pgd_t pgd) { - *pgdp = pti_set_user_pgd(pgdp, pgd); + *pgdp = pti_set_user_pgtbl(pgdp, pgd); } static inline void native_pgd_clear(pgd_t *pgd) diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index 9277e9ba92b5..71fba17c9d7c 100644 --- a/arch/x86/mm/pti.c +++ b/arch/x86/mm/pti.c @@ -117,7 +117,7 @@ enable: 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