From owner-freebsd-arch@freebsd.org Fri May 15 01:43:21 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 8AE282E6D7C for ; Fri, 15 May 2020 01:43:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49NWQJ2dySz4Cd1 for ; Fri, 15 May 2020 01:43:20 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id l1so666151qtp.6 for ; Thu, 14 May 2020 18:43:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MF4LHBbQj2bV3pJegMbVXmLdgnqOH5mN6S8Lscca1GE=; b=pC08eHTA+EIIjf4ZEJVn/MoiypUC91cyxt7Lk5cbKiuxPZgoVvia6SARjntjaSLcBC mWvTfG0qIuhuhbdAdoFX+6Qc26QudJgIQCK1D6VwRImAIrB9i1lOPkU234sfkS4MjbsI 0nuj/V+iw31KHcDZYJ5d/eKevelcmgZ4Urfs2m931iJgE5dYzqqS0b05A+DnGk770JYV w/pF1gaNrWAMpX45bdWd0SJtzeGWQQbkGTaAzHozNLx0Q+mH1OTW7KrKDYRfABA8dDcp B2vkm4Id4NzH0Hq0vL0tbla3Fv2SrmQ82Ff3YySqT/q3r93cyMbmAtpbse7XUbpmkjkC 43Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MF4LHBbQj2bV3pJegMbVXmLdgnqOH5mN6S8Lscca1GE=; b=iEUqjnxP8ysO7z4mMHqTrSAf6jM4QNAinn4wz0h8auuyhZ1q3f9h3u3SPkjKPwbrs1 HeFLfqP/f2Cp1GH9+hRfig+EJwKtSBIDrq+V894dNREcwcW1vStxmUpJZQ63NjgIq5sE 5HKjLfsqtGtm15hyJby6u5GI+it8EbB4Xb64J5tfOQsCZzINYq9eZCFBe6PxsEl1JyUd B8zLh1O9xu4Yh5JRMNp7oW+qwZJcGl9HmgBl9ILBY2JzfUFRN4axuRbYkwMW887af1wG xxGyKM1gsiMuiESCLhR1DS2MkYH0o7WjQmxtdWiz3H3kIF7CEo1dr1s6BOvsyfzGkTDi 2AVw== X-Gm-Message-State: AOAM530pA1PWSqKj7hAzMWINhyzsClmOG2NWQtVKlrtiE33/MYuLOn7t WO54fWZGoo6KNdI/Jc2l0KmxW2ngQdidthCosnhJig== X-Google-Smtp-Source: ABdhPJyCqI1U64dWt9yam1+UevkAzCEB3Ts1/q2sAc6goCYjZbSAeuOQaRzbyFMSXLapc9M0ct8IA5gRN26QRn7+3wc= X-Received: by 2002:ac8:f94:: with SMTP id b20mr1141500qtk.291.1589506999207; Thu, 14 May 2020 18:43:19 -0700 (PDT) MIME-Version: 1.0 References: <202005142017.04EKH0aA093503@fire.js.berklix.net> <20200514203030.GT82984@trajan.stk.cx> <20200515011258.GW82984@trajan.stk.cx> In-Reply-To: <20200515011258.GW82984@trajan.stk.cx> From: Warner Losh Date: Thu, 14 May 2020 19:43:06 -0600 Message-ID: Subject: Re: [HEADSUP] Disallowing read() of a directory fd To: arne@steinkamm.com Cc: freebsd-arch@freebsd.org, Alan Somers , "Julian H. Stacey" , Kyle Evans X-Rspamd-Queue-Id: 49NWQJ2dySz4Cd1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=pC08eHTA; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::830) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arch@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[0.3.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.00)[ip: (-9.22), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.42), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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:43:21 -0000 On Thu, May 14, 2020, 7:14 PM Arne Steinkamm wrote: > 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 Why do you need this to work? It can disclose unwanted data... Warner .//. Arne > > -- > Arne Steinkamm | Home: Mail: arnesteinkammcom > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >