From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10281 invoked from network); 20 Oct 2021 18:18:53 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2021 18:18:53 -0000 Received: (qmail 31973 invoked by uid 550); 20 Oct 2021 18:18:51 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 31941 invoked from network); 20 Oct 2021 18:18:49 -0000 Date: Wed, 20 Oct 2021 14:18:36 -0400 From: Rich Felker To: enh Cc: musl@lists.openwall.com Message-ID: <20211020181836.GP7074@brightrain.aerifal.cx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] preadv2/pwritev2 On Tue, Oct 19, 2021 at 07:24:26PM -0700, enh wrote: > i've recently added preadv2(2) and pwritev2(2) wrappers to bionic, since we > had our first real prospective user come along, and they're mildly annoying > to use via syscall(3). unfortunately, this particular user also wants to be > able to compile for the host, and our glibc is years out of date, and our > current plan is to move to musl for the host[1]. > > anyway ... musl doesn't have preadv2/pwritev2. i couldn't see any > discussion on the mailing list, so i thought i'd ask whether this is just > because no-one's got round to it yet, or there's some policy[2] i'm not > aware of, or what? happy to send a patch if it's just a case of "we haven't > got round to/had a need for it yet". > > ____ > 1. TL;DR: being able to statically link without worrying about licensing is > very enticing, and gets us out of a lot of the compatibility issues we have > that made our last glibc update more trouble than it was worth, and means i > have no intention of getting us embroiled in another glibc update. > 2. i've been maintaining bionic for years now, and don't think i've written > down our policy explicitly. this was definitely a borderline case from the > "number of users" perspective, but for me the "annoying to use with > syscall(2)" tipped me over the edge into adding them. amusingly [or not, > depending on how you feel about "bugs you get away with"], it also made me > realize that our pread/pwrite implementations for LP64 were wrong in that > they weren't zeroing the unused half of the register pair. so that was a > bonus :-) There is high level policy for decision-making process for inclusion/exclusion. For new sycalls that are "safe" to use directly via syscall() it's not terribly urgent to take any action, but some like these would benefit from being cancellation points, which makes them somewhat compelling. If we do add them, I want to make sure we don't conflict with glibc's way of exposing them to applications (if they have one yet) -- things like the function signatures and how the flags are exposed. None of this looks hard to get right though. So I think it should be pretty straightforward to add these. Rich