From owner-svn-src-all@freebsd.org Tue May 19 15:25:50 2020 Return-Path: Delivered-To: svn-src-all@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 78F3F2DBE2E; Tue, 19 May 2020 15:25:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49RKTV2fK9z3RnC; Tue, 19 May 2020 15:25:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 50C5B2B97E; Tue, 19 May 2020 15:25:50 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f176.google.com with SMTP id i68so11465697qtb.5; Tue, 19 May 2020 08:25:50 -0700 (PDT) X-Gm-Message-State: AOAM531/ybg3eRoDE90pTnS3tcbkvO19inUFEsByxoCy2Rsx+TPLusrB 2EZ+mXw5taip0I8vtZ4cs/v1Gmwazg+rT/a1FCY= X-Google-Smtp-Source: ABdhPJxWMLHSez29Bx5kVv/HAOGGvuB3HJTGwaZyBHwz3FSdCfO9XMeUED/U660D24iaVHl6y6JQB0N3XOMlPb4VEFU= X-Received: by 2002:ac8:361b:: with SMTP id m27mr284075qtb.60.1589901949798; Tue, 19 May 2020 08:25:49 -0700 (PDT) MIME-Version: 1.0 References: <202005190241.04J2f54E001347@repo.freebsd.org> <202005191523.04JFNTdn006636@gndrsh.dnsmgr.net> In-Reply-To: <202005191523.04JFNTdn006636@gndrsh.dnsmgr.net> From: Kyle Evans Date: Tue, 19 May 2020 10:25:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r361238 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs To: "Rodney W. Grimes" Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2020 15:25:50 -0000 On Tue, May 19, 2020 at 10:23 AM Rodney W. Grimes wrote: > > > Author: kevans > > Date: Tue May 19 02:41:05 2020 > > New Revision: 361238 > > URL: https://svnweb.freebsd.org/changeset/base/361238 > > > > Log: > > zfs: reject read(2) of a dirfd with EISDIR > > > > This is independent of the recently-discussed global change, which is still > > in review/discussion stage. > > > > This is effectively a measure for consistency in the ZFS world, where > > FreeBSD was the only platform (as far as I could find) that allowed this. > > What ZFS exposes is decidedly not useful for any real purposes, to > > paraphrase (hopefully faithfully) jhb's findings when exploring this: > > > > The size of a directory in ZFS is the number of directory entries within. > > When reading a directory, you would instead get the leading part of its raw > > contents; the amount you get being dictated by the "size," i.e. number of > > directory entries. There's decidedly (luckily) no stack disclosure happening > > here, though the behavior is bizarre and almost certainly a historical > > accident. > > > > This change has already been upstreamed to OpenZFS. > > Until the grep -d skip issue is addressed I object to this change as > it is going to cause people who do grep with wildcards to see lots > of errors that before where pretty much either silent (no match occured) > or spit out a "binary file foo matches." > That seems preferable to grepping random bytes that don't particularly contain any strings? They'd never see "binary file foo matches" in this case. This isn't exactly divergent from the behavior they'd see with ZFS anywhere else. Thanks, Kyle Evans