lkml.org 
[lkml]   [2017]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 12/30] x86, kaiser: map GDT into user page tables
From
Date
On 11/21/2017 04:17 PM, Andy Lutomirski wrote:
> On Tue, Nov 21, 2017 at 3:42 PM, Dave Hansen
> unsigned long start = (unsigned long)get_cpu_entry_area(cpu);
> for (unsigned long addr = start; addr < start + sizeof(struct
> cpu_entry_area); addr += PAGE_SIZE) {
> pte_t pte = *pte_offset_k(addr); /* or however you do this */
> kaiser_add_mapping(pte_pfn(pte), pte_prot(pte));
> }
>
> modulo the huge pile of typos in there that surely exist.

That would work. I just need to find a suitable pte_offset_k() in the
kernel and make sure it works for these purposes. We probably have one.

> But I still prefer my approach of just sharing the cpu_entry_area pmd
> entries between the user and kernel tables.

That would be spiffy.

\
 
 \ /
  Last update: 2017-11-22 01:37    [W:0.049 / U:2.328 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site