lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun,  7 Mar 2021 22:22:51 +0800
From:   Adrian Huang <adrianhuang0701@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>
Cc:     x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
        Jonathan Corbet <corbet@....net>, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org,
        Adrian Huang <adrianhuang0701@...il.com>,
        Adrian Huang <ahuang12@...ovo.com>,
        Kees Cook <keescook@...omium.org>
Subject: [PATCH 1/1] Documentation/x86/boot: Correct algorithm for runtime start address

From: Adrian Huang <ahuang12@...ovo.com>

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 <ahuang12@...ovo.com>
Cc: Kees Cook <keescook@...omium.org>
---
 Documentation/x86/boot.rst | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst
index fc844913dece..808ea181ca40 100644
--- a/Documentation/x86/boot.rst
+++ b/Documentation/x86/boot.rst
@@ -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
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ