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:	Sun, 10 Jul 2011 11:26:10 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: kill handle_signal()->set_fs()

On 07/10/2011 09:44 AM, Oleg Nesterov wrote:
> handle_signal()->set_fs() has a nice comment which explains what
> set_fs() is, but it doesn't explain why it is needed and why it
> depends on CONFIG_X86_64.
> 
> Afaics, the history of this confusion is:
> 
> 	1. I guess today nobody can explain why it was needed
> 	   in arch/i386/kernel/signal.c, perhaps it was always
> 	   wrong. This predates 2.4.0 kernel.
> 
> 	2. then it was copy-and-past'ed to the new x86_64 arch.
> 
> 	3. then it was removed from i386 (but not from x86_64)
> 	   by b93b6ca3 "i386: remove unnecessary code".
> 
> 	4. then it was reintroduced under CONFIG_X86_64 when x86
> 	   unified i386 and x86_64, because the patch above didn't
> 	   touch x86_64.
> 
> Remove it. ->addr_limit should be correct. Even if it was possible
> that it is wrong, it is too late to fix it after setup_rt_frame().
> 

The main reason I could think of why this would be necessary is if we
take an event while we have fs == KERNEL_DS inside the kernel which is
then promoted to a signal.  Are you absolutely sure that can't happen?

In particular, there should be a setting upstream of this, as you're
correctly pointing out that it's too late.  If not, we might actually
have a problem.

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