UPSTREAM: efi: stub: use high allocation for converted command line
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 11 Jan 2016 10:47:49 +0000 (11:47 +0100)
committerJeff Vander Stoep <jeffv@google.com>
Thu, 22 Sep 2016 20:38:22 +0000 (13:38 -0700)
commit3fafb1a67d5261cd8a0d9a9ad0316baf98d0bba8
treeabcb65eb9b4b5f059a1036fa96c6d3569b784aa6
parent718645ea36329edb7d1c01871c13385fe1a2f03a
UPSTREAM: efi: stub: use high allocation for converted command line

Before we can move the command line processing before the allocation
of the kernel, which is required for detecting the 'nokaslr' option
which controls that allocation, move the converted command line higher
up in memory, to prevent it from interfering with the kernel itself.

Since x86 needs the address to fit in 32 bits, use UINT_MAX as the upper
bound there. Otherwise, use ULONG_MAX (i.e., no limit)

Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 30369029
Patchset: kaslr-arm64-4.4

(cherry picked from commit 48fcb2d0216103d15306caa4814e2381104df6d8)
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
Change-Id: Ie959355658d3f2f1819bee842c77cc5eef54b8e7
arch/x86/include/asm/efi.h
drivers/firmware/efi/libstub/efi-stub-helper.c