From owner-freebsd-arch@freebsd.org Fri May 15 22:00:00 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 CB9BE2DB293; Fri, 15 May 2020 22:00:00 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 49P2Q73RFVz4WSM; Fri, 15 May 2020 21:59:59 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f179.google.com with SMTP id d191so3562317oib.12; Fri, 15 May 2020 14:59:59 -0700 (PDT) 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=Sb8oJ7xDyF38Y28ZipIiwHUTLj2w6/8R0/6W1llCvug=; b=Iawj8VeeJRuwpPHyUTg5MsxsA75+YHboRuH6nX6GWofdBdA2p3BZg1ntCGxs+UNHwa JavJuLmugIXSm9KuTkLZDuLUq9I0qIhEdDR9BVimLE39l4qBB4VDAQDLK24LCwlYs2Ub TXkY6fxXOFbmgW/EP5lKDrUmNFfAxGC8DmNwcwcmgZzwFuY62eA7u534b4lgV5XFmHuQ 97uB9Iv0paGmi0AGUUuUDhw8jbgC0pkRO9A84BUWByUxBU13ZD3Ne8HLYghbNCCDD7YI +V7RPBcBt+zrfK0pQQ6jcoRUX6tusAwoNkdEz/Gy5eiK6gqx5ZL8UwzDq52yFAlzSsI5 GLMw== X-Gm-Message-State: AOAM532nUdQX++oexXJCvTXIszfVVRhLd2lCrgr3rz6KIcRQZRSPR7U8 ntEWUAb+OPVlLQFHCNot5GGHa1/AgzWnZlwBqMQ7OKvD X-Google-Smtp-Source: ABdhPJzuNX5kn5vuPZ7DRdrkesxKZILmrAnp+nTKIx5QciZPJ5VsYnXrLl12H7RpPwumWmikDOoMZ6FQnns/jbtDu6w= X-Received: by 2002:aca:bf09:: with SMTP id p9mr3367994oif.55.1589579998133; Fri, 15 May 2020 14:59:58 -0700 (PDT) MIME-Version: 1.0 References: <202005142017.04EKH0aA093503@fire.js.berklix.net> <33549.1589488226@critter.freebsd.dk> <202005152108.04FL8WeJ007130@slippy.cwsent.com> In-Reply-To: <202005152108.04FL8WeJ007130@slippy.cwsent.com> From: Alan Somers Date: Fri, 15 May 2020 15:59:46 -0600 Message-ID: Subject: Re: [HEADSUP] Disallowing read() of a directory fd To: Cy Schubert Cc: Kyle Evans , Poul-Henning Kamp , "Julian H. Stacey" , "freebsd-arch@freebsd.org" , "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 49P2Q73RFVz4WSM X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.179 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.20 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[179.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.21)[ip: (-0.21), ipnet: 209.85.128.0/17(-0.39), asn: 15169(-0.42), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[179.167.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.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 22:00:00 -0000 On Fri, May 15, 2020 at 3:08 PM Cy Schubert wrote: > In message > om> > , Kyle Evans writes: > > On Thu, May 14, 2020 at 3:30 PM Poul-Henning Kamp > wrote: > > > > > > -------- > > > In message > > com> > > > , Alan Somers writes: > > > > > > >Really? When is that occasionally useful? I've never seen anything > usefu > > l > > > >come out of reading a directory. > > > > > > Two things I have done over the years: > > > > > > Figure out which filenames prevent a enormous but sparse directory > > > from being compacted. > > > > > > Figure out which control characters were in a filename. > > > > > > > Can we explore the possibility of using fsdb(8) to fulfill these needs > > in a way that you'd be comfortable with? I am thoroughly motivated and > > willing to do what I can to find a good path forward. We could add a > > I'd like to see a good business case before a developer spends their > valuable time to fulfill a some function few if any people might use. > Those > objecting to this should demonstrate how they currently use read()ing > directories. Otherwise IMO it's a waste of your time. > +1. The suggested use cases are marginal, and would be better served by fsdb. Disallowing reads on directories makes sense. Kyle ought to unconditionally disable until a real need is proven. -Alan