Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9554020imu; Sat, 29 Dec 2018 23:14:20 -0800 (PST) X-Google-Smtp-Source: ALg8bN51y7T76iXIB+qKCdkeG3sA3lYDdSOqkpP6YbyeYL3y+L0pQ42W4gPylLU9lbJI76/sf060 X-Received: by 2002:a62:435a:: with SMTP id q87mr33430701pfa.109.1546154060620; Sat, 29 Dec 2018 23:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546154060; cv=none; d=google.com; s=arc-20160816; b=PiJ0nlH0EQ3Ythxu13u851wBwI2rY4rxfVbw9Ev/BQl9jYG/5Np/jq0ZCbXVsp4YM6 r0e4nz5FJOmIsa3cLfNVJKYtc/8muRkzjgAsPLxhqiAULqNuaXMEja189qJzJqTTLzCR z0Xx9LFdJieSU9hzQd31FMmd2uvEnCcJVaWaBEZNYZSltvXg1b0jwmd3xYbyhKTqQy6j tu+I4iDOC7dUt+oLyvglz1k+rK17XhOCOkGQabu8TM3P7x9pirV8xn0HOMbS9DqgBt2w iIcuy9PySPhZQDPQHRMXxF1O2lo6gUyJdavQmYPTD7EPVu32EeVqpU+NfBy6PhpyleI7 6A5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=AW1pV8uu4SdKSZndZIo+Hl9SjlVBXd4jnI5OV1dvhLY=; b=sTy/m/SxgXbK2a46x61MXd/1NSp0YOVtaCz2/YVBXzjUXL7+ABotlY87/gVtG1Dmt+ Al8kkXi2CNZXRejhg2+b5U8pC405TPfD1UdKrb7ZFAFCt5eelNGRFud9ELRfDfKIyoYg A6eUYUYuRYqVhPS0A0/28t1ywq2QtZPpWQuAFFn9oI8hqWhxP0c8LyCXLERygNRq20bj Ib2X4vAUZZccjggcUkIVYR2ytr0Y2rJW6nZfzRuFIOW50e24giK6voD6TPI8DU//danc cm2OBhkMM2U5UrSZGCdzyTjlQCuZVuQT58fSWD6qHuP53F/Dq3DlFseJ74ye9L9h+UkE zMEw== 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 b89si43480641pfj.207.2018.12.29.23.13.39; Sat, 29 Dec 2018 23:14:20 -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 S1726041AbeL3HJI (ORCPT + 99 others); Sun, 30 Dec 2018 02:09:08 -0500 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:33076 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbeL3HJH (ORCPT ); Sun, 30 Dec 2018 02:09:07 -0500 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id wBU78kQI017145; Sun, 30 Dec 2018 08:08:46 +0100 Date: Sun, 30 Dec 2018 08:08:46 +0100 From: Willy Tarreau To: Joey Pabalinas , mingo@kernel.org, paulmck@linux.vnet.ibm.com, rdunlap@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] rcutorture/nolibc: add a bit of documentation to explain how to use nolibc Message-ID: <20181230070846.GA17139@1wt.eu> References: <20181229180218.15798-1-w@1wt.eu> <20181229180218.15798-4-w@1wt.eu> <20181229223324.slqx3qjrmzg5g2w2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181229223324.slqx3qjrmzg5g2w2@gmail.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 29, 2018 at 12:33:24PM -1000, Joey Pabalinas wrote: > On Sat, Dec 29, 2018 at 07:02:18PM +0100, Willy Tarreau wrote: > > + * - the lower level is the arch-specific syscall() definition, consisting in > > + * assembly code in compound expressions. These are called my_syscall0() to > > + * my_syscall6() depending on the number of arguments. The MIPS > > + * implementation is limited to 5 arguments. All input arguments are cast > > + * to a long stored in a register. These expressions always return the > > + * syscall's return value as a signed long value which is often either a > > + * pointer or the negated errno value. > > + * > > + * - the second level is mostly architecture-independent. It is made of > > + * static functions called sys_() which rely on my_syscallN() > > + * depending on the syscall definition. These functions are responsible > > + * for exposing the appropriate types for the syscall arguments (int, > > + * pointers, etc) and for setting the appropriate return type (often int). > > + * A few of them are architecture-specific because the syscalls are not all > > + * mapped exactly the same among architectures. For example, some archs do > > + * not implement select() and need pselect6() instead, so the sys_select() > > + * function will have to abstract this. > > + * > > + * - the third level is the libc call definition. It exposes the lower raw > > + * sys_() calls in a way that looks like what a libc usually does, > > + * takes care of specific input values, and of setting errno upon error. > > + * There can be minor variations compared to standard libc calls. For > > + * example the open() call always takes 3 args here. > > Shouldn't these sentences begin with a capitalized "The" for > consistency? Not sure since they're just list items. But probably as such they should end with a semi-colon and not a dot. Anyway, this is minor and likely for a later update to the file. > > /* some archs (at least aarch64) don't expose the regular syscalls anymore by > > * default, either because they have an "_at" replacement, or because there are > > * more modern alternatives. For now we'd rather still use them. > > Also here. Shouldn't this begin with a capitalized "Some"? Definitely! Same, I won't emit a patch just for this, Paul already queued it. Thanks! Willy