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


Groups > linux.kernel > #1194996

Re: [PATCH] x86/mm, efi: Check for valid image type

From Dave Young <dyoung@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mm, efi: Check for valid image type
Date 2015-07-29 11:40 +0200
Message-ID <pRw0b-4bi-23@gated-at.bofh.it> (permalink)
References <pP4hI-2zJ-17@gated-at.bofh.it> <pRk8G-3Hd-11@gated-at.bofh.it> <pRnge-8oO-3@gated-at.bofh.it> <pRv45-2Ql-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

> 
> >  As you pointed out above, a wild pointer could cause a
> > WARN from early_ioremap.  We need to never follow the pointer in the
> > first place after a kexec, unless we have some way to know that it's
> > actually valid.
> 
> So you assume that the information from ACPI is always correct then?
> The pointer is correct, the information it points to is no longer.
> 
> If we run always under EFI then it looks like the variable efi_setup
> which is checked in efi_enter_virtual_mode() is 0 during normal boot
> and != 0 on kexec entry. This hint is set via setup_data / SETUP_EFI
> since commit 1fec053369 ("x86/efi: Pass necessary EFI data for kexec
> via setup_data"). So maybe we could use this to check if we run under
> kexec or not.

Not sure if BGRT is useful in kexec kernel, it seems not worth to copy
it between kernels.

IMO just return in case if (efi_setup) is true make sense.

Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH] x86/mm, efi: Check for valid image type Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-07-22 17:40 +0200
  Re: [PATCH] x86/mm, efi: Check for valid image type Matt Fleming <matt@codeblueprint.co.uk> - 2015-07-28 23:00 +0200
    Re: [PATCH] x86/mm, efi: Check for valid image type Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2015-07-29 10:40 +0200
      Re: [PATCH] x86/mm, efi: Check for valid image type Dave Young <dyoung@redhat.com> - 2015-07-29 11:40 +0200
      Re: [PATCH] x86/mm, efi: Check for valid image type Josh Triplett <josh@joshtriplett.org> - 2015-07-30 21:10 +0200

csiph-web