From owner-svn-src-head@freebsd.org Fri Sep 27 20:37:59 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B651E12C40B; Fri, 27 Sep 2019 20:37:59 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g3X70Pcpz4HqQ; Fri, 27 Sep 2019 20:37:58 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-ot1-x341.google.com with SMTP id s22so3392006otr.6; Fri, 27 Sep 2019 13:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OffG3ovIMvd58uspKI5SUnIVxLKpvULuNsqOLYoTOuk=; b=B2il52UGrGbk3+XjXXS5WgkfOC14zCBioXGkYz5dwBBHpbG6olTBisdvhRfqn28yEK mL0vzGeZTJqbnQ1SCOmKHoE2iQb7JEnz2o+DLqYSbbrnEiR0NEEZ0mB2OqoBDQnczbNx alJfbrE6rSsb53bAEjrxEWk8X1pEMmQD+EQDi1TdSROmGuL+S7+5nP9lCrxGthn3aLwz MRJrrxURjVHbPY/+BSFbCz1+gy6RLNBKMGrgaXPMq9M27SrU7wtZIzhm1bNYCZE+kvAn pJYKWNI1pesaG7Kg2mwlRs/wCRkXVxr+E3TawjgglyvRmVlAV4RjoHkAM2VOulvyRrgO iffA== 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=OffG3ovIMvd58uspKI5SUnIVxLKpvULuNsqOLYoTOuk=; b=MetvEk5rVn+yCzPF98tXASQ7OtF2azzM4HwGB0rfepah2oWynpNrqkVOyg2cLBzZm2 EQe/axdlm6BA3O4DpVACLjqVTa3moIGmGAdNb7R1QUys9OSC18gpwWG4S3SUd1fvyKwx ORo5sgoDUpTzYEte8xZbSOd6d0y45A+Z/dY39NcxTr/DKlpY4H8Q/zmQmshjkzf1Djab NZbLKiNhZXA0y2VkojIl5STWUVIJIVPLFJ1Ul9UCxQ3F5guoEnXclellPWlBkL6JsKMl N5PH1BDsWQxSr5OWnYORJoRH2T/FPQ9qgAAYGd4AeA9Bnqh3FeBpVYstiYYwj4n/72D7 Uz1g== X-Gm-Message-State: APjAAAUQ9NET05croBgeN/nq7N6iPfF0S2TuvIG5wnmdSzFelkWzlhV2 FN3IBfzXfstw+oYL/Jhr9wNr8LQzoUwadbX4jK0= X-Google-Smtp-Source: APXvYqzyx6juSXnuPIzFbOLe/2hFYNSLLTVjUBwEXxc0nDxIeGPHBTEDDLrPJDTsGoaIwlqDpCnv04R96WAIGlk8G9k= X-Received: by 2002:a9d:61d0:: with SMTP id h16mr4522916otk.84.1569616677449; Fri, 27 Sep 2019 13:37:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:458d:0:0:0:0:0 with HTTP; Fri, 27 Sep 2019 13:37:56 -0700 (PDT) In-Reply-To: <20190927184623.GM44691@kib.kiev.ua> References: <201909271611.x8RGBl0H036116@repo.freebsd.org> <20190927184623.GM44691@kib.kiev.ua> From: Mateusz Guzik Date: Fri, 27 Sep 2019 22:37:56 +0200 Message-ID: Subject: Re: svn commit: r352795 - head/lib/libc/sys To: Konstantin Belousov Cc: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 46g3X70Pcpz4HqQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=B2il52UG; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::341 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (3.06), ipnet: 2607:f8b0::/32(-2.59), asn: 15169(-2.17), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[1.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2019 20:37:59 -0000 On 9/27/19, Konstantin Belousov wrote: > On Fri, Sep 27, 2019 at 08:32:20PM +0200, Mateusz Guzik wrote: >> On 9/27/19, Warner Losh wrote: >> > Document varadic args as int, since you can't have short varadic args >> > (they are >> > promoted to ints). >> > >> > - `mode_t` is `uint16_t` (`sys/sys/_types.h`) >> > - `openat` takes variadic args >> > - variadic args cannot be 16-bit, and indeed the code uses int >> > - the manpage currently kinda implies the argument is 16-bit by >> > saying >> > `mode_t` >> > >> But opengroup says it is mode_t. Perhaps it is mode_t which needs >> to be changed? > > Yes, users must pass mode_t, and the man page is written for users. > Implementation needs to be aware of the implicit promotion and handle > it accordingly. > > In theory, mode_t might be wider than int. > So I think the change should be reverted. Whatever workaround is being in place in rust should remain for the current codebase. If anyone is to fixed the problem they should bump mode_t to uint32_t, to match Linux. This is ABI breakage, I don't know how that's handled. I have no interest in handling any of this, but the change committed is definitely wrong. -- Mateusz Guzik