Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3037244imu; Sun, 11 Nov 2018 06:24:16 -0800 (PST) X-Google-Smtp-Source: AJdET5eCd2fL2rFDg8VuTfuOs7vbONihqFaQXay2ZaFBou+dh7WmyiPUGo8X1qWhIQdIq3A+WguT X-Received: by 2002:a17:902:703:: with SMTP id 3-v6mr16526595pli.38.1541946256823; Sun, 11 Nov 2018 06:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541946256; cv=none; d=google.com; s=arc-20160816; b=i6Thz1nEglIkL3LrQ7pIX3g8xYm3v4qF7gcacJ+PKCaf9R7ESlZnPat/d9xW3VgKrI Q9RaxR1J/uQKOhzIyrTV+QXLlKLQXHVPeCbhc7Oei4awCHQnC/AEF/yMcgBfkTBv27Fe RZAJghW2gSPGvO6JI/h88XZ54FSJj50VOh51ygNzdGSTlpF8YAqjEFf2UmV/7PFuap6S M6rKf0XO4sPY/pbgWwIuXRQ5W2Tp554ZchaXAFIpFKHiYmbJ5IQ30lrhyxZgJbYz8bWP Cd2ExS0/fvd3fcFDnoP04up69fVHjgGVFZ05StSDMebzqL0TIMJYLjYm8S4rpzmSKZws Vuig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=KrysmyYMbW4M3poQmJsdob51BBK+q0cfR1H2tPSxMxk=; b=jvuSXHOuXkflAngKFzXJaeyW8r2aCoqb6cTCEH394zEygeseUxIGdlBvaJuzodvOOQ zP/1WxF/LXT6FhvLjEW76+AkWZVeRoxO/qXdSafOehIpjeU9KmLd/G0oNLmn0KkfnNpi w1g0cawvWIeNQV1XBBBkE4MIO0LcpH/OrN5KvhafgBo0zLLdewaBcTFaGn/8seSk41hA ymKPQ1VjUk92tKS5ZHnRG9V5HlVhR6UpePTVPpiAC+VM4Q3tdZJ/TvjjIZEP4W8GLiWC OHDw67F2iDER8BOLuZvDtukjItSCHbLpdW84G80KHSnz4SeY4PpXAhmrlU00h5vDdCkc nlKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UqxE64Ag; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k21-v6si13125557pgl.169.2018.11.11.06.24.01; Sun, 11 Nov 2018 06:24: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=@google.com header.s=20161025 header.b=UqxE64Ag; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728403AbeKLALn (ORCPT + 99 others); Sun, 11 Nov 2018 19:11:43 -0500 Received: from mail-vk1-f194.google.com ([209.85.221.194]:43052 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728307AbeKLALn (ORCPT ); Sun, 11 Nov 2018 19:11:43 -0500 Received: by mail-vk1-f194.google.com with SMTP id o130so1419378vke.10 for ; Sun, 11 Nov 2018 06:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KrysmyYMbW4M3poQmJsdob51BBK+q0cfR1H2tPSxMxk=; b=UqxE64AgHl9RGpmJfyjyFyVrbLvOOpKOu4FCgQHVO4MrVth8QtdzDfLH0HJ1dkFFa4 qo4DJUYReyqChLYZqzBozXTG13CJrRCqgYZzcPsQjxRPbI98ctXHg2C2m6FgYPCIfbaK D+6Lu5vs/RdqNQRIvQ5s3uCHCVJP+X0W05BM/x0tUeYVDMLhXbYwqyEw6ciWhAMTJ8zN mtEGTeXSjoeLMjEqcqHAkCnB+joyWlWqdzQx3Ul0zCb5zTZrf+2h9cJZS7qznAOoJyAh xJCp1rXqkGNXbCYMt0XdkJEoKOqZo8hqIa7o+XHM+SqVlGn9AQZpP8K7mq4CdE0rGmc5 cbtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KrysmyYMbW4M3poQmJsdob51BBK+q0cfR1H2tPSxMxk=; b=GWM9qOQ6r33lJF/uFKB4mencKntwFxSmByTOcxbPBvvWcqn6VKrJ8UzfW+YuPEJKQC pGJjsoJGLyl2Fw1y9fRpZ69uzUKG3lfNYZjmNrOaM+JRyDUFpfq94rMzwGFdGrrXEc/p FR/DiCUVHD2e9vO1NcvXYfUzHmRgBnkyXpBt731G39eQSYqQAflyvskZ2aQvXlMkc80V Rppqofu7CbJaHq6rpf5s36Rd2+E6kVfTDSIacMrd0ROejKJLrbzFoxKMThdNy5c6IXlf hoLZqei6hnIp5H7JCOMqszjw1D9mExzbp1KJg+3Pl2MZ6Ra2YvtZ1OownerCCPFScvQa lCPg== X-Gm-Message-State: AGRZ1gKIPkZ0Qhfs+sTregMRJdJtAvhnSa4foF+3YJkGi5LdEu21Ptm+ JL/thWstrFYcVg7jNQFYIUPJJ7RhiTboFmI7VMch4A== X-Received: by 2002:a1f:7cca:: with SMTP id x193mr7063563vkc.89.1541946179923; Sun, 11 Nov 2018 06:22:59 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a67:f48d:0:0:0:0:0 with HTTP; Sun, 11 Nov 2018 06:22:59 -0800 (PST) In-Reply-To: <877ehjx447.fsf@oldenburg.str.redhat.com> References: <877ehjx447.fsf@oldenburg.str.redhat.com> From: Daniel Colascione Date: Sun, 11 Nov 2018 06:22:59 -0800 Message-ID: Subject: Re: Official Linux system wrapper library? To: Florian Weimer Cc: "Michael Kerrisk (man-pages)" , linux-kernel , Joel Fernandes , Linux API , Willy Tarreau , Vlastimil Babka , "Carlos O'Donell" , "libc-alpha@sourceware.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 3:09 AM, Florian Weimer wrote: > We had a patch for the membarrier system call, but the kernel developers > could not tell us what the system call does in therms of the C/C++ > memory model [snip] > A lot of the new system calls lack clear specifications or are just > somewhat misdesigned. For example, pkey_alloc [snip] > getrandom still causes boot delays [snip] > For copy_file_range, we still have debates whether the system call (and > the glibc emulation) should preserve holes or not, [snip] These objections illustrate my point. glibc development is not the proper forum for raising post-hoc objections to system call design. Withholding wrappers will not un-ship these system calls. Applications are already using them, via syscall(2). Developers and users would be better served by providing access to the system as it is, with appropriate documentation caveats, than by holding out for some alternate and more ideal set of system calls that may or may not appear in the future. This resistance to exposing the capabilities of the system as they are, even in flawed and warty form, is what I meant by "misplaced idealism" in my previous message. If the kernel provides a system call, libc should provide a C wrapper for it, even if in the opinion of the libc maintainers, that system call is flawed. I agree with the proposals mentioned above to split system interface responsibility, having glibc handle higher-level concerns like stdio while punting system call wrappers and other low-level facilities to a kernel-provided userspace library that can move faster and more explicitly conform to the Linux kernel's userspace ABI.