Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1481065pxb; Thu, 28 Jan 2021 18:54:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1V6E3O2wVABbPW0NoGLz0iZq0qU8PB6c9SD3zIPNivNrW4jAPZwjvYcnNSGh0IyKe6EV1 X-Received: by 2002:a17:906:c9cc:: with SMTP id hk12mr2573018ejb.134.1611888849279; Thu, 28 Jan 2021 18:54:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611888849; cv=none; d=google.com; s=arc-20160816; b=WZW2PK3eQnasuHtBE9jFcT24WhP8ikgAZETTkxXgGC7HjosYZxmpK63+Nl2qMR8DMg kbcwSvSX/afBBQq0h1Htk+7JHHFlYOBL9iUvs1LDxtuj+DIYxhEslzYa/ZJFU3LHRMHm R+pm1Rw97CBVm53/TWuYiJoN3ot+uSw7Sqkst7Xh/dvYlrPGVKJJHg2Z8DDyHK7Itbly YJA2jsSocwPsjU5ZUYUetH4364JBH/chn0Mlb9KizHQWCICMyewpIypI1u+TVdnOFqlG QT+xdcdPUUb8N98f/rDVBqIif2zE/TCOaP8Vg0MoFjNdzUN7YwrTrAe4AKcBaTbuhrUo wFOg== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=/PNiZBSBHkdCLynmfVXpV/UcnWGC24yhrG6mM4fz0vA=; b=XgnzlpaUdAHs3iMj2yzy6cGrIluFn2uSyWEoYpR+jkZ++v5F/CtBFurtJWf9DO1AJT r/KrhKI7EnUmaV63hNyutrIzD4+qey61v70e1LAwj0nMuZKlVrTuUP6T6LZbw3+XJ7/Q 0n1ROv26glfwhZD+d0vFKq2mZQEqFOTjYUvEmyR/Zzb90e+ZpiURUWzI0Z6yt4zB+IQp 2RDY0byUqIjmVxy2O16goQBiyPwO5QXu5MePZYMDKpXLg34rECeGU3MEMJrlxATtFEv9 CO3leXowpQ7+TvgogBUySSLDIViFmLRX8Jpi/eE99Zpwb2FXoUjYGBa4cFulEWtViWA5 3XEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=nfSRm87a; 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 bz4si3637098ejc.132.2021.01.28.18.53.39; Thu, 28 Jan 2021 18:54:09 -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=nfSRm87a; 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 S231517AbhA2CvZ (ORCPT + 99 others); Thu, 28 Jan 2021 21:51:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbhA2CvX (ORCPT ); Thu, 28 Jan 2021 21:51:23 -0500 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31E5C061574 for ; Thu, 28 Jan 2021 18:50:42 -0800 (PST) Received: by fieldses.org (Postfix, from userid 2815) id D2A194599; Thu, 28 Jan 2021 21:50:41 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org D2A194599 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1611888641; bh=/PNiZBSBHkdCLynmfVXpV/UcnWGC24yhrG6mM4fz0vA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nfSRm87a+p97/ZmMnMh8VQ/0pmOv/vzQmLYrj6UN2aFBDo6fqtzHMFx6D04smqvYp vil+rYniVb3AEmDccW/VQcMTugZMqTNInx24eSJ9uFA4CGJc/e0/8ScrKP2gtKDSHC 19sNoaU6f1UOMmB6NGMwpHpqRQTinWX5TGVgAIuM= Date: Thu, 28 Jan 2021 21:50:41 -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: <20210129025041.GA12151@fieldses.org> References: <20210128223638.GE29887@fieldses.org> <95e5f9e4-76d4-08c4-ece3-35a10c06073b@vastdata.com> <20210129023527.GA11864@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210129023527.GA11864@fieldses.org> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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. --b.