Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1210102rdb; Fri, 1 Dec 2023 09:38:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlkwvTIF43uNh+TcD0s/vsnMF4UxO6xYX1iCQ0kHgXIUrUauulhevhYl/oXhY+8khkPbvx X-Received: by 2002:a17:902:c1d5:b0:1cc:3829:8355 with SMTP id c21-20020a170902c1d500b001cc38298355mr22890815plc.12.1701452326495; Fri, 01 Dec 2023 09:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701452326; cv=none; d=google.com; s=arc-20160816; b=PLCY/EDGTA/2eywLuZWtaxmb9IX2hjNxw4aliFUnguOauHrcsQwWXLKfub+6ceClFV /fpr74bMaxo+VRpEYiKUc4Sj006YCAsGu+9Nuac/JCna3C1jS5tKnlNS4K4E13GSsN3X 4/LkezMI2H5uoH7RuqTQYpNMOAK8O7G3XQuwpLApHdYbasZlo+JKB2ADy0PYreC0bfQR BxuZuLxc28NW2ms6Z6fQAyv6STpCKGQ6BSL5yMoooi1/DgM0ae6x/q9buz4+fkHNmUlP IssbblMO3+nSLzwLb8y4TgDGcwOh+v94zUR7W9qVHRvchxZLDIWyu0Kv/BREIeVpgct5 zBsg== 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=L6Jp+SHnJ5WMhcjPs7r+5Bt+mGu7Dee/T5VRsh9BgtE=; fh=7fXGgMwf+//x0JQxo8LE3wiBrkF7IJx/jxDwq0xWsEg=; b=zBtW0teKggbnTSLBgOtrNlHrhalVEzZcUSbk+8O9OCoTYrV2kNuPY9xNYpLnJ1o4jx f54VU4CMqH3PLfHORVo3o5vNxrw7Q3i++RzSZefNFE1CqRvnvW0T6Llldl+aTZbNh9GI Pb06bPEHgpKt7G85tooyXp+Fq1DiWTBCPalO7bCXaAx2HdguhyabouejdiiNF58Wt1qC iLBw6rtl7M6aVOqHKwvMI8oZz7FbIONPeh2mx6lcSmTc6NXG4oQQrjt8Ch+Bk/OOh59K 5fymDOi+4DWVO8B/2EQe8Q4dJWoc8uvrzku8vuK4KRpfUwWlFLwrZtFZA/1rtCzJDxTC SEoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L8XQxcls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o17-20020a170902d4d100b001b3bd85f54bsi2128830plg.35.2023.12.01.09.38.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 09:38:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L8XQxcls; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A7635819AC71; Fri, 1 Dec 2023 09:38:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbjLARib (ORCPT + 99 others); Fri, 1 Dec 2023 12:38:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjLARi3 (ORCPT ); Fri, 1 Dec 2023 12:38:29 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5EA6194 for ; Fri, 1 Dec 2023 09:38:35 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 733D4C433C8; Fri, 1 Dec 2023 17:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701452315; bh=Dz0B5fxn/oqyZ4YCUdxRSHvWd24ECZxBcKDsdAS+OP8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L8XQxclsI+SfocWX7pLQg4yTcgnoloNmJKFzNin3DuEOugJh6FR9HozYzAHV3NTwh +3ZjARg0I6K6FNsw7aF4/04ubGHDL9VORUBV3a5oydbq9Jz6LcqULE6mTTiv2pELXa Qi58qBD5KnMEvY+VEffgOPWBYOuSj8TVjtzBi4YZguMJl9PBI2ueUi9rqiqFIgNIiT qtn4Z/loHTRwmOgKYcpX7SPoBfgz4E5035z6IMV1rEjT3C0jvvYimsU+eUqEraINyZ B2kChFVseZHPmy1CLml9Q0M0DNC/mRetdSHHKQMjdErEtwviYgUDS54kZUsN3VNRvH Te6+37vaI5zGw== Date: Fri, 1 Dec 2023 11:38:33 -0600 From: "Seth Forshee (DigitalOcean)" To: Christian Brauner Cc: Serge Hallyn , Paul Moore , Eric Paris , James Morris , Alexander Viro , Miklos Szeredi , Amir Goldstein , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, audit@vger.kernel.org, linux-unionfs@vger.kernel.org Subject: Re: [PATCH 07/16] fs: add inode operations to get/set/remove fscaps Message-ID: References: <20231129-idmap-fscap-refactor-v1-0-da5a26058a5b@kernel.org> <20231129-idmap-fscap-refactor-v1-7-da5a26058a5b@kernel.org> <20231201-drohnen-ausverkauf-61e5c94364ca@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201-drohnen-ausverkauf-61e5c94364ca@brauner> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 01 Dec 2023 09:38:43 -0800 (PST) On Fri, Dec 01, 2023 at 06:02:55PM +0100, Christian Brauner wrote: > On Wed, Nov 29, 2023 at 03:50:25PM -0600, Seth Forshee (DigitalOcean) wrote: > > Add inode operations for getting, setting and removing filesystem > > capabilities rather than passing around raw xattr data. This provides > > better type safety for ids contained within xattrs. > > > > Signed-off-by: Seth Forshee (DigitalOcean) > > --- > > include/linux/fs.h | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/include/linux/fs.h b/include/linux/fs.h > > index 98b7a7a8c42e..a0a77f67b999 100644 > > --- a/include/linux/fs.h > > +++ b/include/linux/fs.h > > @@ -2002,6 +2002,11 @@ struct inode_operations { > > int); > > int (*set_acl)(struct mnt_idmap *, struct dentry *, > > struct posix_acl *, int); > > + int (*get_fscaps)(struct mnt_idmap *, struct dentry *, > > + struct vfs_caps *); > > + int (*set_fscaps)(struct mnt_idmap *, struct dentry *, > > + const struct vfs_caps *, int flags); > > If it's really a flags argument, then unsigned int, please, This is the flags for setxattr, which is an int everywhere. Or almost everywhere; I just noticed that it is actually an unsigned int in struct xattr_ctx. But for consistency I think it makes sense to have it be an int here too. Though maybe naming it setxattr_flags would be helpful for clarity.