From owner-freebsd-arch@freebsd.org Thu May 14 18:27: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 3579D2DA023 for ; Thu, 14 May 2020 18:27:00 +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) server-signature RSA-PSS (4096 bits) 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 49NKkr0cBSz4g3h for ; Thu, 14 May 2020 18:27:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (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 04591103CB for ; Thu, 14 May 2020 18:27:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f179.google.com with SMTP id 190so4035721qki.1 for ; Thu, 14 May 2020 11:26:59 -0700 (PDT) X-Gm-Message-State: AOAM533nj1v1sagNNXZ/80ipdlUBjk1DFezo+ZmpHkugx52LHDD8iMii ZEBl1apSfjhTXpxlPSdErxEp3nwLEmZOcjH/j4A= X-Google-Smtp-Source: ABdhPJzuBnThbSnMm0LpeJSv66ATX7wZRQwIXyRnaEWkIxEVC917DIJVP/nM4tAL5UWrsx/FeqCce95RchbMm//tNeM= X-Received: by 2002:a37:2711:: with SMTP id n17mr6247635qkn.430.1589480819498; Thu, 14 May 2020 11:26:59 -0700 (PDT) MIME-Version: 1.0 From: Kyle Evans Date: Thu, 14 May 2020 13:26:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: [HEADSUP] Disallowing read() of a directory fd To: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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: Thu, 14 May 2020 18:27:00 -0000 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