Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp580543pxb; Wed, 3 Feb 2021 12:13:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGHuGYYBvHmEfRQb3YCdweajAUnBNZEnIqg+QPd7/v+WEocVTny8ONkZJc36x7GKjNzdam X-Received: by 2002:a17:906:118f:: with SMTP id n15mr4950793eja.497.1612383213634; Wed, 03 Feb 2021 12:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612383213; cv=none; d=google.com; s=arc-20160816; b=I3+eiJbABCsYFKLw29lYkTGf/Vu5rCWWekrhktLv4+lB0fpxtIig3SOTMvkJmqZYPa 95OqqXcR63Rym1+CAaqcX6gTp4W51fHarw7wZqnlSeXqiP6h9JF8GdffL0p0GfjNlmd7 FoNNFsQcooXpHhMqO02LqjAJkjy3hFblqDYhOM9E/a4fEPVkDI4XDRsHNuXxG6MWPKOy X5w/19wigUX3YazyA85EnqI9Ff8OOOUABqCNKxPSqvRsnxuRxqwvzfHXbq0B6tt6J1EH HpHlrdHpoJ3Dy0khauKdgCDJPzyJE0UOYAQTxKwjRFoMPttFXTrXh2d5w7/Lkd1EcBu1 8klA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-filter; bh=pu2VPU3aIAT0BtDQJatlzHnNI8ERYChbCeLzIXlk06Y=; b=XB0KbI0bpqTgoMEXdCam1LY/UQUoEcOGi8n9+o4iN8Zk+AE3r/KQPUtn6u2y+DQjAz Omt4TC/CaRJWZdlhVl5DuziWbxKH3UAYDGI9p1kFyiruomSLCj9xK0ovxqQRTPCQ24Mh wS77xf7du9g68UErsIjmJAvUwOG97gP9r9/nuWWoO9e5q6gi0PQZHij1NSJN24sU86l7 ZJdi4ljHQiXTykPRWYoEa1tJAs3gMIVOkbC5B6r4qLbGWQndIQTyoL9rkBdkn+HFDM9F rfWFOwSpQKUd3fdIDTt5UEvvHJFAqTs06AhUsgYEybWoW4ibdvDlLW6m0aL7/TFVtbMZ MHQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=a46SGtas; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si2027609edx.321.2021.02.03.12.13.09; Wed, 03 Feb 2021 12:13:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=a46SGtas; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231879AbhBCUIm (ORCPT + 99 others); Wed, 3 Feb 2021 15:08:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbhBCUIh (ORCPT ); Wed, 3 Feb 2021 15:08:37 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BC3C061573 for ; Wed, 3 Feb 2021 12:07:57 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id 246DC6EB8; Wed, 3 Feb 2021 15:07:56 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org 246DC6EB8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1612382876; bh=pu2VPU3aIAT0BtDQJatlzHnNI8ERYChbCeLzIXlk06Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a46SGtasuaRMRN0w3UzmA6Lv/H2/Es82OQeG0DcJqbuP56FACQfK+5V2r/icpt4aZ kTlmNgEXgmQrpbcUJVupcOC/Sb22FsHJeI4VVZtRrGaXoAPehaQvwB90WbnZn6Zlgi TUNYM+OHpqH1R2H8diT/OWqqHopsbmC4pwZBK80A= Date: Wed, 3 Feb 2021 15:07:56 -0500 From: "bfields@fieldses.org" To: Trond Myklebust Cc: "guy@vastdata.com" , "schumakeranna@gmail.com" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH] nfs: we don't support removing system.nfs4_acl Message-ID: <20210203200756.GA30996@fieldses.org> References: <20210128223638.GE29887@fieldses.org> <95e5f9e4-76d4-08c4-ece3-35a10c06073b@vastdata.com> <20210129023527.GA11864@fieldses.org> <20210129025041.GA12151@fieldses.org> <7a078b4d22c8d769a42a0c2b47fd501479e47a7b.camel@hammerspace.com> <20210131215843.GA9273@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210131215843.GA9273@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sun, Jan 31, 2021 at 04:58:43PM -0500, bfields@fieldses.org wrote: > On Sun, Jan 31, 2021 at 08:41:37PM +0000, Trond Myklebust wrote: > > On Thu, 2021-01-28 at 21:50 -0500, bfields@fieldses.org wrote: > > > On Thu, Jan 28, 2021 at 09:35:27PM -0500, bfields@fieldses.org wrote: > > > > Note that this patch doesn't prevent an application from setting a > > > > zero-length ACL.  The xattr format is XDR with the first four bytes > > > > representing the number of ACEs, so you'd set a zero-length ACL by > > > > passing down a 4-byte all-zero buffer as the new value of the > > > > system.nfs4_acl xattr. > > > > > > > > A zero-length NULL buffer is what's used to implement removexattr: > > > > > > > > int > > > > __vfs_removexattr(struct dentry *dentry, const char *name) > > > > { > > > >         ... > > > >         return handler->set(handler, dentry, inode, name, NULL, 0, > > > > XATTR_REPLACE); > > > > } > > > > > > > > That's the case this patch covers. > > > > > > So, I should have said in the changelog, apologies--the behavior > > > without > > > this patch is that when it gets a removexattr, the client sends a > > > SETATTR with a bitmap claiming there's an ACL attribute, but a > > > zero-length attribute value list, and the server (correctly) returns > > > BADXDR. > > > > > > > I don't see anything in the spec that prohibits a zero length array > > size for nfs41_aces<> or states that should return NFS4ERR_BADXDR. Why > > shouldn't we allow that? > > Again: I agree. And we do allow that, both before and after this patch. > > There's a difference between a SETATTR with a zero-length body and a > SETATTR with a body containing a zero-length ACL. The former is bad > protocol, the latter is, I agree, fine. Are we on the same page now? Or should I update the changelog and resend? --b.