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: <20100216140242.GC16448@redhat.com>
Date:	Tue, 16 Feb 2010 15:02:42 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Roland McGrath <roland@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] x86: set_personality_ia32() abuses TS_COMPAT

set_personality_ia32() sets TS_COMPAT for unknown reason.

This doesn't hurt but this is unneeded and confusing, TS_COMPAT
means we are inside the 32bit syscall.

In fact I'd say this is not right, but fortunetely do_execve() can
never return something which could confuse syscall_get_error().
And apart from do_signal() we never check TS_COMPAT during return
to user-mode.

Another reason why I think this is not right. I am not sure I fully
understand this asm, but it seems to me that system_call_fastpath
can "leak" TS_COMPAT. While probably this doesn't really matter, we
can return to user-mode with this bit set.

Signed-off-by: Oleg Nesterov <oleg@...hat.com>
---

 arch/x86/kernel/process_64.c |    3 ---
 1 file changed, 3 deletions(-)

--- exec/arch/x86/kernel/process_64.c~2_dont_set_compat	2010-02-16 13:26:34.000000000 +0100
+++ exec/arch/x86/kernel/process_64.c	2010-02-16 13:46:25.000000000 +0100
@@ -528,9 +528,6 @@ void set_personality_ia32(void)
 	/* Make sure to be in 32bit mode */
 	set_thread_flag(TIF_IA32);
 	current->personality |= force_personality32;
-
-	/* Prepare the first "return" to user space */
-	current_thread_info()->status |= TS_COMPAT;
 }
 
 unsigned long get_wchan(struct task_struct *p)

--
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