Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754869AbbHNKCa (ORCPT ); Fri, 14 Aug 2015 06:02:30 -0400 Received: from relay.parallels.com ([195.214.232.42]:49343 "EHLO relay.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754091AbbHNKC1 (ORCPT ); Fri, 14 Aug 2015 06:02:27 -0400 Message-ID: <55CDBCA6.20000@parallels.com> Date: Fri, 14 Aug 2015 13:02:14 +0300 From: Pavel Emelyanov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Cyrill Gorcunov CC: Linus Torvalds , Andy Lutomirski , Stas Sergeev , Linux kernel Subject: Re: [regression] x86/signal/64: Fix SS handling for signals delivered to 64-bit programs breaks dosemu References: <55CA90B4.2010205@list.ru> <55CCD921.4040301@list.ru> <20150813200823.GS2059@uranus> <20150814072205.GA2129@uranus> In-Reply-To: <20150814072205.GA2129@uranus> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: US-EXCH.sw.swsoft.com (10.255.249.47) To MSK-EXCH1.sw.swsoft.com (10.67.48.55) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2376 Lines: 58 On 08/14/2015 10:22 AM, Cyrill Gorcunov wrote: > On Thu, Aug 13, 2015 at 01:09:47PM -0700, Linus Torvalds wrote: >> On Thu, Aug 13, 2015 at 1:08 PM, Cyrill Gorcunov 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 > | 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. We did. Kernel 3.11 is still declared as supported (modulo new stuff we added after 1.0 might not work, but basic sigframe mgmt is not one of those "new" things). > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/