From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbbCTMEZ (ORCPT ); Fri, 20 Mar 2015 08:04:25 -0400 Received: from mail-lb0-f176.google.com ([209.85.217.176]:35584 "EHLO mail-lb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbbCTMEV (ORCPT ); Fri, 20 Mar 2015 08:04:21 -0400 Date: Fri, 20 Mar 2015 15:04:19 +0300 From: Cyrill Gorcunov To: Denys Vlasenko Cc: Andy Lutomirski , Pavel Emelyanov , Oleg Nesterov , 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: <20150320120419.GS27066@moon> References: <20150318183133.GB1832@redhat.com> <20150318185027.GB17491@moon> <20150318200247.GA6355@redhat.com> <5509EF82.60900@parallels.com> <20150319073512.GA27066@moon> <20150320115622.GR27066@moon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150320115622.GR27066@moon> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 - just don't forget > > to document it in a good comment: why we have special > > case? What software required it? > > In which version of that software the need to have this hack > > was eliminated? > > To be fair, such special case would be ideal for us, so that > if noone object against such hack, i would cook a patch. Denys, note though that Andy pointed a downside for such approach as well: | 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.