Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1608207

Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into KASLR VA space for randomization

From Baoquan He <bhe@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into KASLR VA space for randomization
Date 2017-03-24 09:40 +0100
Message-ID <tosVj-7gO-1@gated-at.bofh.it> (permalink)
References <topE5-4WE-1@gated-at.bofh.it> <tosBY-79h-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 03/24/17 at 09:08am, Ingo Molnar wrote:
> > Cc: <stable@vger.kernel.org> #4.8+
> > Signed-off-by: Baoquan He <bhe@redhat.com>
> > Acked-by: Dave Young <dyoung@redhat.com>
> > Reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>
> > Acked-by: Thomas Garnier <thgarnie@google.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: "H. Peter Anvin" <hpa@zytor.com>
> > Cc: x86@kernel.org
> > Cc: linux-efi@vger.kernel.org
> > Cc: Thomas Garnier <thgarnie@google.com>
> > Cc: Kees Cook <keescook@chromium.org>
> > Cc: Borislav Petkov <bp@alien8.de>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Cc: Dave Young <dyoung@redhat.com>
> > Cc: Bhupesh Sharma <bhsharma@redhat.com>
> 
> So I applied this kexec fix and extended the changelog to clearly show why this 
> fix matters in practice.

I thought it only impacts kexec, but Dave thought it will impact 1st
kenrel either.
> 
> Also, to make sure I understood it correctly: these addresses are all dynamic on 
> 64-bit kernels, i.e. we are establishing and then tearing down these page tables 
> around EFI calls, and they are 'normally' not present at all, right?

The EFI region is reserved for EFI runtime services virtual mapping, the
original purpose is to preserve this region so that they can be reused
by kexec-ed kernel. This was introduced by Boris in commit d2f7cbe7b26a7
("x86/efi: Runtime services virtual mapping").

So it will be establishing and stay there. According to Dave's telling,
efi will still fetch efi variables or time/date by runtime service by
switching the efi pgd and entering into efi mode. And then switch back
to normal OS. Not sure if I am right for efi part in 1st kernel. For 2nd
kernel, if want to reuse the them, the efi region has to be kept.

Thanks
Baoquan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into KASLR VA space for randomization Baoquan He <bhe@redhat.com> - 2017-03-24 06:10 +0100
  [tip:x86/urgent] x86/mm/KASLR: Exclude EFI region from KASLR VA  space randomization tip-bot for Baoquan He <tipbot@zytor.com> - 2017-03-24 09:20 +0100
  Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ingo Molnar <mingo@kernel.org> - 2017-03-24 09:20 +0100
    Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Baoquan He <bhe@redhat.com> - 2017-03-24 09:40 +0100
      Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Dave Young <dyoung@redhat.com> - 2017-03-24 09:50 +0100
        Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ingo Molnar <mingo@kernel.org> - 2017-03-24 10:30 +0100
          Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Borislav Petkov <bp@alien8.de> - 2017-03-24 10:40 +0100
          Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 10:40 +0100
            Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Borislav Petkov <bp@alien8.de> - 2017-03-24 10:50 +0100
              Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 11:00 +0100
            Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Borislav Petkov <bp@alien8.de> - 2017-03-24 10:50 +0100
              Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 10:50 +0100
            Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ingo Molnar <mingo@kernel.org> - 2017-03-24 11:40 +0100
              Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 11:50 +0100
                Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Ingo Molnar <mingo@kernel.org> - 2017-03-24 12:00 +0100
          Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Baoquan He <bhe@redhat.com> - 2017-03-24 13:00 +0100
    Re: [PATCH v2] x86/mm/KASLR: EFI region is mistakenly included into  KASLR VA space for randomization Dave Young <dyoung@redhat.com> - 2017-03-24 10:00 +0100

csiph-web