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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <0-v1-aa2f00cae409+47-txt_tboot_jgg@nvidia.com>
Date:   Fri, 23 Oct 2020 11:10:10 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Borislav Petkov <bp@...en8.de>, <linux-kernel@...r.kernel.org>,
        "Ingo Molnar" <mingo@...hat.com>, Ning Sun <ning.sun@...el.com>,
        <tboot-devel@...ts.sourceforge.net>,
        Thomas Gleixner <tglx@...utronix.de>, <x86@...nel.org>
CC:     Gang Wei <gang.wei@...el.com>, "H. Peter Anvin" <hpa@...or.com>,
        "Joseph Cihula" <joseph.cihula@...el.com>,
        Shane Wang <shane.wang@...el.com>
Subject: [PATCH] x86, intel_txt: Use correct struct name for tboot_mm initializer

For the locks this sets the correct lockdep map name, for mmlist it avoids
creating a corrupted mmlist that is not empty.

Seems like a copy&paste typo.

Fixes: 316253406959 ("x86, intel_txt: Intel TXT boot support")
Signed-off-by: Jason Gunthorpe <jgg@...dia.com>
---
 arch/x86/kernel/tboot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

If it is deliberate it deserves a big comment why..

diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c
index 992fb1415c0f1f..14298ecfa100fe 100644
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -93,9 +93,9 @@ static struct mm_struct tboot_mm = {
 	.pgd            = swapper_pg_dir,
 	.mm_users       = ATOMIC_INIT(2),
 	.mm_count       = ATOMIC_INIT(1),
-	MMAP_LOCK_INITIALIZER(init_mm)
-	.page_table_lock =  __SPIN_LOCK_UNLOCKED(init_mm.page_table_lock),
-	.mmlist         = LIST_HEAD_INIT(init_mm.mmlist),
+	MMAP_LOCK_INITIALIZER(tboot_mm)
+	.page_table_lock = __SPIN_LOCK_UNLOCKED(tboot_mm.page_table_lock),
+	.mmlist         = LIST_HEAD_INIT(tboot_mm.mmlist),
 };
 
 static inline void switch_to_tboot_pt(void)
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ