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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 6 Feb 2019 10:13:07 -0800
From:   "tip-bot for Kirill A. Shutemov" <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     wei@...hat.com, bp@...e.de, mingo@...nel.org,
        kirill.shutemov@...ux.intel.com, mingo@...hat.com, hpa@...or.com,
        kyle.d.pelton@...el.com, linux-kernel@...r.kernel.org,
        tglx@...utronix.de, x86@...nel.org
Subject: [tip:x86/cleanups] x86/boot/compressed/64: Explain
 paging_prepare()'s return value

Commit-ID:  82434d23f36de42f70925f70d645ed3b1394361b
Gitweb:     https://git.kernel.org/tip/82434d23f36de42f70925f70d645ed3b1394361b
Author:     Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
AuthorDate: Wed, 6 Feb 2019 18:29:08 +0300
Committer:  Borislav Petkov <bp@...e.de>
CommitDate: Wed, 6 Feb 2019 19:08:34 +0100

x86/boot/compressed/64: Explain paging_prepare()'s return value

paging_prepare() returns a two-quadword structure which lands
into RDX:RAX:

  - Address of the trampoline is returned in RAX.
  - Non zero RDX means trampoline needs to enable 5-level paging.

Document that explicitly.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: dave.hansen@...ux.intel.com
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Kyle D Pelton <kyle.d.pelton@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Wei Huang <wei@...hat.com>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20190206154756.matwldebbxkmlnae@black.fi.intel.com
---
 arch/x86/boot/compressed/head_64.S | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index b27b338d2f6d..73b9d7e91a9c 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -358,8 +358,11 @@ ENTRY(startup_64)
 	 * paging_prepare() sets up the trampoline and checks if we need to
 	 * enable 5-level paging.
 	 *
-	 * Address of the trampoline is returned in RAX.
-	 * Non zero RDX on return means we need to enable 5-level paging.
+	 * paging_prepare() returns a two-quadword structure which lands
+	 * into RDX:RAX:
+	 *   - Address of the trampoline is returned in RAX.
+	 *   - Non zero RDX means trampoline needs to enable 5-level
+	 *     paging.
 	 *
 	 * RSI holds real mode data and needs to be preserved across
 	 * this function call.
@@ -565,7 +568,7 @@ adjust_got:
  *
  * RDI contains the return address (might be above 4G).
  * ECX contains the base address of the trampoline memory.
- * Non zero RDX on return means we need to enable 5-level paging.
+ * Non zero RDX means trampoline needs to enable 5-level paging.
  */
 ENTRY(trampoline_32bit_src)
 	/* Set up data and stack segments */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ