Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2724712imu; Sat, 10 Nov 2018 22:56:16 -0800 (PST) X-Google-Smtp-Source: AJdET5dXsmvXNnVnbDJvXTdODLVUx649E6OsfZd+PNDACszF7tom3ChAnn2a1l9bn3UozG6fgI0Z X-Received: by 2002:a62:7a92:: with SMTP id v140-v6mr15473483pfc.46.1541919376789; Sat, 10 Nov 2018 22:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541919376; cv=none; d=google.com; s=arc-20160816; b=blu725gcHcrvJ50RtIcZgZXfUEKeEBOBru0PZnpTcr3Rd0+lu7muHzjQNuElMpkg6G lsktUjlkOA2xtTxuxtZJottzwBNgiOcPb6b8DjBZUhJ0iBKa8i/jMpyOiLtDDXu2un3m qQ5dhVv1BtnMaTSTfYYiMfgt9YQ9HmgEdw/UodarbuYeCKqmLZC+pTfw1RFfmb7yuR4C 7UtopGBoa3ieVIPYr0AmwlQbWz0C5JapwRM9iI28tnIttM1+ElfmoxUNr10Motk8/rfT Ympu6HHK4ss6t/xq4uxTbdU0kyJJPySV6WXvkWtZ11E1EXvYDnepX8YNlknHwMgCFxJH DBKQ== 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; bh=HrxQm/tbSt1VIjLVODSUfW567jjThOILFv/yt2/HmBc=; b=f8zDX7/DpBEj7UbeNvWH9on7orCod1N4JEPQwfaMdstTNOUJ9XEoHCDogMs7h5JUxg +DbxvWH8Gm6jGE/Wz0t+guZD5LVTFrK36ILuGRNByjN6DqaTiQNIKIIzJR5pwHqVOjCh jN7HiCXZyunDVVC0rWTYYpbRCn9gSw8XxMCIOIGzgmnqCeU8tDDvQYl3xjLsda/HyQip sGESBmfAboAJ/nFU9eTvvcv8vYKSORfQAQFpGez33fAe0mNPEQ0LQ0CyoqoMSKHtiiXm l5wxVKi3Sb30DOyTa82ooz5fm7g73vs1lBdmMmFRzfnoG/oFm99w2eFNusXPhxnU0vIV iYqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KzVti6EG; 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=QUARANTINE 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 e14-v6si10910759pgb.254.2018.11.10.22.55.57; Sat, 10 Nov 2018 22:56:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KzVti6EG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727526AbeKKQnS (ORCPT + 99 others); Sun, 11 Nov 2018 11:43:18 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:37403 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727307AbeKKQnS (ORCPT ); Sun, 11 Nov 2018 11:43:18 -0500 Received: by mail-wm1-f65.google.com with SMTP id p2-v6so5295079wmc.2; Sat, 10 Nov 2018 22:55:34 -0800 (PST) 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=HrxQm/tbSt1VIjLVODSUfW567jjThOILFv/yt2/HmBc=; b=KzVti6EGn5LCEglCVQoS/baNUy/ni0Co3kFhnaQrgBMqUscIKiWEd44kg1AovZ/jqy DDvUW9dBk5hKTmbFm/Xo/jJIIhl7jMBmUuzGWcEP75Apte6c/R5DklMpLdCv0jn3P67m MexRGlMKmy765VsfTAVHlOc1j8QnXKjbLM3q3ZgzO87CbJCN1RmrD/MicxX+TLIHXe/i f/tzVipRMZLBkuEwYPSG26rlcoiyWn047iNZLl7X+Xttrh6JUdb77Zr80RSH3VlOKhth x+Vat4BqxlilMgzU53A6x4k5Uu5NvApF2emqxAcELQ7+q+MYU2fU13KVPdqQX8unTPBG mXXA== 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=HrxQm/tbSt1VIjLVODSUfW567jjThOILFv/yt2/HmBc=; b=UlMtpHPUw5bkGX8OAUVpiQHS5axC6WE5ensL+CU4wawdAuJl6qpEnB6gRO1DKSPj2D ZrElX3NPhoyibE51EpduTTqkTsROkfyb9uZH/d2dzAHJ9OcN6zrkn/vbucVEQbhJ6Omk HjciHStt7sCKCnlsgXiSygPqNbtLPbKLCHMDjAo/NnVTSeq/x079WuK02OIiFdN53l3y SGN9hVinlrvRtQDPIWgMhVnEZwBQGVIwyfXJdKkN9JBGNu8x1srwWtp/nsXJ0IAmp/QZ +HDzgFFQMVtrcYvHb9Y0I12dsPzShLbWaim1r+hF7nFZFjRhyuXxCtchoP94Ewf2GWu+ KluQ== X-Gm-Message-State: AGRZ1gIXd89nXAGTAqdeNbqS/YGyhnszyVpycj64vkecktxAhwVCbORq dGzqcr2M7iKS1RWP7tYDdPLSssx/ X-Received: by 2002:a7b:c84f:: with SMTP id c15-v6mr3423622wml.79.1541919333930; Sat, 10 Nov 2018 22:55:33 -0800 (PST) Received: from ?IPv6:2001:a61:245e:bd00:7c53:ba1a:108c:14a2? ([2001:a61:245e:bd00:7c53:ba1a:108c:14a2]) by smtp.gmail.com with ESMTPSA id 137-v6sm8773312wmo.43.2018.11.10.22.55.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Nov 2018 22:55:32 -0800 (PST) Cc: mtk.manpages@gmail.com, Joel Fernandes , Linux API , Willy Tarreau , Vlastimil Babka , Florian Weimer , Carlos O'Donell , "libc-alpha@sourceware.org" Subject: Re: Official Linux system wrapper library? To: Daniel Colascione , linux-kernel References: From: "Michael Kerrisk (man-pages)" Message-ID: Date: Sun, 11 Nov 2018 07:55:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [adding in glibc folk for comment] On 11/10/18 7:52 PM, Daniel Colascione wrote: > Now that glibc is basically not adding any new system call wrappers, > how about publishing an "official" system call glue library as part of > the kernel distribution, along with the uapi headers? I don't think > it's reasonable to expect people to keep using syscall(__NR_XXX) for > all new functionality, especially as the system grows increasingly > sophisticated capabilities (like the new mount API, and hopefully the > new process API) outside the strictures of the POSIX process. As a quick glance at the glibc NEWS file shows, the above is not quite true: [[ Version 2.28 * The renameat2 function has been added... * The statx function has been added... Version 2.27 * Support for memory protection keys was added. The header now declares the functions pkey_alloc, pkey_free, pkey_mprotect... * The copy_file_range function was added. Version 2.26 * New wrappers for the Linux-specific system calls preadv2 and pwritev2. Version 2.25 * The getrandom [function] have been added. ]] I make that 11 system call wrappers added in the last 2 years. That said, of course, there are many system calls that lack wrappers [1], and the use of syscall() is undesirable. The glibc folk do have their reasons for being conservative around adding system calls (https://lwn.net/Articles/655028/). However, at this point, I think one of the limiting factors is developer time on the glibc project. Quite possibly, they just need some help to add more (properly designed) wrappers faster. Cheers, Michael [1] https://sourceware.org/bugzilla/show_bug.cgi?id=6399 is a longstanding example. -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/