mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: mingo@kernel.org, matt@codeblueprint.co.uk
Cc: linux-kernel@vger.kernel.org, keescook@chromium.org,
	tglx@linutronix.de, hpa@zytor.com, izumi.taku@jp.fujitsu.com,
	fanc.fnst@cn.fujitsu.com, thgarnie@google.com,
	n-horiguchi@ah.jp.nec.com, ard.biesheuvel@linaro.org,
	linux-efi@vger.kernel.org, x86@kernel.org,
	Baoquan He <bhe@redhat.com>
Subject: [PATCH v9 0/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions
Date: Mon, 14 Aug 2017 22:54:22 +0800	[thread overview]
Message-ID: <1502722464-20614-1-git-send-email-bhe@redhat.com> (raw)

Patch 1/2 is added to add efi_early_memdesc_ptr helper to wrap the open
code which gets the start of efi memmap descriptor and also explain why
it need be done like that, Ingo suggested it.

And also replace several places of the open code with efi_early_memdesc_ptr
helper.

And also use efi_early_memdesc_ptr in process_efi_entries() which handle efi
mirror issue during KASLR.


Change:
v8->v9:
    Matt suggested that an 'early' should be included in the name of
    the helper to make its name as efi_early_memdesc_ptr. That can help
    denote the helper should only be used in early bootup stage, after
    that for_each_efi_memory_*() API is suggested.

v7->v8:
    Add efi_memdesc_ptr helper to wrap the open code which gets the
    start of map descriptor according to Ingo's suggestion.

v6->v7:
  Ingo pointed out several incorrect line break issues and unclear
  description of patch log. Correct them and rewrite patch log.

  And also rewrite the EFI warning message that if EFI memmap is above
  4G in 32bit system since 32bit system can not handle data above 4G at
  kernel decompression stage. This is suggested by Ingo too.

v5->v6:
  Code style issue fix according to Kees's comment.

  This is based on tip/x86/boot, patch 1,2,3/4 in v5 post has
  been put into tip/x86/boot now.

Baoquan He (2):
  efi: Introduce efi_early_memdesc_ptr to get pointer to memmap
    descriptor
  x86/boot/KASLR: Restrict kernel to be randomized in mirror regions

 arch/x86/boot/compressed/eboot.c               |  2 +-
 arch/x86/boot/compressed/kaslr.c               | 68 +++++++++++++++++++++++++-
 drivers/firmware/efi/libstub/efi-stub-helper.c |  4 +-
 include/linux/efi.h                            | 21 ++++++++
 4 files changed, 90 insertions(+), 5 deletions(-)

-- 
2.5.5

             reply	other threads:[~2017-08-14 14:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 14:54 Baoquan He [this message]
2017-08-14 14:54 ` [PATCH v9 1/2] efi: Introduce efi_early_memdesc_ptr to get pointer to memmap descriptor Baoquan He
2017-08-16 11:37   ` Matt Fleming
2017-08-16 13:18     ` Baoquan He
2017-08-16 13:46   ` [PATCH v10 " Baoquan He
2017-08-17 10:20     ` [tip:x86/boot] " tip-bot for Baoquan He
2017-08-14 14:54 ` [PATCH v9 2/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions Baoquan He
2017-08-17 10:21   ` [tip:x86/boot] x86/boot/KASLR: Prefer mirrored memory regions for the kernel physical address tip-bot for Baoquan He
2017-08-17 13:04   ` [PATCH v9 2/2] x86/boot/KASLR: Restrict kernel to be randomized in mirror regions Baoquan He
2017-08-18 15:10     ` Ard Biesheuvel
2017-08-19  1:22       ` Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1502722464-20614-1-git-send-email-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=keescook@chromium.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=tglx@linutronix.de \
    --cc=thgarnie@google.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome