From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbcAGPfc (ORCPT ); Thu, 7 Jan 2016 10:35:32 -0500 Received: from fallback1.mail.ru ([94.100.181.184]:44957 "EHLO fallback1.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbcAGPfb (ORCPT ); Thu, 7 Jan 2016 10:35:31 -0500 Subject: Re: sigaltstack breaks swapcontext() To: Andy Lutomirski References: <568D36A1.1030706@list.ru> <568D5FFE.3040000@list.ru> <568D6B81.2040704@list.ru> Cc: Linux kernel From: Stas Sergeev Message-ID: <568E8540.1060609@list.ru> Date: Thu, 7 Jan 2016 18:33:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 06.01.2016 22:53, Andy Lutomirski пишет: > On Wed, Jan 6, 2016 at 11:31 AM, Stas Sergeev wrote: >> Exactly. >> Do you think this can be ignored? >> A man page should then be corrected with EPERM and the >> above note removed, right? >> > I think it can be ignored. I'd go the SS_FORCE route, though, to > maintain POSIX compliance. I think such a flag would be a wrong thing to do. Allowing only SS_DISABLE (without any new flags) keeps you still "compatible with posix", and anything beyond SS_DISABLE in a sighandler is not needed. So I think we only have the following options: 1. Remove the check and forget (if anything, glibc can add the EPERM check to stay compatible with crap). 2. Allow only SS_DISABLE. This will mean a large patch, touching all arches, but the bonus is the compatibility with posix, that no one needs in this particular case.