lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 04/24] x86/mm/kaiser: Unmap kernel mappings from userspace page tables, core patch
On Mon, Nov 27, 2017 at 11:49:03AM +0100, Ingo Molnar wrote:
> +/*
> + * Given a kernel address, @__start_addr, copy that mapping into
> + * the user (shadow) page tables. This may need to allocate page
> + * table pages.
> + */
> +int kaiser_add_user_map(const void *__start_addr, unsigned long size,
> + unsigned long flags)
> +{
> +}
> +
> +int kaiser_add_user_map_ptrs(const void *__start_addr,
> + const void *__end_addr,
> + unsigned long flags)
> +{
> +}

AFAICT these here can be static..


diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
index 0ff502fa655b..f2bf074b08e5 100644
--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -260,8 +260,8 @@ static pte_t *kaiser_shadow_pagetable_walk(unsigned long address,
* the user (shadow) page tables. This may need to allocate page
* table pages.
*/
-int kaiser_add_user_map(const void *__start_addr, unsigned long size,
- unsigned long flags)
+static int kaiser_add_user_map(const void *__start_addr, unsigned long size,
+ unsigned long flags)
{
unsigned long start_addr = (unsigned long)__start_addr;
unsigned long address = start_addr & PAGE_MASK;
@@ -310,9 +310,9 @@ int kaiser_add_user_map(const void *__start_addr, unsigned long size,
return 0;
}

-int kaiser_add_user_map_ptrs(const void *__start_addr,
- const void *__end_addr,
- unsigned long flags)
+static int kaiser_add_user_map_ptrs(const void *__start_addr,
+ const void *__end_addr,
+ unsigned long flags)
{
return kaiser_add_user_map(__start_addr,
__end_addr - __start_addr,
\
 
 \ /
  Last update: 2017-11-28 13:00    [W:0.258 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site