From owner-svn-src-all@freebsd.org Sun Apr 12 22:09:13 2020 Return-Path: Delivered-To: svn-src-all@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 804E32AB5E9; Sun, 12 Apr 2020 22:09:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 490mB10fjYz3Gwf; Sun, 12 Apr 2020 22:09:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Nkmrjo9iDng7KNkmsjc4Zv; Sun, 12 Apr 2020 16:09:11 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=cl8xLZFz6L8A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VmPQcETcNkFVR-xbPWoA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 4008928B; Sun, 12 Apr 2020 15:09:08 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 03CM97Y1097285; Sun, 12 Apr 2020 15:09:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 03CM971W097282; Sun, 12 Apr 2020 15:09:07 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202004122209.03CM971W097282@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kyle Evans cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r359836 - in head: include lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys tests/sys/file In-reply-to: <202004122123.03CLNK82073001@repo.freebsd.org> References: <202004122123.03CLNK82073001@repo.freebsd.org> Comments: In-reply-to Kyle Evans message dated "Sun, 12 Apr 2020 21:23:20 -0000." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 12 Apr 2020 15:09:07 -0700 X-CMAE-Envelope: MS4wfCkYv5CzsT69FZ8/2RQvWfbjz3FF+53pg5ZtCyeaahz4mVFPc25h8u7RlzZhVX/9J1iGPmCoPnkGeX8TlxMAmk+sjrsEeJeUJuowRgG18YKlJNKkW4Qq qcgkAUThKWuQMp+JEK5/dInvuB26BtLIKg0fn2+IbxCkJSwHpBiGmOs2K1OijoWmXkPQG1TlA7A6YfN8mPml2Fd0YnMWCZ6WTQ3gp7r+g58rd8XVX7fLC3Zp rzEAHT2yV3n5FUX1eLgp7Q1+h0aM2SfxCp46u7EEg2eAs919pA2Rsk2PQeEfF3Lv X-Rspamd-Queue-Id: 490mB10fjYz3Gwf X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Apr 2020 22:09:13 -0000 In message <202004122123.03CLNK82073001@repo.freebsd.org>, Kyle Evans writes: > Author: kevans > Date: Sun Apr 12 21:23:19 2020 > New Revision: 359836 > URL: https://svnweb.freebsd.org/changeset/base/359836 > > Log: > Implement a close_range(2) syscall > > close_range(min, max, flags) allows for a range of descriptors to be > closed. The Python folk have indicated that they would much prefer this > interface to closefrom(2), as the case may be that they/someone have specia > l > fds dup'd to higher in the range and they can't necessarily closefrom(min) > because they don't want to hit the upper range, but relocating them to lowe > r > isn't necessarily feasible. > > sys_closefrom has been rewritten to use kern_close_range() using ~0U to > indicate closing to the end of the range. This was chosen rather than > requiring callers of kern_close_range() to hold FILEDESC_SLOCK across the > call to kern_close_range for simplicity. > > The flags argument of close_range(2) is currently unused, so any flags set > is currently EINVAL. It was added to the interface in Linux so that future > flags could be added for, e.g., "halt on first error" and things of this > nature. > > This patch is based on a syscall of the same design that is expected to be > merged into Linux. > > Reviewed by: kib, markj, vangyzen (all slightly earlier revisions) > Differential Revision: https://reviews.freebsd.org/D21627 > > Modified: > head/include/unistd.h > head/lib/libc/sys/Makefile.inc > head/lib/libc/sys/Symbol.map > head/lib/libc/sys/closefrom.2 > head/sys/compat/freebsd32/syscalls.master > head/sys/kern/capabilities.conf > head/sys/kern/kern_descrip.c > head/sys/kern/syscalls.master > head/sys/sys/syscallsubr.h > head/tests/sys/file/closefrom_test.c A __FreeBSD_version bump should be for ports to test for. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.