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:	Sat, 12 Jul 2014 14:17:08 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Al Viro <viro@...iv.linux.org.uk>,
	"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [PATCH 2/2] x86_64,signal: Remove 'fs' and 'gs' from sigcontext

On Sat, Jul 12, 2014 at 11:52 AM, Andi Kleen <andi@...stfloor.org> wrote:
> On Sat, Jul 12, 2014 at 11:40:03AM -0700, H. Peter Anvin wrote:
>> Because you are doing something weird (like Pin, for example) and take an asynchronous fault?
>
> But even for pin that would need executing 16 bit code, or really weird
> 32bit code. AFAIK for 32bit the only good use case was NX emulation
> (and old virtualization) which are both completely obsolete.

Nothing particularly weird is needed.  Set a non-default stack segment
(e.g. any 16-bit ss) and take *any* fault.  This could be something
asynchronous or even a normal synchronous fault.  Return from the
signal handler: boom.

We know that people use 16-bit stack segments: it's what prompted the
whole espfix64 thing.

>
> I don't think it's worth messing with the signal handlers for 16bit
> code. If there's any problem with saving/restoring state that emulator
> can always handle it by itself.
>

How?

I can think of at least two vaguely feasible ways.  The program could
ptrace itself, trap sigreturn, and fix ss.  Or it could restore
registers itself and return using far ret or iret.  Both suck.

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