From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbbCTOJk (ORCPT ); Fri, 20 Mar 2015 10:09:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36877 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbbCTOJh (ORCPT ); Fri, 20 Mar 2015 10:09:37 -0400 Date: Fri, 20 Mar 2015 15:07:38 +0100 From: Oleg Nesterov To: Cyrill Gorcunov Cc: Denys Vlasenko , Andy Lutomirski , Pavel Emelyanov , Andrey Wagin , Andy Lutomirski , Ingo Molnar , Andi Kleen , "H. Peter Anvin" , Al Viro , X86 ML , LKML , Linus Torvalds , Borislav Petkov , Pavel Emelyanov Subject: Re: [PATCH v3 1/2] x86_64,signal: Fix SS handling for signals delivered to 64-bit programs Message-ID: <20150320140738.GA12509@redhat.com> References: <20150318185027.GB17491@moon> <20150318200247.GA6355@redhat.com> <5509EF82.60900@parallels.com> <20150319073512.GA27066@moon> <20150320115622.GR27066@moon> <20150320120419.GS27066@moon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150320120419.GS27066@moon> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I do not have a strong opinion, I leave this to you and Andy... But, On 03/20, Cyrill Gorcunov wrote: > On Fri, Mar 20, 2015 at 02:56:22PM +0300, Cyrill Gorcunov wrote: > > > > > > > > fwiw currently we're passing zero in this __pad0 (replying to your > > > > previous email, so we can workaround in the kernel assuming zero > > > > as a special case, not that good but better than nothing). > > > > > > Special-casing zero sounds not that bad to me. > > > It can be removed after a few years If we add this special case now, I am not sure we can remove it later. > > > just don't forget > > > to document it in a good comment and perhaps with WARN_ON_ONCE(). > | The only real down side I can see to special casing zero is that it > | really is possible to end up with zero in there. For example, the > | SIGSEGV you get do to the failed sigreturn probably has sigcontext->ss > | == 0 :) > > which I don't know how to resolve. Another downside (to me) is that this special case can help, but only "by accident". For example, criu has ->ss = 0, but it was not initialized explicitly. But as I said, I won't argue. Oleg.