Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp517024rwl; Wed, 5 Apr 2023 04:15:02 -0700 (PDT) X-Google-Smtp-Source: AKy350ahM7xfUfEgAiHFCeqwt//cviJ6Z9tEV510qEDBybGtuF1IWgOIJyFF8/C3OOe2h3Fmg9r2 X-Received: by 2002:a17:90a:aa84:b0:240:b21d:41e0 with SMTP id l4-20020a17090aaa8400b00240b21d41e0mr6543072pjq.34.1680693302399; Wed, 05 Apr 2023 04:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680693302; cv=none; d=google.com; s=arc-20160816; b=TaBlChiNTMjQ9Z+1jEzbpPqiULLWUZtP9hhPOU+ZI7Yxgccu35zB0Nywl6PWufhUDt J+2cPwAS77GYRr3N4G9+CSTAKctn424XAHfnT/hrtFxA8X1B7LdiTfK8RZgmQiIAkv7y MkyO03whJGxSez6WT1kweA+RDjT0TGrdUW82T9SVomqUyg314ArUUpoNZvH1FusHvHy8 U8LFQJMMtuZ8M6KNVBG1n5fHtOS5e+yTZepi1chtQzAYaV7DcH0X014gcjjenhsYyKt7 2wu77q/BjbHBzTZ7gkE9V72eCEwDT57fqwxspAPALmsF8VcHar5WOuyb7zlPPyNkAL5p c6Ng== 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=LzJaUmfW7LSdhmFGvI4GPq0lFJqiEtn70THgtiWFu7E=; b=VBlv1gY4Lfzuv3jQeeeRnwvepI7TkS+1/LAU7otr+wLD3qXnPJnKBjwcZs8WoAn07j HHQXrVFhGufgrv+N4kuO9mP4NW3QZ7Qu6daz4KJi1x2zfOYM3aCw+rp23Kw9WXW499bG OzJh2C+id0HNtfVaZadfXQXhPtJlnwC96aWkx/9nmRvWz10VnND8PMfQF0FaWsmgu7lC kDsasZ+P343Tk7IJzTkxqASTW+EwnFs/kNIr3kOVWUg7iuGBiQrGAz3tb3riJfa+Qh5h lQOWyuFTgoT/SeY2wz1a1Cp3myBxAdPtJUtPgcol1Duk8TZmFhmf3tn/2GqLaNCymHyI lskQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RPfQ1HaK; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p7-20020a17090a868700b0023f043385bcsi1181355pjn.111.2023.04.05.04.14.48; Wed, 05 Apr 2023 04:15:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@redhat.com header.s=mimecast20190719 header.b=RPfQ1HaK; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236486AbjDELIp (ORCPT + 99 others); Wed, 5 Apr 2023 07:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234940AbjDELIo (ORCPT ); Wed, 5 Apr 2023 07:08:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38CF02D6D for ; Wed, 5 Apr 2023 04:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680692879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LzJaUmfW7LSdhmFGvI4GPq0lFJqiEtn70THgtiWFu7E=; b=RPfQ1HaKn4lVvr9dRPj/oGHc13B47VdQ30AiipV9qDPYZTRtpQokIo/cTxXaxHbgD/H9v2 H+3ihRPeowyh4EdwQ0sMxKjhkRylTPkUMSImqkZJXHdM4p0cW62S8WoVZ4gbzWsL01v/xH IDVPe8Cs8Ib8yDJDT+wG/oeFcJavqtA= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-372-1su7TDgaNvqF-CR4B4ln2w-1; Wed, 05 Apr 2023 07:07:58 -0400 X-MC-Unique: 1su7TDgaNvqF-CR4B4ln2w-1 Received: by mail-qt1-f200.google.com with SMTP id n10-20020a05622a11ca00b003e4e30c6c98so21374380qtk.19 for ; Wed, 05 Apr 2023 04:07:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680692877; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LzJaUmfW7LSdhmFGvI4GPq0lFJqiEtn70THgtiWFu7E=; b=48lYoB8IVMxI/lkgUehcTMmZda1OwzQYBUAO2Z1YyAK49zv5QYYO4YHPKh9fRrF7R8 M/CmwAu71FsA0XmsAeog528J7NPsYOFCTJxyBq6rM0OsEL+Yv4ZBzvdCQ3XtWA3jv6Do /rZODjOckbgpgPsjWXkKxHl/3uGxF8ROMXtbgiJa0lMd6KBikq+LLtI1wrYhElvQD9f7 N7GV5UboPynnVxKPSzVaG1FbFbOadA5Npk6HEraQUSQ3I+DcamvtmVABDveDgC66Im2P f/1e0l8vurTecodfgF8st8lVxYexG9CtKCN7j1ClosGFN67zL+sRHqwc2SHxbm+QA6z2 GcDQ== X-Gm-Message-State: AAQBX9d9ysqLH2K1j7akYZI9ldeKSARWed296UTuuFLO/dG7Q6d6ma/S rAJiFmKfvjvsDja8/SRPyKfJl+XTm2JaxlVvNq4p4+aVhyq3y5gLPrfLJq0ZoSpWaWuWym4pReo TG2JwAxMeWUBJrfGiK3zJ X-Received: by 2002:a05:622a:1a9a:b0:3d2:a927:21b8 with SMTP id s26-20020a05622a1a9a00b003d2a92721b8mr4385121qtc.11.1680692877532; Wed, 05 Apr 2023 04:07:57 -0700 (PDT) X-Received: by 2002:a05:622a:1a9a:b0:3d2:a927:21b8 with SMTP id s26-20020a05622a1a9a00b003d2a92721b8mr4385083qtc.11.1680692877295; Wed, 05 Apr 2023 04:07:57 -0700 (PDT) Received: from aalbersh.remote.csb ([109.183.6.197]) by smtp.gmail.com with ESMTPSA id k19-20020ac84753000000b003dffd3d3df5sm3934121qtp.2.2023.04.05.04.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 04:07:57 -0700 (PDT) Date: Wed, 5 Apr 2023 13:07:52 +0200 From: Andrey Albershteyn To: Dave Chinner , ebiggers@kernel.org Cc: Eric Biggers , djwong@kernel.org, dchinner@redhat.com, hch@infradead.org, linux-xfs@vger.kernel.org, fsverity@lists.linux.dev, rpeterso@redhat.com, agruenba@redhat.com, xiang@kernel.org, chao@kernel.org, damien.lemoal@opensource.wdc.com, jth@kernel.org, linux-erofs@lists.ozlabs.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com Subject: Re: [PATCH v2 16/23] xfs: add inode on-disk VERITY flag Message-ID: <20230405110752.ih5qvu2cr6folkds@aalbersh.remote.csb> References: <20230404145319.2057051-1-aalbersh@redhat.com> <20230404145319.2057051-17-aalbersh@redhat.com> <20230404224123.GD1893@sol.localdomain> <20230404235633.GN3223426@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230404235633.GN3223426@dread.disaster.area> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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-ext4@vger.kernel.org Hi Eric and Dave, On Wed, Apr 05, 2023 at 09:56:33AM +1000, Dave Chinner wrote: > On Tue, Apr 04, 2023 at 03:41:23PM -0700, Eric Biggers wrote: > > Hi Andrey, > > > > On Tue, Apr 04, 2023 at 04:53:12PM +0200, Andrey Albershteyn wrote: > > > Add flag to mark inodes which have fs-verity enabled on them (i.e. > > > descriptor exist and tree is built). > > > > > > Signed-off-by: Andrey Albershteyn > > > --- > > > fs/ioctl.c | 4 ++++ > > > fs/xfs/libxfs/xfs_format.h | 4 +++- > > > fs/xfs/xfs_inode.c | 2 ++ > > > fs/xfs/xfs_iops.c | 2 ++ > > > include/uapi/linux/fs.h | 1 + > > > 5 files changed, 12 insertions(+), 1 deletion(-) > > [...] > > > diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h > > > index b7b56871029c..5172a2eb902c 100644 > > > --- a/include/uapi/linux/fs.h > > > +++ b/include/uapi/linux/fs.h > > > @@ -140,6 +140,7 @@ struct fsxattr { > > > #define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ > > > #define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */ > > > #define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ > > > +#define FS_XFLAG_VERITY 0x00020000 /* fs-verity sealed inode */ > > > #define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ > > > > > > > I don't think "xfs: add inode on-disk VERITY flag" is an accurate description of > > a patch that involves adding something to the UAPI. > > Well it does that, but it also adds the UAPI for querying the > on-disk flag via the FS_IOC_FSGETXATTR interface as well. It > probably should be split up into two patches. Sure. > > > Should the other filesystems support this new flag too? > > I think they should get it automatically now that it has been > defined for FS_IOC_FSGETXATTR and added to the generic fileattr flag > fill functions in fs/ioctl.c. > > > I'd also like all ways of getting the verity flag to continue to be mentioned in > > Documentation/filesystems/fsverity.rst. The existing methods (FS_IOC_GETFLAGS > > and statx) are already mentioned there. > > *nod* > Ok, sure, missed that. Will split this patch and add description. -- - Andrey