1. 11 Aug, 2014 1 commit
  2. 05 Aug, 2014 1 commit
    • Matt Fleming's avatar
      x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub · 7b2a583a
      Matt Fleming authored
      Without CONFIG_RELOCATABLE the early boot code will decompress the
      kernel to LOAD_PHYSICAL_ADDR. While this may have been fine in the BIOS
      days, that isn't going to fly with UEFI since parts of the firmware
      code/data may be located at LOAD_PHYSICAL_ADDR.
      
      Straying outside of the bounds of the regions we've explicitly requested
      from the firmware will cause all sorts of trouble. Bruno reports that
      his machine resets while trying to decompress the kernel image.
      
      We already go to great pains to ensure the kernel is loaded into a
      suitably aligned buffer, it's just that the address isn't necessarily
      LOAD_PHYSICAL_ADDR, because we can't guarantee that address isn't in-use
      by the firmware.
      
      Explicitly enforce CONFIG_RELOCATABLE for the EFI boot stub, so that we
      can load the kernel at any address with the correct alignment.
      Reported-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Tested-by: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      7b2a583a
  3. 04 Aug, 2014 1 commit
  4. 18 Jul, 2014 21 commits
  5. 10 Jul, 2014 2 commits
  6. 07 Jul, 2014 8 commits
  7. 27 Jun, 2014 1 commit
    • Andrzej Zaborowski's avatar
      efi-pstore: Fix an overflow on 32-bit builds · 783ee431
      Andrzej Zaborowski authored
      In generic_id the long int timestamp is multiplied by 100000 and needs
      an explicit cast to u64.
      
      Without that the id in the resulting pstore filename is wrong and
      userspace may have problems parsing it, but more importantly files in
      pstore can never be deleted and may fill the EFI flash (brick device?).
      This happens because when generic pstore code wants to delete a file,
      it passes the id to the EFI backend which reinterpretes it and a wrong
      variable name is attempted to be deleted.  There's no error message but
      after remounting pstore, deleted files would reappear.
      Signed-off-by: default avatarAndrew Zaborowski <andrew.zaborowski@intel.com>
      Acked-by: default avatarDavid Rientjes <rientjes@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      783ee431
  8. 19 Jun, 2014 4 commits
    • Catalin Marinas's avatar
      efi: Fix compiler warnings (unused, const, type) · 6fb8cc82
      Catalin Marinas authored
      This patch fixes a few compiler warning in the efi code for unused
      variable, discarding const qualifier and wrong pointer type:
      
      drivers/firmware/efi/fdt.c|66 col 22| warning: unused variable ‘name’ [-Wunused-variable]
      drivers/firmware/efi/efi.c|368 col 3| warning: passing argument 3 of ‘of_get_flat_dt_prop’ from incompatible pointer type [enabled by default]
      drivers/firmware/efi/efi.c|368 col 8| warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default]
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      6fb8cc82
    • Yinghai Lu's avatar
      x86/efi: Support initrd loaded above 4G · 4bf7111f
      Yinghai Lu authored
      For boot efi kernel directly without bootloader.
      If the kernel support XLF_CAN_BE_LOADED_ABOVE_4G, we should
      not limit initrd under hdr->initrd_add_max.
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      4bf7111f
    • Matt Fleming's avatar
      x86/efi: Use early_memunmap() to squelch sparse errors · 98a716b6
      Matt Fleming authored
      The kbuild reports the following sparse errors,
      
      >> arch/x86/platform/efi/quirks.c:242:23: sparse: incorrect type in >> argument 1 (different address spaces)
         arch/x86/platform/efi/quirks.c:242:23:    expected void [noderef] <asn:2>*addr
         arch/x86/platform/efi/quirks.c:242:23:    got void *[assigned] tablep
      >> arch/x86/platform/efi/quirks.c:245:23: sparse: incorrect type in >> argument 1 (different address spaces)
         arch/x86/platform/efi/quirks.c:245:23:    expected void [noderef] <asn:2>*addr
         arch/x86/platform/efi/quirks.c:245:23:    got struct efi_setup_data *[assigned] data
      
      Dave Young had made previous attempts to convert the early_iounmap()
      calls to early_memunmap() but ran into merge conflicts with commit
      9e5c33d7 ("mm: create generic early_ioremap() support").
      
      Now that we've got that commit in place we can switch to using
      early_memunmap() since we're already using early_memremap() in
      efi_reuse_config().
      
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Saurabh Tangri <saurabh.tangri@intel.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      98a716b6
    • Saurabh Tangri's avatar
      x86/efi: Move all workarounds to a separate file quirks.c · eeb9db09
      Saurabh Tangri authored
      Currently, it's difficult to find all the workarounds that are
      applied when running on EFI, because they're littered throughout
      various code paths. This change moves all of them into a separate
      file with the hope that it will be come the single location for all
      our well documented quirks.
      Signed-off-by: default avatarSaurabh Tangri <saurabh.tangri@intel.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      eeb9db09
  9. 16 Jun, 2014 1 commit