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:   Fri,  1 Dec 2017 22:20:10 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     X86 ML <x86@...nel.org>
Cc:     Borislav Petkov <bpetkov@...e.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Brian Gerst <brgerst@...il.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: [PATCH 1/2] Undo the split of setup_cpu_entry_area

This is obviously a hack.  Either the patch should be adjusted back to
the version I sent or trap_init should forcibly initialize all PMDs
by something like __set_fixmap(..., __mkpte(0)); or however it's spelled.
---
 arch/x86/kernel/smpboot.c | 2 ++
 arch/x86/kernel/traps.c   | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 26317716559d..1325844b930a 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1232,8 +1232,10 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
 		 * The boot CPU area has been set up in trap_init()
 		 * already.
 		 */
+		/*
 		if (i)
 			setup_cpu_entry_area(i);
+		*/
 	}
 
 	/*
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index ff4e6b595ae4..0ad92f35a75b 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -945,8 +945,12 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
 
 void __init trap_init(void)
 {
+	int cpu;
 	/* Init cpu_entry_area before IST entries are set up */
-	setup_cpu_entry_area(smp_processor_id());
+	for_each_possible_cpu(cpu) {
+		pr_err("setup_cpu_entry_area(%d)\n", cpu);
+		setup_cpu_entry_area(cpu);
+	}
 
 	idt_setup_traps();
 
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ