Received: by 10.223.164.221 with SMTP id h29csp2411655wrb; Mon, 30 Oct 2017 03:37:56 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T45yXTTQNraVWvDgT74f+1QhsXsrs6nSLvOkEToyGieM5dTBwhYYhDh9Ll8NTZumghrtlG X-Received: by 10.101.81.196 with SMTP id i4mr7464065pgq.192.1509359876152; Mon, 30 Oct 2017 03:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509359876; cv=none; d=google.com; s=arc-20160816; b=aWr6CMCHzfvK8q0Alfrfzs34oKN1oN5gLVqCGmQDPrjOOvkQor9R2fNk5/V0go+xPa woUzbUXfBOOD/LPeUmMfy13dwDR2bsBD29IOf7bYdW+Z+NWOhUArbjGbcvjBYxcrqUux c/Mg2+GeqmEoGMtOqQN5OfqT1CoksP70pIW9t7rYK9++sdcOzDFNDJYc88SuyfiPoCbU TvQN53QAucEa6lyeh4syo2IoapuR5mO4cXzcxI8HaoVOfdwBkcEpX7FbGWozuok5WCcC lWeVMCVNrlXJPLWWua+3642fVBFNO4Ki7DEx5+MvMoJVOhkC8OBTuWP7mvV1yhkZjPHT X+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:reply-to:from:date :message-id:arc-authentication-results; bh=YkaxEBSQZo0P0a/aWBSUle0xAF99eCV9ARmWcQjYl4I=; b=JnqFC8eihnrT8/uYHsxLcMOlCjCNr2RMP8upAK/n5cA6pj1JXbj3Wy7pt8kHIssaOx TOT+Y4mTxWP14QVcjsGMtDFlCGu2nElGJjgSwQ1vuaKgArPk/A1IzqsyomquAFIUY1Ya Vd41zXBZ3xWTyAcEDMO/C4trBXSOQsNUzcUheM8lyLwlVXhY7zFzB+dSmOi7L/MzoOxx lBj5p/amA+Ih1tCZICaRbkRs0XaXAmz8jm476xFLf5pXjkiOisAqJFiUiIWIZ/h6++kK vAz6aF5fYN+GWSTSadeCbx2Q1Dqz/Qxz34CmIwMiSzT9Kb6hjWcOtBU/8Gipp16D9Erv Ca1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33si9170776pld.217.2017.10.30.03.37.42; Mon, 30 Oct 2017 03:37:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752257AbdJ3KVv (ORCPT + 99 others); Mon, 30 Oct 2017 06:21:51 -0400 Received: from mx02-sz.bfs.de ([194.94.69.103]:4430 "EHLO mx02-sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbdJ3KVu (ORCPT ); Mon, 30 Oct 2017 06:21:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mx02-sz.bfs.de (Postfix) with ESMTP id B9E21AB; Mon, 30 Oct 2017 11:21:48 +0100 (CET) X-Virus-Scanned: amavisd-new at bfs.de Received: from mx02-sz.bfs.de ([127.0.0.1]) by localhost (mx02-sz.bfs.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dExBghUO8n3H; Mon, 30 Oct 2017 11:21:48 +0100 (CET) Received: from mail-fr.bfs.de (mail-fr.bfs.de [10.177.18.200]) by mx02-sz.bfs.de (Postfix) with ESMTPS; Mon, 30 Oct 2017 11:21:48 +0100 (CET) Received: from [134.92.181.33] (unknown [134.92.181.33]) by mail-fr.bfs.de (Postfix) with ESMTPS id 25EA0BEE6D; Mon, 30 Oct 2017 11:21:47 +0100 (CET) Message-ID: <59F6FD39.40502@bfs.de> Date: Mon, 30 Oct 2017 11:21:45 +0100 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: "Michael Kerrisk (man-pages)" CC: Stas Sergeev , linux-man , Andy Lutomirski , Oleg Nesterov , lkml Subject: Re: Documenting sigaltstack SS_AUTODISRM References: <08467ae1-7187-3b2a-9a78-8af0c10bf816@list.ru> <3907bc2a-0645-8d93-6ee5-3f99874e7022@gmail.com> <32d95303-5839-9279-a1d3-a06f34e3484e@list.ru> <50de8f3b-8a1e-df50-b5dd-d1b74cb77fad@list.ru> <026308b5-4e92-4439-1eb2-82b67584d548@gmail.com> <3a4f9f3e-fc33-cf98-2322-27087664813f@list.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 30.10.2017 11:04, schrieb Michael Kerrisk (man-pages): > [So, things fell on the floor, a while back.] > > On 05/25/2017 11:17 AM, Stas Sergeev wrote: >> 24.05.2017 14:09, Michael Kerrisk (man-pages) пишет: >>> One could do this I suppose, but I read POSIX differently from >>> you and, more importantly, SS_ONSTACK breaks portability on >>> numerous other systems and is a no-op on Linux. So, the Linux man >>> page really should warn against its use in the strongest terms. >> So how about instead of the strongest terms towards >> the code's author, just explain that SS_ONSTACK is a >> bit-value on some/many OSes, and as such, 0 is a >> valid value to enable sas on them, plus all the other >> values would give EINVAL? >> No strongest terms will help w/o an explanation, >> because people will keep looking for something that >> suits as a missing SS_ENABLE. > > Fair enough. I've removed the statement in the manual page > about "confusion". By now the page says: > > BUGS > In the lead up to the release of the Linux 2.4 kernel, a change > was made to allow sigaltstack() to accept SS_ONSTACK in > ss.ss_flags, which results in behavior that is the same as when > ss_flags is 0 (i.e., the inclusion of SS_ONSTACK in ss.ss_flags is > a no-op). On other implementations, and according to POSIX.1, i am confused, i understand that: ss.ss_sp = malloc(SIGSTKSZ); ss.ss_size = SIGSTKSZ; ss.ss_flags = 0; if (sigaltstack(&ss, NULL) == -1) is equivalent to: ss.ss_sp = malloc(SIGSTKSZ); ss.ss_size = SIGSTKSZ; ss.ss_flags = SS_ONSTACK ; if (sigaltstack(&ss, NULL) == -1) but also to ss.ss_sp = malloc(SIGSTKSZ); ss.ss_size = SIGSTKSZ; ss.ss_flags = SS_ONSTACK | SOMETHING_FLAG ; if (sigaltstack(&ss, NULL) == -1) so the use of SS_ONSTACK would result in ss.ss_flags = 0 no matter what. OR SS_ONSTACK is a no-op in Linux re, wh > SS_ONSTACK appears only as a reported flag in old_ss.ss_flags. On > Linux, there is no need ever to specify this flag in ss.ss_flags, > and indeed doing so should be avoided on portability grounds: var‐ > ious other systems give an error if SS_ONSTACK is specified in > ss.ss_flags. > > Cheers, > > Michael > From 1583489592280562580@xxx Wed Nov 08 09:29:14 +0000 2017 X-GM-THRID: 1583489567163423320 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread