From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760648AbcBYMOw (ORCPT ); Thu, 25 Feb 2016 07:14:52 -0500 Received: from smtp50.i.mail.ru ([94.100.177.110]:33320 "EHLO smtp50.i.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760404AbcBYMOu (ORCPT ); Thu, 25 Feb 2016 07:14:50 -0500 Subject: Re: [PATCH] [Cleanup] x86: signal: unify the sigaltstack check with other arches To: Ingo Molnar References: <1456095685-23857-1-git-send-email-stsp@list.ru> <20160225082524.GA12294@gmail.com> Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Borislav Petkov , Brian Gerst , Oleg Nesterov , Richard Weinberger , Stas Sergeev From: Stas Sergeev Message-ID: <56CEF02C.7050906@list.ru> Date: Thu, 25 Feb 2016 15:14:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160225082524.GA12294@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 25.02.2016 11:25, Ingo Molnar пишет: > > * Stas Sergeev wrote: > >> Currently x86's get_sigframe() checks for "current->sas_ss_size" >> to determine whether there is a need to switch to sigaltstack. >> The common practice used by all other arches is to check for >> sas_ss_flags(sp) == 0 >> >> This patch makes the code consistent with other arches. >> The slight complexity of the patch is added by the optimization on >> !sigstack check that was requested by Andy Lutomirski: sas_ss_flags(sp)==0 >> already implies that we are not on a sigstack, so the code is shuffled >> to avoid the duplicate checking. > > So this changelog is missing an analysis about what effect this change will have > on applications. Can any type of user-space code see a change in behavior? If yes, > what will happen and is that effect desirable? This is a clean-up, and as such, there is no visible effect. If there is - it is a bug. The purpose of this patch is only to unify the x86 code with what all the other arches do. It was initially the part of the rejected series, but now it is just a clean-up.