Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1a0341a3e3f.3a316d91560530.3385477843898623045@soss.website>
Date: Mon, 24 Aug 2026 09:08:50 -0500
From: Skye Soss <skye@...s.website>
To: "musl" <musl@...ts.openwall.com>
Subject: Re: [PATCH] add linux-specific close_range syscall wrapper



From: Szabolcs Nagy <nsz@...t70.net>
 > * Skye Soss <skye@...s.website> [2026-08-23 22:10:39 -0500]: 
 > > This patch adds the close_range syscall wrapper. 
 > > 
 > > The syscall was added in Linux 5.9. 
 > > 
 > > There was prior discussion more than 4 years ago on this addition. This patch 
 > > is slightly modified to put the CLOSE_RANGE_UNSHARE macro definition inside 
 > > the _GNU_SOURCE section, as FreeBSD defines *_CLOEXEC but not *_UNSHARE. 
 >  
 > fwiw i'd put all the flags under the same feature test macro 
 > and consider CLOSE_RANGE_ prefix reserved for that case. 
 >  
 > in glibc they are all under _GNU_SOURCE. 
 >

I'll make that change for a v2 if no one disagrees. Looking more into the history,
"BSD derived" is probably a stretch as FreeBSD and Linux were coordinating on the
design: it just so happened FreeBSD was faster.

From: Rich Felker <dalias@...c.org>
 > The cast does cause any sign extension from bit 31, if it were ever
 > used, not to extend up past bit 31 into high bits on a 64-bit arch.
 > This is probably good. 

Good point. That may be worth mentioning in the commit message body.

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.