Documentation/x86/boot: Correct algorithm for runtime start address
PATCH 1/1 Documentation/x86/boot: Correct algorithm for runtime start address
From: Adrian Huang <[email protected]>
Commit 8ab3820fd5b2 ("x86, kaslr: Return location from decompress_kernel") enforces CONFIG_PHYSICAL_START as the minimum relocation address when the kernel option CONFIG_RELOCATABLE is enabled. This change should be included accordingly.
Signed-off-by Adrian Huang <[email protected]>
Cc Kees Cook <[email protected]>
--- Documentation/x86/boot.rst | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Documentation/x86/boot.rst +10 -4
@@ -894,10 +894,16 @@ Offset/size: 0x260/4 The kernel runtime start address is determined by the following algorithm:: - if (relocatable_kernel) - runtime_start = align_up(load_address, kernel_alignment) - else - runtime_start = pref_address + if (relocatable_kernel) { + runtime_start = align_up(load_address, kernel_alignment); + + /* pref_address is the minimum relocation address */ + if (runtime_start < pref_address) + runtime_start = pref_address; + } else { + /* Adhere to the statement describing in field 'pref_address' */ + runtime_start = pref_address; + } ============ =============== Field name: handover_offset
Signature · 1 line
2.17.1