lkml.org 
[lkml]   [2016]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] x86, boot: PUD VA support for physical mapping (x86_64)
Date
Minor change that allows early boot physical mapping of PUD level virtual
addresses. This change prepares usage of different virtual addresses for
KASLR memory randomization. It has no impact on default usage.

Signed-off-by: Thomas Garnier <thgarnie@google.com>
---
Based on next-20160422
---
arch/x86/mm/init_64.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 89d9747..6adfbce 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -526,10 +526,10 @@ phys_pud_init(pud_t *pud_page, unsigned long addr, unsigned long end,
{
unsigned long pages = 0, next;
unsigned long last_map_addr = end;
- int i = pud_index(addr);
+ int i = pud_index((unsigned long)__va(addr));

for (; i < PTRS_PER_PUD; i++, addr = next) {
- pud_t *pud = pud_page + pud_index(addr);
+ pud_t *pud = pud_page + pud_index((unsigned long)__va(addr));
pmd_t *pmd;
pgprot_t prot = PAGE_KERNEL;

--
2.8.0.rc3.226.g39d4020
\
 
 \ /
  Last update: 2016-04-25 18:41    [W:0.166 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site