|
Message-ID: <20230901150612.GA4163@brightrain.aerifal.cx> Date: Fri, 1 Sep 2023 11:06:12 -0400 From: Rich Felker <dalias@...c.org> To: Natanael Copa <ncopa@...inelinux.org> Cc: musl@...ts.openwall.com Subject: Re: [PATCH] add close_range() syscall wrapper On Fri, Sep 01, 2023 at 04:55:53PM +0200, Natanael Copa wrote: > On Fri, 1 Sep 2023 09:57:34 -0400 > Rich Felker <dalias@...c.org> wrote: > > > > > +int close_range(unsigned int first, unsigned int last, int flags) > > > +{ > > > + return __syscall_ret(syscall(SYS_close_range, first, last, flags)); > > > +} > > > -- > > > 2.42.0 > > > > This is double-processing errno. You need either return > > __syscall_ret(__syscall(...)) (note the second __) or just return > > syscall(...) (the syscall macro without __ automatically does the > > __syscall_ret). > > Ah, ok, I'll send a v2 patch. > > > Aside from that, I think there's a question whether, if we support > > this as a function rather than leaving it to the application to use > > the syscall, we should provide a fallback for ENOSYS. I'm not sure, > > but it's something that should be considered before adding it. > > It was mentioned earlier that CPython expects close_range() to > async-safe, and that glibc does not provide fallback. I would prefer > that musl does not provide fallback. > > https://www.openwall.com/lists/musl/2022/08/18/4 If musl were to provide a fallback it would be AS-safe. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.