linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Determine kernel text mapping size at runtime for x86_64
@ 2016-12-08  7:56 Baoquan He
  2016-12-08  7:56 ` [PATCH 1/2] x86/64: Make kernel text mapping always take one whole page table in early boot code Baoquan He
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Baoquan He @ 2016-12-08  7:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: tglx, hpa, mingo, x86, keescook, yinghai, bp, thgarnie,
	kuleshovmail, luto, anderson, dyoung, xlpang, Baoquan He

Dave Anderson ever told in Crash utility he makes judgement whether it's
a kaslr kernel by size of KERNEL_IMAGE_SIZE. As long as it's 1G, it's
recognized as kaslr. Then the current upstream kernel has a wrong behaviour,
it sets KERNEL_IMAGE_SIZE as 1G as long as CONFIG_RANDOMIZE_BASE is enabled,
though people specify "nokaslr" into cmdline to disable kaslr explicitly.

So in this patchset, made changes to determine the size of kernel text mapping
area at runtime. If "nokaslr" specified, kernel mapping size is 512M though
CONFIG_RANDOMIZE_BASE is enabled.

Baoquan He (2):
  x86/64: Make kernel text mapping always take one whole page table in
    early boot code
  x86/KASLR/64: Determine kernel text mapping size at runtime

 arch/x86/boot/compressed/kaslr.c        | 15 ++++++++++-----
 arch/x86/include/asm/kaslr.h            |  1 +
 arch/x86/include/asm/page_64_types.h    | 20 ++++++++++++--------
 arch/x86/include/asm/pgtable_64_types.h |  2 +-
 arch/x86/kernel/head64.c                | 11 ++++++-----
 arch/x86/kernel/head_64.S               | 16 +++++++++-------
 arch/x86/mm/dump_pagetables.c           |  3 ++-
 arch/x86/mm/init_64.c                   |  2 +-
 arch/x86/mm/physaddr.c                  |  6 +++---
 9 files changed, 45 insertions(+), 31 deletions(-)

-- 
2.5.5

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-12-10  1:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08  7:56 [PATCH 0/2] Determine kernel text mapping size at runtime for x86_64 Baoquan He
2016-12-08  7:56 ` [PATCH 1/2] x86/64: Make kernel text mapping always take one whole page table in early boot code Baoquan He
2016-12-08  8:24   ` Alexnader Kuleshov
2016-12-08  8:40     ` Baoquan He
2016-12-08  7:56 ` [PATCH 2/2] x86/KASLR/64: Determine kernel text mapping size at runtime Baoquan He
2016-12-08  8:17   ` Alexnader Kuleshov
2016-12-08  8:25     ` Baoquan He
2016-12-08  9:41   ` kbuild test robot
2016-12-08 13:41     ` Baoquan He
2016-12-08  9:41   ` kbuild test robot
2016-12-08 18:31 ` [PATCH 0/2] Determine kernel text mapping size at runtime for x86_64 Kees Cook
2016-12-08 19:00   ` Dave Anderson
2016-12-10  1:32     ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).