Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7013192imu; Wed, 14 Nov 2018 10:16:58 -0800 (PST) X-Google-Smtp-Source: AJdET5ei/el7tTmmTc2QIL02UflrY49B7GUCJ8uehAi89D+938PQkIfES2BnNVCKFKm7ta6InCnL X-Received: by 2002:a17:902:ab81:: with SMTP id f1-v6mr2994831plr.103.1542219418162; Wed, 14 Nov 2018 10:16:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542219418; cv=none; d=google.com; s=arc-20160816; b=Mq5jFz/YnZaLZ1J7eO5FyGn8fZNrXF1zwQRSTjEC8PGSmgWKJHk4L25/rsW3ixmH03 B9JcS6q7rInaeCcKV77OfZeQiG92shpQ9pBm7o+8jCby7eneTyD4YXfeE/lKp9E5U477 VUc+2vgG5vMNKx+xE9ZlWO832u0w5v+G31mWTTFGIr0ZbrxeaSaSyOQVo9V7SMuzXaal XMwarMSD+aL85YMdcZy9GkIM6buG0sFiQWJeEXiSPdIP5PEa7varw1lRsT881cFywBzz 2gkDHEDMGG8WIkqTE5p5xIess0KD7bdGqrYLrWQGipHHtp0FNR7xL63qWllPU2mjIGjO Wnqg== 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=u6+eY9bPZYQDUZFRs10Z1LoHboMbMmAscHZks0NHNkU=; b=bO2s1LYqa2fdkFdYTSLUGnoVmk2C9uJetbQdCIQrL9ZDw3NCuunGQ3LotK69KOVPFr IPhCD7ppTGu41nHB1Tw8IUKzSk9U9n8aURscCbg+enqF/TRsrRQSvAt8Nu8d5/1P3aIf QKQiHTUHZt6SGfsEGWtb7H38Px7M9LyQuWfRRH2rf5bJt2/oi+wFPratK73zYpQ9F0O0 dB9h8is2M4HLf5JFSjDqIUless6Zb34Nmq3E5Z4fy+UH9mW9vfrPbpf0swy8H9nLr/GK 6+7bySszHWlRpQ3Fn+Ord0WdqRfRZItmF5MAmZIBPv0S3+9l0mFCcmQlJDKwXcFrQDYK eOZw== 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 o10-v6si23349240pgl.134.2018.11.14.10.16.42; Wed, 14 Nov 2018 10:16:58 -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 S2387514AbeKOETw (ORCPT + 99 others); Wed, 14 Nov 2018 23:19:52 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:52542 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732847AbeKOETw (ORCPT ); Wed, 14 Nov 2018 23:19:52 -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 1gMzhO-0002EF-7r from joseph_myers@mentor.com ; Wed, 14 Nov 2018 10:15:34 -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; Wed, 14 Nov 2018 18:15:30 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.90_1) (envelope-from ) id 1gMzhK-0005Ad-33; Wed, 14 Nov 2018 18:15:30 +0000 Date: Wed, 14 Nov 2018 18:15:30 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Daniel Colascione CC: Szabolcs Nagy , Dave P Martin , nd , Florian Weimer , "Michael Kerrisk (man-pages)" , linux-kernel , Joel Fernandes , Linux API , Willy Tarreau , Vlastimil Babka , Carlos O'Donell , "libc-alpha@sourceware.org" 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> <20181113193859.GJ3505@e103592.cambridge.arm.com> <5853c297-9d84-86e5-dede-aa2957562c6b@arm.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-04.mgc.mentorg.com (139.181.222.4) 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 Wed, 14 Nov 2018, Daniel Colascione wrote: > > there is a lot of bikesheding here by people who > > don't understand the constraints nor the use-cases. > > Conversely, there's a lot of doubt-sowing from the other side that "other side" is the wrong concept here in the first place - it's supposed to be a matter of cooperating projects trying to find good interfaces together. Any new feature from the kernel that is meant to be of use to libcs is best designed in a way involving such cooperation (with multiple libcs). I concur with Zack's assessment in that a technical fix to process / communication issues cannot work here. Any feature (e.g. syscall library) with a design coming solely from the kernel rather than a cooperative process is also likely to have an unsuitable design meaning it doesn't get used. Once we have sufficient communication to design suitable interfaces *together*, "avoiding the need to communicate" becomes irrelevant as a design criterion anyway. > After looking at the history of settid, signal multi-handler > registration, and other proposed improvements running into the brick > wall of glibc's API process, I think it's clear that requiring glibc > signoff on new kernel interfaces would simply lead to stagnation. It's That there was disagreement on some particular interface does not mean there are problems with the basic principle of working with libc maintainers (of multiple libcs, not just one!) to establish what the intended userspace C API to some new kernel interface should be, and to nail down the details of how the kernel interface is defined in the process. (And as noted elsewhere, I think the main people objecting to generally having bindings for all non-obsolescent syscalls are no longer active in glibc.) If the semantics of some proposed kernel interface, both at the syscall level and at the userspace C API level, are agreed e.g. by kernel and musl people, I'd think the API agreement from musl would be a good indication of the API also being suitable to add to glibc. It's not necessary to get agreement from every libc on every API - but there should be agreement from *some* libc that is careful about API review. If enough people with good sense about libc APIs have judged some API for a new syscall suitable, I expect other libcs can implement it even if it's not exactly the API they'd come up with themselves. (I haven't seen enough comments on libc / kernel API design from people I know to be associated with bionic, uclibc-ng, etc., to judge if they also pay similarly careful attention to working out what a good C API design for some interface should be. Note that there are musl people active on libc-alpha, which helps everyone arrive at a consensus on better C API designs.) > The right answer is a move to an approximation of the BSD model and > bring the primary interface layer in-house. I could equally say we should take the kernel in-house and develop it to better support glibc - that if the kernel doesn't provide what we want, we should add the features to GNU Linux-libre and say that's the supported kernel for use with glibc. It's an equally absurd statement in a context of multiple cooperating projects. > There's a lot of evidence that this model works. There's a lot of evidence that the model of separately maintained Linux kernel and libc works (see: the number of devices using Linux kernels with a range of different libc implementations that meet different needs). -- Joseph S. Myers joseph@codesourcery.com