From owner-freebsd-hackers@freebsd.org Fri May 15 17:14:11 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 B47062FAE73 for ; Fri, 15 May 2020 17:14:11 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Nw4M23s9z482p for ; Fri, 15 May 2020 17:14:10 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04FHEIr3055632 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 15 May 2020 10:14:25 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: "Rodney W. Grimes" , FreeBSD Hackers , Diane Bruce In-Reply-To: <20200515150627.GY82984@trajan.stk.cx> From: Chris Reply-To: bsd-lists@BSDforge.com To: Subject: Re: [HEADSUP] Disallowing read() of a directory fd Date: Fri, 15 May 2020 10:14:24 -0700 Message-Id: <02cb48c24a3d010dab13974680dc3d16@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49Nw4M23s9z482p X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.68 / 15.00]; NEURAL_HAM_MEDIUM(-0.69)[-0.690,0]; NEURAL_HAM_LONG(-0.99)[-0.991,0]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] 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: Fri, 15 May 2020 17:14:11 -0000 On Fri, 15 May 2020 17:06:27 +0200 arne@Steinkamm=2ECOM said > On Fri, May 15, 2020 at 10:48:15AM -0400, Diane Bruce wrote: > > All I have to say on this noisy bikeshed is, let's resurrect the mkdir > > bug of V7 because it's tradition and the BSD way and history and stuff=2E > > (I only expect a few of you to remember this one=2E) >=20 > Oh, this "bug" was alive until Sys V 3=2E2 times=2E=2E=2E >=20 > Implementing mkdir as library function without a syscall wasn't a good id= ea=2E > ken and dmr saw no reason to implement mkdir as atomic operation=2E > So it was easy, even with a shell script, to jump between the > mknod(2) and the chown(2) to replace the directory node with a symlink to > /etc/passwd=2E >=20 > This was from a todays point of view a stupid mistake=2E Reading a director= y > node > is lightyears away from "a stupid mistake"=2E >=20 > Make it switchable with a sysctl switch=2E=2E=2E would be the best of both worl= ds=2E So long as it were not read only, might be acceptable=2E But given the potent= ial gains for all this, are trivial at best=2E Why was this proposal not dropped? It's spooling up a massive buffer, for little, to no significant value=2E Move on to something of _actual_ importance -- *please*=2E --Chris >=20 > =2E//=2E Arne >=20 > --=20 > Arne Steinkamm | Home: Mail: arnesteinkammcom > Tel=2E: +49=2E89=2E21031004 | Gr=C3=B6benbachweg 13, 82178 Puchheim, GERMANY