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: <CALCETrUqeUJT7xGy0TERVjJUAZUCXJGdgaDWv-f5+vkkArP8ig@mail.gmail.com>
Date:	Sat, 12 Jul 2014 01:39:01 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	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 Jul 11, 2014 7:21 PM, "Linus Torvalds" <torvalds@...ux-foundation.org> wrote:
>
> On Fri, Jul 11, 2014 at 9:29 AM, Andy Lutomirski <luto@...capital.net> wrote:
> > As far as I can tell, these fields have been set to zero on save and
> > ignored on restore since Linux was imported into git.  Rename them
> > '__pad1' and '__pad2' to avoid confusion and to allow them to be
> > recycled some day.
>
> Shouldn't we actually try to save/restore gs/fs properly? Admittedly,
> changing them in the signal handler would be insane, but still.. See
> our context switching code  with the whole segment selector vs base
> save/restore code. Hmm?

This seems like it's asking for trouble.  I think wxe'd have to
separately save the selectors and the base registers to avoid breaking
something, especially once wrgsbase, etc are enabled.

Why would this be needed anyway?

Does anyone implement makecontext, etc using raise/sigreturn?  If so,
they might be in for a surprise when their gs starts getting saved,
too.

Linus, for context, the other patch in this series saves and restores
SS.  Without that, 64-bit sigreturn to a nondefault stack segment is
basically impossible.  But I don't see why any other segments (besides
CS) are needed for 64-bit sigreturn.

--Andy

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