Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4654994imu; Mon, 12 Nov 2018 14:53:31 -0800 (PST) X-Google-Smtp-Source: AJdET5c82JgFc8Ns7V4/Kjta7WbkM3kidfYZGYX+X/vtCeTEshEjHQ4yvVY/HBfDxlxH5iB++xNM X-Received: by 2002:a63:9749:: with SMTP id d9mr2413874pgo.415.1542063211043; Mon, 12 Nov 2018 14:53:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542063211; cv=none; d=google.com; s=arc-20160816; b=VNFiL056m8P5KlKEv7JsXtSs5eWxqMvavWgYcgC7IdMUpP5eDcSCu+PKGIV8e1fAT0 TsOyUTVF+Q1THiJaDWai0t2VGTTugZbhimXf1lQUAmHdsac/NgqlHBym+UJlOMAY3VpG UL5Xe6IS/h5cZ7GNLHDkiJh4MtFAJIoxbk4w+DMIwFQ7Pn7oU/xeXT1ZQmQTn9YIM+JU aZEzwjujVcrXmrbQOvdCsz4CkZIHeJTIgwOzmCLjYXeFZ6zkFpRaILizUCn5Q+i1fV30 JyqTtI0oheECVIGcpuuolxLDhS7srP/hhMqKk2yUnipEHmFHAgmyYuq5pV8++6EisTMQ JTFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=aun5zgX/H3buX1qbSs0OIyAaFZlQleNoCV1ENzfSgu0=; b=e5unA2QC1lZmJ9nyz4qaHyeE7ihLQQrhnCoIJtonI7yxmblTCdUliIdx05YYLL8lfo T2c0keTVYfqWTxMlIrkoNtz94Dsa1f9yH03+AMwti7qi31StS5xuc3bdvQssnww5LLPD N3zubbtG8KrVaH9E5zCQ8KfyUk1uRKqz4apq+eb9wg206zQ5r0oEBBnr/2HGQ178k6za 0p2LqUHmTGtdGwAQMFsEfsB4tebH7uqXGTyImdyZQhfYhrWgkWkIib+LJDFo9Cl/G8Nj TSZMez1UdpJa80sXlbuKlqYeMWrh7c1a23drQ7yMS7iMcJ8VlWB99GF9ALd4qiJJSZv3 pOgw== 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 x6-v6si19305244plo.164.2018.11.12.14.53.15; Mon, 12 Nov 2018 14:53:31 -0800 (PST) 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 S1729324AbeKMIqZ (ORCPT + 99 others); Tue, 13 Nov 2018 03:46:25 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:52692 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbeKMIqY (ORCPT ); Tue, 13 Nov 2018 03:46:24 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-03.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gML2y-0006bm-GV from joseph_myers@mentor.com ; Mon, 12 Nov 2018 14:51:08 -0800 Received: from digraph.polyomino.org.uk (137.202.0.90) by SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 12 Nov 2018 22:51:04 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1gML2t-00058c-R6; Mon, 12 Nov 2018 22:51:03 +0000 Date: Mon, 12 Nov 2018 22:51:03 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Daniel Colascione CC: Florian Weimer , Zack Weinberg , "Michael Kerrisk (man-pages)" , Linux Kernel Mailing List , Joel Fernandes , Linux API , Willy Tarreau , Vlastimil Babka , Carlos O'Donell , GNU C Library Subject: Re: Official Linux system wrapper library? In-Reply-To: Message-ID: References: <877ehjx447.fsf@oldenburg.str.redhat.com> <875zx2vhpd.fsf@oldenburg.str.redhat.com> <87lg5ym7qi.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Nov 2018, Daniel Colascione wrote: > The two features *are* unrelated. The design I've proposed works > equally well for synchronous and asynchronous signals, and limiting it Whatever the design, I see no obvious reason why a kernel-provided library, with all the problems that entails, should need to be involved, rather than putting new APIs either in libc or in a completely separate libsignal for libraries wanting to use such a system for cooperative signal use. (I can imagine *other* parts of the toolchain being involved, if e.g. you want to have a good way of checking "is the address of the instruction causing this signal in this library?" that works with static as well as dynamic linking - for dynamic linking, I expect something could be done using libc_nonshared and __dso_handle to identify code in the library calling some registering function. And indeed there might also be new kernel interfaces that help improve signal handling.) In the absence of consensus for adding such a new API for signals to glibc, it's unlikely one would get consensus for glibc to depend on some other library providing such an API either. But you can always write a library (which I think would most naturally be a completely separate libsignal, not part of the kernel source tree) and seek to persuade libraries they should be using it rather than interfering with global state by registering normal signal handlers directly. -- Joseph S. Myers joseph@codesourcery.com