1. 16 8月, 2017 1 次提交
    • M
      efi/arm64: add EFI_KIMG_ALIGN · 170976bc
      Mark Rutland 提交于
      The EFI stub is intimately coupled with the kernel, and takes advantage
      of this by relocating the kernel at a weaker alignment than the
      documented boot protocol mandates.
      
      However, it does so by assuming it can align the kernel to the segment
      alignment, and assumes that this is 64K. In subsequent patches, we'll
      have to consider other details to determine this de-facto alignment
      constraint.
      
      This patch adds a new EFI_KIMG_ALIGN definition that will track the
      kernel's de-facto alignment requirements. Subsequent patches will modify
      this as required.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NLaura Abbott <labbott@redhat.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      170976bc
  2. 05 4月, 2017 1 次提交
    • A
      efi/libstub: Unify command line param parsing · 60f38de7
      Ard Biesheuvel 提交于
      Merge the parsing of the command line carried out in arm-stub.c with
      the handling in efi_parse_options(). Note that this also fixes the
      missing handling of CONFIG_CMDLINE_FORCE=y, in which case the builtin
      command line should supersede the one passed by the firmware.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matt Fleming <matt@codeblueprint.co.uk>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: bhe@redhat.com
      Cc: bhsharma@redhat.com
      Cc: bp@alien8.de
      Cc: eugene@hp.com
      Cc: evgeny.kalugin@intel.com
      Cc: jhugo@codeaurora.org
      Cc: leif.lindholm@linaro.org
      Cc: linux-efi@vger.kernel.org
      Cc: mark.rutland@arm.com
      Cc: roy.franz@cavium.com
      Cc: rruigrok@codeaurora.org
      Link: http://lkml.kernel.org/r/20170404160910.28115-1-ard.biesheuvel@linaro.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      60f38de7
  3. 29 4月, 2016 1 次提交
    • A
      arm64: kaslr: increase randomization granularity · 6f26b367
      Ard Biesheuvel 提交于
      Currently, our KASLR implementation randomizes the placement of the core
      kernel at 2 MB granularity. This is based on the arm64 kernel boot
      protocol, which mandates that the kernel is loaded TEXT_OFFSET bytes above
      a 2 MB aligned base address. This requirement is a result of the fact that
      the block size used by the early mapping code may be 2 MB at the most (for
      a 4 KB granule kernel)
      
      But we can do better than that: since a KASLR kernel needs to be relocated
      in any case, we can tolerate a physical misalignment as long as the virtual
      misalignment relative to this 2 MB block size is equal in size, and code to
      deal with this is already in place.
      
      Since we align the kernel segments to 64 KB, let's randomize the physical
      offset at 64 KB granularity as well (unless CONFIG_DEBUG_ALIGN_RODATA is
      enabled). This way, the page table and TLB footprint is not affected.
      
      The higher granularity allows for 5 bits of additional entropy to be used.
      Reviewed-by: NMatt Fleming <matt@codeblueprint.co.uk>
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      6f26b367
  4. 24 2月, 2016 1 次提交
  5. 22 2月, 2016 2 次提交
  6. 31 10月, 2015 1 次提交
  7. 30 10月, 2015 1 次提交
  8. 27 7月, 2015 1 次提交
  9. 16 1月, 2015 1 次提交
    • A
      arm64/efi: efistub: Apply __init annotation · ddeeefe2
      Ard Biesheuvel 提交于
      This ensures all stub component are freed when the kernel proper is
      done booting, by prefixing the names of all ELF sections that have
      the SHF_ALLOC attribute with ".init". This approach ensures that even
      implicitly emitted allocated data (like initializer values and string
      literals) are covered.
      
      At the same time, remove some __init annotations in the stub that have
      now become redundant, and add the __init annotation to handle_kernel_image
      which will now trigger a section mismatch warning without it.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      ddeeefe2
  10. 08 9月, 2014 1 次提交
  11. 19 7月, 2014 1 次提交
    • A
      efi: efistub: Convert into static library · f4f75ad5
      Ard Biesheuvel 提交于
      This patch changes both x86 and arm64 efistub implementations
      from #including shared .c files under drivers/firmware/efi to
      building shared code as a static library.
      
      The x86 code uses a stub built into the boot executable which
      uncompresses the kernel at boot time. In this case, the library is
      linked into the decompressor.
      
      In the arm64 case, the stub is part of the kernel proper so the library
      is linked into the kernel proper as well.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      f4f75ad5
  12. 08 7月, 2014 4 次提交
  13. 07 7月, 2014 1 次提交
    • A
      efi/arm64: efistub: remove local copy of linux_banner · a55c072d
      Ard Biesheuvel 提交于
      The shared efistub code for ARM and arm64 contains a local copy of
      linux_banner, allowing it to be referenced from separate executables
      such as the ARM decompressor. However, this introduces a dependency on
      generated header files, causing unnecessary rebuilds of the stub itself
      and, in case of arm64, vmlinux which contains it.
      
      On arm64, the copy is not actually needed since we can reference the
      original symbol directly, and as it turns out, there may be better ways
      to deal with this for ARM as well, so let's remove it from the shared
      code. If it still needs to be reintroduced for ARM later, it should live
      under arch/arm anyway and not in shared code.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      a55c072d
  14. 01 5月, 2014 1 次提交