[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190312073849.d6xezoaaffmbeyx5@kshutemo-mobl1>
Date: Tue, 12 Mar 2019 10:38:49 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Baoquan He <bhe@...hat.com>
Cc: linux-kernel@...r.kernel.org, kirill.shutemov@...ux.intel.com,
dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
x86@...nel.org, keescook@...omium.org, thgarnie@...gle.com
Subject: Re: [PATCH v3 1/2] x86/mm/KASLR: Only build one PUD entry of area
for real mode trampoline
On Fri, Mar 08, 2019 at 10:56:15AM +0800, Baoquan He wrote:
> The current code builds identity mapping for real mode treampoline by
> borrowing page tables from the direct mapping section if KASLR is
> enabled. It will copy present entries of the first PUD table in 4-level
> paging mode, or the first P4D table in 5-level paging mode.
>
> However, there's only a very small area under low 1 MB reserved
> for real mode trampoline in reserve_real_mode(). Makes no sense
> to build up so large area of mapping for it. Since the randomization
> granularity in 4-level is 1 GB, and 512 GB in 5-level, only copying
> one PUD entry is enough.
>
> Hence, only copy one PUD entry of area where physical address 0
> resides. And this is preparation for later changing the randomization
> granularity of 5-level paging mode from 512 GB to 1 GB.
>
> Signed-off-by: Baoquan He <bhe@...hat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
--
Kirill A. Shutemov
Powered by blists - more mailing lists