From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbbJNQ5l (ORCPT ); Wed, 14 Oct 2015 12:57:41 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:35079 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753479AbbJNQ5j (ORCPT ); Wed, 14 Oct 2015 12:57:39 -0400 Date: Wed, 14 Oct 2015 19:57:36 +0300 From: Cyrill Gorcunov To: Andy Lutomirski Cc: Andy Lutomirski , Stas Sergeev , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , Denys Vlasenko , Linus Torvalds , Borislav Petkov , Pavel Emelyanov Subject: Re: [RFC 3/4] x86/signal/64: Re-add support for SS in the 64-bit signal context Message-ID: <20151014165736.GT2048@uranus> References: <6e14e2f7ce1c38fc1996bd4d5d3d9dc70b8bd94d.1444697927.git.luto@kernel.org> <20151014164021.GS2048@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 14, 2015 at 09:42:58AM -0700, Andy Lutomirski wrote: > > That's the intent. > > If you write __pad = 0, don't set UC_STRICT_RESTORE_SS, and leave cs > set to a 64-bit value, then the kernel will detect that 0 is not a > valid SS and will fix it for you. > > If you do write UC_STRICT_RESTORE_SS (e.g. if you saved on a new > kernel and you restore the saved uc_flags), then you'll get a new > signal delivered. Yeah, I just wanna be sure I understood the patch correctly. Thanks! > If you're restoring a 32-bit or 16-bit context, then none of the above > applies, but I doubt that CRIU supports that anyway. True. I didn't implemented compat mode for criu yet, it's in todo.