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]
Message-ID: <151331264.Sjvx2oHGGq@aspire.rjw.lan>
Date:   Mon, 11 Dec 2017 15:22:39 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Pavel Machek <pavel@....cz>, Andrew Lutomirski <luto@...nel.org>
Cc:     Andy Lutomirski <luto@...capital.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH] Fix resume on x86-32 machines

On Sunday, December 10, 2017 10:58:23 PM CET Andy Lutomirski wrote:
> 
> > On Dec 10, 2017, at 1:38 PM, Pavel Machek <pavel@....cz> wrote:
> > 
> > 
> > After 4.15-rc2, suspend stopped working on Thinkpad X60. 5b06bbc
> > (unintentionally?) reordered stuff with respect to
> > fix_processor_context() on 32-bit and 64-bit. We undo that change on
> > 32-bit.
> > 
> 
> Can you explain what was wrong with the reordering?  Your patch certainly *looks* incorrect.
> 
> I'm guessing that the real issue is that 32-bit needs %fs restored early for TLS.

I *think* you are right.

Anyway, that should be easy enough to verify.

Pavel, can you please check if the below change works too?

---
 arch/x86/power/cpu.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-pm/arch/x86/power/cpu.c
===================================================================
--- linux-pm.orig/arch/x86/power/cpu.c
+++ linux-pm/arch/x86/power/cpu.c
@@ -221,6 +221,8 @@ static void notrace __restore_processor_
 	 */
 #ifdef CONFIG_X86_32
 	load_idt(&ctxt->idt);
+
+	loadsegment(fs, ctxt->fs);
 #else
 /* CONFIG_X86_64 */
 	load_idt((const struct desc_ptr *)&ctxt->idt_limit);
@@ -243,7 +245,6 @@ static void notrace __restore_processor_
 	 */
 #ifdef CONFIG_X86_32
 	loadsegment(es, ctxt->es);
-	loadsegment(fs, ctxt->fs);
 	loadsegment(gs, ctxt->gs);
 	loadsegment(ss, ctxt->ss);
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ