From owner-freebsd-hackers@freebsd.org Thu May 14 20:32:33 2020 Return-Path: Delivered-To: freebsd-hackers@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 0ABCA2DEB48 for ; Thu, 14 May 2020 20:32:33 +0000 (UTC) (envelope-from arne@Steinkamm.COM) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49NNWh4TD8z3PTk for ; Thu, 14 May 2020 20:32:32 +0000 (UTC) (envelope-from arne@Steinkamm.COM) Received: by mailman.nyi.freebsd.org (Postfix) id 9971D2DEB46; Thu, 14 May 2020 20:32:32 +0000 (UTC) Delivered-To: hackers@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 992042DEB45; Thu, 14 May 2020 20:32:32 +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 49NNWh2HgKz3PTg; Thu, 14 May 2020 20:32:32 +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 04EKUiFj001065 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 14 May 2020 22:30:44 +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 04EKUZht078170 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 14 May 2020 22:30:35 +0200 (CEST) (envelope-from arne@trajan.stk.cx) Received: (from arne@localhost) by trajan.stk.cx (8.15.2/8.15.2/Submit) id 04EKUUgD077625; Thu, 14 May 2020 22:30:30 +0200 (CEST) (envelope-from arne) Date: Thu, 14 May 2020 22:30:30 +0200 From: Arne Steinkamm To: Alan Somers Cc: "Julian H. Stacey" , Kyle Evans , "freebsd-arch@freebsd.org" , "freebsd-hackers@freebsd.org" , arne@steinkamm.com Subject: Re: [HEADSUP] Disallowing read() of a directory fd Message-ID: <20200514203030.GT82984@trajan.stk.cx> Reply-To: arne@Steinkamm.COM References: <202005142017.04EKH0aA093503@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 49NNWh2HgKz3PTg X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.96 / 15.00]; NEURAL_HAM_MEDIUM(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2020 20:32:33 -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