From owner-freebsd-arch@freebsd.org Thu May 14 19:54:18 2020 Return-Path: Delivered-To: freebsd-arch@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 6599B2DCE57 for ; Thu, 14 May 2020 19:54:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 49NMgX4k0tz3KjG; Thu, 14 May 2020 19:54:16 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id ZJvpjIishng7KZJvqjah99; Thu, 14 May 2020 13:54:14 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=sTwFKg_x9MkA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=5GkhZBjUJW5Hvhm9WlMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id D322615C; Thu, 14 May 2020 12:54:12 -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 04EJsCma036250; Thu, 14 May 2020 12:54:12 -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 04EJsCtH036247; Thu, 14 May 2020 12:54:12 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202005141954.04EJsCtH036247@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: "freebsd-arch@freebsd.org" Subject: Re: [HEADSUP] Disallowing read() of a directory fd In-reply-to: References: Comments: In-reply-to Kyle Evans message dated "Thu, 14 May 2020 13:26:46 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 14 May 2020 12:54:12 -0700 X-CMAE-Envelope: MS4wfK4DnFEuF5TGkeGJUXtlXa4TeQ8KMHzd5ovVcGB5ES+5BKLw4pNxXWzbQxbaY0fUm6TwwcDiphx9BTN8q9Y4bbU8/C9Y0aY1DGLUEfNN/jv7nXZocYwq ZcZw7yXdeokUVKFRr81yDewbgvKd8Q+/QezYZCWwUuWmF6AFK7H+8MfRpcV/rRHJUDSEgRCGFjDPXSmJIPSqADoJh0OQVzW+CGU= X-Rspamd-Queue-Id: 49NMgX4k0tz3KjG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.12) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.25 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RWL_MAILSPIKE_GOOD(0.00)[12.134.59.64.rep.mailspike.net : 127.0.0.18]; REPLYTO_EQ_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; IP_SCORE(-2.55)[ip: (-6.77), ipnet: 64.59.128.0/20(-3.30), asn: 6327(-2.58), country: CA(-0.09)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[12.134.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2020 19:54:18 -0000 In message , Kyle Evans writes: > Hi, > > This is a heads up, given that I'm completely flipping our historical > behavior- I intend to commit this review in a couple days' time > without substantial objection: https://reviews.freebsd.org/D24596 > > With this, FreeBSD 13 will not allow read() of a directory fd, which > could have previously returned some data from the underlying > filesystem in no particular standardized format. > > This is a still-standards-compliant switch from one > implementation-defined behavior to another that's already been adopted > in various other popular kernels, to include OpenBSD, MacOS, and > Linux. > > Worth noting is that there's not really one largely-compelling reasons > to switch this after so many years (unless you find yourself that > irate when you accidentally `cat` a directory), but there are some > benefits which are briefly discussed in the commentary around the > review along with the history of the current behavior. > > This change also simplifies filesystem implementations to some extent. OpenBSD has done this for a while and more importantly Linux. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few.