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:	Thu, 13 Aug 2015 09:19:20 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Stas Sergeev <stsp@...t.ru>,
	Linux kernel <linux-kernel@...r.kernel.org>
Subject: Re: [regression] x86/signal/64: Fix SS handling for signals delivered
 to 64-bit programs breaks dosemu

On Thu, Aug 13, 2015 at 8:43 AM, Andy Lutomirski <luto@...capital.net> wrote:
>
> I'm trying to fix it without reverting.  If that doesn't work, then we
> revert.  Yesterday, I thought I had a reasonably clean fix, but it
> turned out that it only solved half of the problem.

The thing is, I actually think that the current situation is crazy.

Especially given that we don't restore any of the other segment
registers on x86-64 (except CS, of course)

So how about this "alternate" minimal patch instead. The difference is:

 - we actually leave the

        regs->ss = __USER_DS;

   in __setup_rt_frame, to guarantee that when we take a signal, we do
take it with a valid SS

 - but it removes all the other games with SS (and treats it exactly
the same as FS/GS).

   So now we don't play games with the actual sigcontext, and
hopefully dosemu is happier.

Hmm? That actually makes the code look better, and doesn't
re-introduce that annoying CONFIG_X86_32 case (because it now does it
in obviously the same place as fs/gs).

So the code is cleaner, and closer to what we used to do.

Stas, can you test this one too? I, like Luto, don't actually have a
dosemu test-case.

                      Linus

View attachment "patch-really-minimal.diff" of type "text/plain" (2152 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ