mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Young <dyoung@redhat.com>
To: Baoquan He <bhe@redhat.com>
Cc: mingo@kernel.org, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, hpa@zytor.com
Subject: Re: [PATCH v2 0/2] x86/boot/KASLR: Code bug fix about kernel virtual address randomization
Date: Fri, 30 Jun 2017 14:14:23 +0800	[thread overview]
Message-ID: <20170630061423.GA13433@dhcp-128-65.nay.redhat.com> (raw)
In-Reply-To: <1498567146-11990-1-git-send-email-bhe@redhat.com>

On 06/27/17 at 08:39pm, Baoquan He wrote:
> People complained that crashkernel high doesn't work when kaslr code
> compiled in but add 'nokaslr' to diable it. Kexec has the same
> phenomenon.

This is a regression, with 4.12* kernel kexec reboot fails always on
my desktop pc now without kaslr being enabled.

> 
> The root cause is a code bug which assigned the original loading address
> of kernel to the local variable 'virt_addr' which represents the offset
> of kernel virtual address randmoization. As we know, kernel can be loaded
> to anywhere under 64T physically, this wrong assignment could cause kernel
> relocation handling of x86 64 error if no kaslr is taken.
> 
> The v1 post can be found here:
>   x86/boot/KASLR: Skip relocation handling in no kaslr case
>   https://patchwork.kernel.org/patch/9807789/
> 
> In v2, Ingo suggested that we should add a judgement to check if 'virt_addr'
> is randomized to make kernel beyond the kernel mapping area. This checking
> can let us know the error but not reset to firmware quietly as it does now.
> 
> Baoquan He (2):
>   x86/boot/KASLR: Add checking for the offset of kernel virtual address
>     randomization
>   x86/boot/KASLR: Fix the wrong assignment to 'virt_addr'
> 
>  arch/x86/boot/compressed/kaslr.c | 3 ---
>  arch/x86/boot/compressed/misc.c  | 6 ++++--
>  arch/x86/boot/compressed/misc.h  | 2 --
>  3 files changed, 4 insertions(+), 7 deletions(-)
> 
> -- 
> 2.5.5
> 

      parent reply	other threads:[~2017-06-30  6:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 12:39 Baoquan He
2017-06-27 12:39 ` [PATCH v2 1/2] x86/boot/KASLR: Add checking for the offset of " Baoquan He
2017-06-30 13:07   ` [tip:x86/urgent] " tip-bot for Baoquan He
2017-06-27 12:39 ` [PATCH v2 2/2] x86/boot/KASLR: Fix the wrong assignment to 'virt_addr' Baoquan He
2017-06-30 13:08   ` [tip:x86/urgent] x86/boot/KASLR: Fix kexec crash due to 'virt_addr' calculation bug tip-bot for Baoquan He
2017-06-30  6:14 ` Dave Young [this message]

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=20170630061423.GA13433@dhcp-128-65.nay.redhat.com \
    --to=dyoung@redhat.com \
    --cc=bhe@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®