From owner-freebsd-arch@freebsd.org Fri May 15 01:13:25 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 8DA5A2E6140 for ; Fri, 15 May 2020 01:13:25 +0000 (UTC) (envelope-from arne@Steinkamm.COM) Received: from mail.steinkamm.com (mail.steinkamm.com [194.127.175.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "steinkamm.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49NVlm5HJrz4BM4; Fri, 15 May 2020 01:13:24 +0000 (UTC) (envelope-from arne@Steinkamm.COM) Received: from trajan.stk.cx (trajan.stk.cx [10.8.8.110]) by basis.steinkamm.com (8.15.2/8.15.2) with ESMTPS id 04F1DG8W005208 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 15 May 2020 03:13:16 +0200 (CEST) (envelope-from arne@steinkamm.com) Received: from trajan.stk.cx (localhost [127.0.0.1]) by trajan.stk.cx (8.15.2/8.15.2) with ESMTPS id 04F1D4WP072525 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 May 2020 03:13:04 +0200 (CEST) (envelope-from arne@trajan.stk.cx) Received: (from arne@localhost) by trajan.stk.cx (8.15.2/8.15.2/Submit) id 04F1CwrG072009; Fri, 15 May 2020 03:12:58 +0200 (CEST) (envelope-from arne) Date: Fri, 15 May 2020 03:12:58 +0200 From: Arne Steinkamm To: freebsd-arch@freebsd.org Cc: Alan Somers , "Julian H. Stacey" , Kyle Evans Subject: Re: [HEADSUP] Disallowing read() of a directory fd Message-ID: <20200515011258.GW82984@trajan.stk.cx> Reply-To: arne@Steinkamm.COM References: <202005142017.04EKH0aA093503@fire.js.berklix.net> <20200514203030.GT82984@trajan.stk.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200514203030.GT82984@trajan.stk.cx> User-Agent: Mutt@Trajan/1.12.1 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on basis.steinkamm.com X-Rspamd-Queue-Id: 49NVlm5HJrz4BM4 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of arne@Steinkamm.COM has no SPF policy when checking 194.127.175.194) smtp.mailfrom=arne@Steinkamm.COM X-Spamd-Result: default: False [1.85 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[arne@Steinkamm.COM]; NEURAL_HAM_MEDIUM(-0.09)[-0.094,0]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[Steinkamm.COM]; REPLYTO_DOM_EQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.02)]; NEURAL_SPAM_LONG(0.75)[0.749,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[freebsd-arch@Steinkamm.COM,arne@Steinkamm.COM]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:34646, ipnet:194.127.175.0/24, country:DE]; FROM_NEQ_ENVFROM(0.00)[freebsd-arch@Steinkamm.COM,arne@Steinkamm.COM]; RCVD_TLS_ALL(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: Fri, 15 May 2020 01:13:25 -0000 On Thu, May 14, 2020 at 02:20:45PM -0600, Alan Somers wrote: > On Thu, May 14, 2020 at 2:17 PM Julian H. Stacey wrote: > > > Kyle Evans wrote: > > > 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. > > > > > > Thanks, > > > > > > Kyle Evans > > > > There is ZERO need for a spurious change at 2 days notice after 42+ years ! > > > > "cat ." as been supported since Unix V6 1978 or earlier, > > no problem, even occasionaly useful. > > > > Really? When is that occasionally useful? I've never seen anything useful > come out of reading a directory. It's all about files in Unix... This is true since 1972. And files can be read! How many (bad programmed) shell scripts will break when directory files can't be read anymore? I have no idea. But I know for sure that there is no need to make this change. Not 1976, not 2020 nor in the future. .//. Arne -- Arne Steinkamm | Home: Mail: arnesteinkammcom