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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4505D709.9020409@goop.org>
Date:	Mon, 11 Sep 2006 14:37:13 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Andi Kleen <ak@...e.de>
CC:	Ingo Molnar <mingo@...e.hu>, Andrew Morton <akpm@...l.org>,
	Laurent Riffard <laurent.riffard@...e.fr>,
	Arjan van de Ven <arjan@...radead.org>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy@...source.com>
Subject: Re: [patch] i386-PDA, lockdep: fix %gs restore

Andi Kleen wrote:
> On Monday 11 September 2006 07:25, Ingo Molnar wrote:
>   
>> Jeremy,
>>
>> could you back out Andi's patch and try the patch below, does it fix the
>> crash too?
>>     
>
> I folded it into the original patch now thanks
>   

Ingo's patch was wrong.  Here's an update:

Subject: [patch] i386-PDA, lockdep: fix %gs restore
From: Ingo Molnar <mingo@...e.hu>

in the syscall exit path the %gs selector has to be restored _after_ the
last kernel function has been called. If lockdep is enabled then this
kernel function is TRACE_IRQS_ON.

[ Make sure the move to %gs retains its exception label - jeremy@...source.com ]

Signed-off-by: Ingo Molnar <mingo@...e.hu>
Signed-off-by: Jeremy Fitzhardinge <jeremy@...source.com>

---
 arch/i386/kernel/entry.S |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -r cead1b87fd17 arch/i386/kernel/entry.S
--- a/arch/i386/kernel/entry.S	Sun Sep 10 16:28:43 2006 -0700
+++ b/arch/i386/kernel/entry.S	Mon Sep 11 14:22:36 2006 -0700
@@ -326,11 +326,11 @@ 1:	movl (%ebp),%ebp
 	testw $_TIF_ALLWORK_MASK, %cx
 	jne syscall_exit_work
 /* if something modifies registers it must also disable sysexit */
-1:	mov  PT_GS(%esp), %gs
 	movl PT_EIP(%esp), %edx
 	movl PT_OLDESP(%esp), %ecx
+	TRACE_IRQS_ON
+1:	mov  PT_GS(%esp), %gs
 	xorl %ebp,%ebp
-	TRACE_IRQS_ON
 	ENABLE_INTERRUPTS_SYSEXIT
 	CFI_ENDPROC
 .pushsection .fixup,"ax";	\


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ