mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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 <jroedel@suse.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Pavel Machek <pavel@ucw.cz> Cc: "H . Peter Anvin" <hpa@zytor.com> Cc: linux-mm@kvack.org Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Juergen Gross <jgross@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Kosina <jkosina@suse.cz> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Brian Gerst <brgerst@gmail.com> Cc: David Laight <David.Laight@aculab.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Eduardo Valentin <eduval@amazon.com> Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Will Deacon <will.deacon@arm.com> Cc: aliguori@amazon.com Cc: daniel.gruss@iaik.tugraz.at Cc: hughd@google.com Cc: keescook@google.com Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Waiman Long <llong@redhat.com> Cc: "David H . Gutteridge" <dhgutteridge@sympatico.ca> Cc: joro@8bytes.org Link: https://lkml.kernel.org/r/1531906876-13451-16-git-send-email-joro@8bytes.org
This commit is contained in:
parent
252e1a0526
commit
23b772883d
2 changed files with 7 additions and 7 deletions
|
@ -196,21 +196,21 @@ static inline bool pgdp_maps_userspace(void *__ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PAGE_TABLE_ISOLATION
|
#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.
|
* 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
|
* Populates the user and returns the resulting PGD that must be set in
|
||||||
* the kernel copy of the page tables.
|
* 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))
|
if (!static_cpu_has(X86_FEATURE_PTI))
|
||||||
return pgd;
|
return pgd;
|
||||||
return __pti_set_user_pgd(pgdp, pgd);
|
return __pti_set_user_pgtbl(pgdp, pgd);
|
||||||
}
|
}
|
||||||
#else
|
#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;
|
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 = 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));
|
*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)
|
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)
|
static inline void native_pgd_clear(pgd_t *pgd)
|
||||||
|
|
|
@ -117,7 +117,7 @@ void __init pti_check_boottime_disable(void)
|
||||||
setup_force_cpu_cap(X86_FEATURE_PTI);
|
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
|
* Changes to the high (kernel) portion of the kernelmode page
|
||||||
|
|
Loading…
Reference in a new issue