Received: by 10.223.164.221 with SMTP id h29csp2465933wrb; Mon, 30 Oct 2017 04:36:07 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QwcIpSX4tLAcz0HLgqbV+qhz77pvIfa9q9iGHDOpQ3XI8l6LZETRx0i4xKgvDjSkZMpcHF X-Received: by 10.84.244.136 with SMTP id h8mr7156199pll.84.1509363367435; Mon, 30 Oct 2017 04:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509363367; cv=none; d=google.com; s=arc-20160816; b=AlxGC4ufZxKuUZy07j1yvQJ6QWX+v2IraKn76cOZ9mVsft50xM0F5lH/xbdCIbZ3m0 OF0IUjq87BYcmZjLCnaHPh8/rlN3z8BNurOK3TKLJdg5jg6WEwTbm6NBSSI2HtxJhwoX NZjibEhEv7OyvwXo4bpRhwmeu/RVXMOTWLuJaqe8VyyEgLCz9Yg4Rr0HT9O3s0KPB9q6 0QR5KXM4beXKFY0w8Anf48+yaLll3kJOfzb8U1BtU21lCFH1yWqqFqbRK0OKl+875m0/ N5Tu1Iu6qfMxfHpnsA906cux1UX7Q2GaYW/UE/1KAI4yYcVECgGQcRhYu5BQjx0k8v6K HNLw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:cc:dkim-signature :arc-authentication-results; bh=S7sELi5n4yZ8ugqlLe3cYFKp1/RTR/GfT70Ci7Bze2I=; b=HNA2Tdr3VoWny/esVg8UX5BWCUhX188QFTDU9Bl8Gg0yWUKJt5z/PMJ7mjiboSEnjR Ho8q026EoPGOPcQ2JmPL3FLcHDY60MwcRVffbEGjE88NVjZTSwspqSxiUFQb7wlplsZT nBXEDttKa7XjLEGH44R5pIl5Dm0XNG8jzcWc0a6sifvCiqwCkOfVNqRHeVMInepHf6Wv GMsfdr5MKwJi+rlZcNMUuIUTfYPVCsB46CXakHBE+2CF45OYF/OBQARlV2Eo1cBxxOUw 0y1JLtoDOFPU4r05vem5waeRTmEnqcNvoLpKS1fhYM64rPeYTmyqycUv19m8bRXCQvHe skHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mU76Yt+E; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o123si9767029pga.154.2017.10.30.04.35.54; Mon, 30 Oct 2017 04:36:07 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mU76Yt+E; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932523AbdJ3KFG (ORCPT + 99 others); Mon, 30 Oct 2017 06:05:06 -0400 Received: from mail-wr0-f169.google.com ([209.85.128.169]:51919 "EHLO mail-wr0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932315AbdJ3KFE (ORCPT ); Mon, 30 Oct 2017 06:05:04 -0400 Received: by mail-wr0-f169.google.com with SMTP id j15so11918585wre.8; Mon, 30 Oct 2017 03:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=cc:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=S7sELi5n4yZ8ugqlLe3cYFKp1/RTR/GfT70Ci7Bze2I=; b=mU76Yt+EP0jiPbQ0Bpw6iAcpGvZC/6KaPDfDHzbonQof285S4naCkudDTmeLcUCh7O CEovgH2qSUyGEM+SaOlqMYfGJAAru33zC/CPKHAO3zwm5iRttNHY9nRYPnANJF0Jvo4y HdAwHlMez4LEt1m2mh+RFMSi39YjO5ALQOMVIH7ifWY2bV+EHSQhOJieMcHGex60tYaE KkTzx9P+8sY1+qlTfq/Km5tJ2e8HBF6B/jA4PaFJY+3LuHRM151c9z/grEzTTBN0Bs4v yrJUq0EJlHPmx76o/a3RDls7CfdihUfB8f9adKKoFREzIaLP4GBfzQe7EmaP5Xy4LUKA hE2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:cc:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=S7sELi5n4yZ8ugqlLe3cYFKp1/RTR/GfT70Ci7Bze2I=; b=Yal3akCe85419D0yLzSZ+/yAxQzTGz7jJuZNZLefF1cxbtiPe7K/2IHFL7/lyPwc4U pt0psIlAq59ojsk9zWIQ9CwvGGq7gzj5xPh4xYcJyyol8savhb42mv+T+21ZxC383qbp ILVPehbRYM3+5+9SdpUNupvkYTGGP0JvjyWa1chX7wLms93/LySrV9qBLhCO5aNwTMZY WHv1uRCfj+Ra8Re9fw9UxzLEuDw9l57vsfeZUc4eEJya68OkE89qbsmDWXD1buQ4zjuW j/J5i2XNYsNfkfAHKUKuNOTDCBpif1l4OL4bzacESyEDju4IXqTJ0QJQGWDHn8IL4K2p +ONw== X-Gm-Message-State: AMCzsaXpZwgMV4ZmjahLOBINIoBLq6iRb6XSB+CU7aximBAlmbYsqmso yaTsvFyiT5NgY6fvDpwG0NJ1POY8 X-Received: by 10.223.131.226 with SMTP id 89mr7408654wre.227.1509357902638; Mon, 30 Oct 2017 03:05:02 -0700 (PDT) Received: from [192.168.234.154] (mail2.jambit.com. [213.131.239.194]) by smtp.gmail.com with ESMTPSA id o197sm10850783wmg.3.2017.10.30.03.05.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Oct 2017 03:05:01 -0700 (PDT) Cc: mtk.manpages@gmail.com, linux-man , Andy Lutomirski , Oleg Nesterov , lkml Subject: Re: Documenting sigaltstack SS_AUTODISRM To: Stas Sergeev 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> From: "Michael Kerrisk (man-pages)" Message-ID: Date: Mon, 30 Oct 2017 11:04:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <3a4f9f3e-fc33-cf98-2322-27087664813f@list.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [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, 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 -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ From 1582678540934340950@xxx Mon Oct 30 10:37:55 +0000 2017 X-GM-THRID: 1582678540934340950 X-Gmail-Labels: Inbox,Category Forums