Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2299512rwd; Fri, 19 May 2023 04:01:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5qOLLVtdld6aDsXSKEJguq/QYQjunkLA7Ajj15oQYsXnwKPZC95vjcJVRZWgNgzSalX8Zb X-Received: by 2002:a05:6a00:15c7:b0:626:2ce1:263c with SMTP id o7-20020a056a0015c700b006262ce1263cmr3049825pfu.5.1684494080392; Fri, 19 May 2023 04:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684494080; cv=none; d=google.com; s=arc-20160816; b=qSGxohyPQRvQR91sgUh3ZP8s9AN6Zl6zRg8IadjmkwIvBjRxg1K/fkoWM0wfLx5KIX MD0EeqY9PxBuTWAASJbybqkppHJqtj1AKEtEUqLQbtuamkili5rpmc9GyO1TUIoWmV5R fT11A3jkLpKh7Bn80nwZ4Ni3RfyO9ZlhUB5579Wox22cLMQWNuOjx3+j5ZHnW4E9iPgC 3i2eicZoWI390oP2fQuquFR+8M5nRnyHt4REXU7dRxEWBdojYXqNque0mOwNKA1i1+e8 yQ5H7t3IzfsUAI4KCHiUc/3YWK4I13BHXO2bm6k+MNr3RzVhcsJbozim9iON5OFc2y6j rbZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xio5MttXgoEGL5gi5+p4ubjYRSNsGDPcBETMa2zqtE0=; b=N9UzJHoozmyXF59Mra464RRKac/Gum99aIC/tRps1D/euvDiq85E9t/CljwNw/MhF+ v6psg3f8pjqir8Dfq+7+WaINLTu60waWXYLzvqkN6onh1X4kN3B7uF8MCcdOOlkdkvfE 9foakIf5BayGVlwUfskpgRIDtlHEIXGDrAHfJWAl+V4hEOWNWCbePMIfSThyPrwyZFKO e01kZ08vT8S0X3gJ7U8YtbM6CpeFvr7kLIMG/i/PQdS383gz7ez0vdXpCtvhMRaCD5ic qYB0sA/5t+vSPLzM6fuQlcR5qoP+uQ8C1rG8LJabGXZtEpYXPRPxNggX3cM45Tm16Z+M S3jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAdZDpKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b198-20020a6334cf000000b0052c8234a858si3653468pga.168.2023.05.19.04.01.03; Fri, 19 May 2023 04:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MAdZDpKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231196AbjESK5D (ORCPT + 99 others); Fri, 19 May 2023 06:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230040AbjESK5C (ORCPT ); Fri, 19 May 2023 06:57:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FA5C113; Fri, 19 May 2023 03:57:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10C4465679; Fri, 19 May 2023 10:57:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8F8AC433D2; Fri, 19 May 2023 10:56:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684493820; bh=Ny8DZAy5gKR3s60MDtiOGy1mFcI6FdFw0aMN+pXWUOg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MAdZDpKPl0mTxDUvAb4tg3zBCnn+EcVd1JzAARb/qLdKqXRiYiVd7ZGphiEBGzWKu 0ga90+cCzAsqpY7s6I+BtX3Ri8deJ/2dtkrxN9cNbnsA1uLd/kZZYESX9L2KGO9YqO HeOLzeKrwK3xNMkl0DeMF8x7Z6wvtsdpV+GxOv+suHCYV7fWdgchnbfjf2AV39UHO6 oHaDDup4rCm6e4/OAOjbCY/PKGD3c+weVXnN8TSE7h5AApC2K7NrwCUbwi7apF0qs9 UvFcAxNxUUKUHy0mLlH+kI39is6G66mfHngg+eYPuCBCBMyGZNZp+770WtEW3cNuCL pFWO02tA3/CaA== Date: Fri, 19 May 2023 12:56:55 +0200 From: Christian Brauner To: Theodore Ts'o Cc: Jeff Layton , Ondrej Valousek , "trondmy@hammerspace.com" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: A pass-through support for NFSv4 style ACL Message-ID: <20230519-allzu-aufmerksam-c3098b5ecf0d@brauner> References: <20230516124655.82283-1-jlayton@kernel.org> <20230516-notorisch-geblickt-6b591fbd77c1@brauner> <20230517-herstellen-zitat-21eeccd36558@brauner> <20230517123914.GA4578@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230517123914.GA4578@mit.edu> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2023 at 08:39:14AM -0400, Theodore Ts'o wrote: > On Wed, May 17, 2023 at 09:42:59AM +0200, Christian Brauner wrote: > > > > I have no idea about the original flame war that ended RichACLs in > > additition to having no clear clue what RichACLs are supposed to > > achieve. My current knowledge extends to "Christoph didn't like them". > > As to what RichACL's are supposed to achieve.... Interesting, thanks for all the details! > > Windows/NFSv4 -style ACL's are very different from POSIX semantics, in > a gazillion ways. For example, if you set a top-level acl, it will > automatically affect all of the ACL's in the subhierarcy. This is > trivially easy in Windows given that apparently ACL's are evaluated by > path every time you try to operate on a file (or at least, that's how > it works effectively; having not taken a look at Windows source code, > I can't vouch for how it is actually implemented.) This is, of > course, a performance disaster and doesn't work all that well for > Linux where we can do things like like fchdir() and use O_PATH file > descriptors and *at() system calls. Moreover, Windows doesn't have > things like the mode parameter to open(2) and mkdir(2) system calls. > > As a result, RichACL's are quite a bit more complicated than Posix > ACL's or the Windows-style ACL's from which they were derived because > they have to compromise between the Windows authorization model and > the Posix/Linux authorization model while being expressive enough > to mostly emulate Windows-style ACL's. For example, instead of > implementing Windows-style "automatic inheritance", setrichacl(1) will > do the moral equivalent of chmod -R, and then add a lot of hair in the > form of "file_inherit, dir_inherit, no_propagate, and inherit_only" > flags to each ACL entry, which are all there to try to mostly (but not > completely) handle make Windows-style and Linux/POSIX acl's work > within the same file system. There's a lot more detail of the hair > documented here[1]. > > [1] https://www.systutorials.com/docs/linux/man/7-richacl/ > > I'll note most of this complexity is only necessary if you want to > have local file access to the file system work with similar semantics > as what would get exported via NFSv4. If you didn't, you could just > store the Windows-style ACL in an xattr and just let it be set via the > remote file system, and return it when the remote file system queries > it. The problem comes when you want to have "RichACLs" actually > influence the local Linux permissions check. Yeah, I'm already scared enough.