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: <20150814072205.GA2129@uranus>
Date:	Fri, 14 Aug 2015 10:22:05 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andy Lutomirski <luto@...capital.net>
Cc:	Pavel Emelyanov <xemul@...allels.com>, 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 01:09:47PM -0700, Linus Torvalds wrote:
> On Thu, Aug 13, 2015 at 1:08 PM, Cyrill Gorcunov <gorcunov@...il.com> wrote:
> >
> > If only I'm not missin something obvious this should not hurt us.
> > But I gonna build test kernel and check to be sure tomorrow, ok?

Managed to test it. And criu works fine with the revert as expected.
Actually it's because of commit c6f2062935c8 Oleg made us a patch:

 | commit 07dcf0dbb6ff97c255bc6b06569255a9479bccdd
 | Author: Oleg Nesterov <oleg@...hat.com>
 | Date:   Thu Mar 19 19:14:00 2015 +0300
 |
 |     restore/x86: restore_gpregs() needs to initialize ->ss as well
 |
 |     Before the recent "x86_64,signal: Fix SS handling for signals delivered
 |     to 64-bit programs" kernel patch, sigreturn paths forgot to restore ->ss
 |     after return from the signal handler.
 |
 |     Now that the kernel was fixed, restore_gpregs() has to initialize ->ss
 |     too, it is no longer ignored.
 | ...
 |
 | +++ b/arch/x86/include/asm/restorer.h
 | @@ -53,7 +53,7 @@ struct rt_sigcontext {
 |         unsigned short                  cs;
 |         unsigned short                  gs;
 |         unsigned short                  fs;
 | -       unsigned short                  __pad0;
 | +       unsigned short                  ss;
 |         unsigned long                   err;
 |         unsigned long                   trapno;
 |         unsigned long                   oldmask;

IOW we've been not setting up __pad0 which became ss
inside the kernel (in result we've been passing 0 here,
which caused the problem).

fwiw, we declare that new criu versions may require new
kernels to work but never promised that new criu gonna
be compatible with old kernels. That said if something
get changed inside sigcontext structure in future
we may update criu code as well.
--
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