From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80C00C64E7D for ; Tue, 17 Nov 2020 19:45:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 391D52222E for ; Tue, 17 Nov 2020 19:45:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730788AbgKQTp0 (ORCPT ); Tue, 17 Nov 2020 14:45:26 -0500 Received: from albireo.enyo.de ([37.24.231.21]:49990 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730548AbgKQTpX (ORCPT ); Tue, 17 Nov 2020 14:45:23 -0500 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1kf6uj-0003DJ-At; Tue, 17 Nov 2020 19:45:17 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1kf6uj-0004gR-70; Tue, 17 Nov 2020 20:45:17 +0100 From: Florian Weimer To: Mathieu Desnoyers Cc: Peter Oskolkov , Segher Boessenkool , Andy Lutomirski , linux-api , Peter Zijlstra , linux-toolchains@vger.kernel.org Subject: Re: Is adding an argument to an existing syscall okay? References: <87k0uj6h03.fsf@mid.deneb.enyo.de> <20201117183652.GD2672@gate.crashing.org> <87r1or4yct.fsf@mid.deneb.enyo.de> <1828724974.48168.1605640886598.JavaMail.zimbra@efficios.com> Date: Tue, 17 Nov 2020 20:45:17 +0100 In-Reply-To: <1828724974.48168.1605640886598.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Tue, 17 Nov 2020 14:21:26 -0500 (EST)") Message-ID: <87ima34vjm.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org * Mathieu Desnoyers: > In some sense, it's a good thing that there isn't such wrapper exposed > yet. It also makes me wonder whether exposing system calls directly as a > library ABI is a good thing. It appears that library ABIs have stronger > restrictions with respect to number and types of parameters than system > calls. The generic syscall wrapper function cannot be used to call all system calls on several architectures (e.g., if the kernel ABI has long as 64 bits, userspace has 32 bits, and the syscall function is *required* to return a long value, not long long). It may also be difficult to get the argument promotion correctly. _time64-only architectures have source code impact even if time is not actually used in the call. And so on. A wrapper-less approach is possible, I think, even with C. But I do not think that userspace source code portability without wrappers has been a concern for system call design so far. It's a very constrained space already, so I'm not sure if it's a good idea to add further rules.