Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp112549ybx; Wed, 30 Oct 2019 12:09:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRa/0XlPHFKAp95fnoY+JLrVjQbeXXB+FiwL30MNhhq51WUDg0fzSEcIOFQwr865a9jM3w X-Received: by 2002:adf:f152:: with SMTP id y18mr1402899wro.285.1572462577583; Wed, 30 Oct 2019 12:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572462577; cv=none; d=google.com; s=arc-20160816; b=FtU3qRHBnGUmHcz+nJtRpinZDGF68X2xV7ihgl2SlpQPTNYQF8vLV6u4bhu6Imv8de a5CZcYXqvNyC4txtWC3mIJ0wUsHgFEqplW39rfyq/QaX23Z4Mjuh60VNUkGNF1Ts/yW1 FvtYkr9gwYQDkzTFXoSIRntdeNolLSQRrqro4VaD+mEHd4Omo8h9fzawy6OUA/gQYGx9 IMs1UV9xdo16v+LRejYtRQ0GX+hngJchFkVeAaf0CTIT7RwFAtg7Ax9F78vjx3s+nThN hPCegAaFz9c/c/98uTpH+q+o+KTgSoYfKehpHVZrX6dEKPx0lUr9CSEyy++A1+hQ5Zkh BO8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:to:cc:in-reply-to:date:subject :mime-version:message-id:from:dkim-signature; bh=Ley5zvOlqaz2Wb2k694thCubOF2e57hu9OBi77fDxEQ=; b=pFipYwiHUdq+Q2BQyp8lbj95s7T3Vs/FMDwskyhlaYDyyW/KLEFIazGXV8ccWfv1qp 8OtKn4i6eGP+f5MtZfEap0EldxrbAEePN1EixijV+J/K9Pn4AyA+DYU4mjAr/gEGk6Fo E9EdeWFErB4b5Yit+aJTcMsHPYcX/YiSeX+Mabl29xSKOVDo4DYPkuiLk+BIUrLjgYkW t817T0wzIFjygpNKf0EjZDXcUk0S4HwOYzPfTuR6LB0QZrtLNMMwrNzB1OSbGdOCw1DI iD89aIXoS+33PQzc/IXVrnVF2W97wMCeWXXL6XsEIod9qPdRiFCH6m2YXOxibwdOhLcS /OHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b="j/Xlnnb4"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si2189404edh.110.2019.10.30.12.09.12; Wed, 30 Oct 2019 12:09:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@dilger-ca.20150623.gappssmtp.com header.s=20150623 header.b="j/Xlnnb4"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbfJ3S0T (ORCPT + 99 others); Wed, 30 Oct 2019 14:26:19 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:33855 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727194AbfJ3S0S (ORCPT ); Wed, 30 Oct 2019 14:26:18 -0400 Received: by mail-pl1-f194.google.com with SMTP id k7so1369395pll.1 for ; Wed, 30 Oct 2019 11:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dilger-ca.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=Ley5zvOlqaz2Wb2k694thCubOF2e57hu9OBi77fDxEQ=; b=j/Xlnnb4bRZ9+4KD1WhoNvk/kS85zjuQnr4LIEdZrDVgY/LEuUTrBSqNeX1ziYwI2I DUo5r32HNy1rmo4RKYYx+NO2f3XC/ZJgPWC9K2zzGVDmtF/2HTrTxI1mBdHol0jfK0Ln sQCSBb2dejgO92c5ovM+98RbD4p4CQUAkqGYmeroASqzXhVBDJb5BOuuIuTYNDu72AwL vHCS1HOnobtqiIBZFDJB66iSwOslFuySvU9Q7Yeb4qLgmuldq2ov30mxnrzLX5PGHdZo hbNdReob4s+22r/9tmGT95z41DoSYc4cU/86Ip12mpySxbKCTx3g+01nT4m3uBFdGyho ou3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=Ley5zvOlqaz2Wb2k694thCubOF2e57hu9OBi77fDxEQ=; b=iwQVINP2kh4BaDOePzUD/w3M9Yn/WH743AKdMIa7EzzSd5mmu3Z+9APindBykBt54z RlmDFuwDU8v9wxTtAy0NkkLLejnxWTk+N2yDCJm8j2AxCbrb4STwvEKcM33oGL4hn4Wl 2jGi8+d9CR4ioPze5WJjsnT7DdEpaTNG3nUkMlqbAe1b6UYr9NaECmOaYgawZXx3va9X I6isSrVjg+il+zWAiFDAMSHZSqRsboWFXblT+4V08p7mBHoFyWco6NJtohmE0+FLEKWc fGWYRqWfJXBwaVTG+uPcX4P/yigjrBn897E8eZeEip9mDOLtXsdrbQ32f3OH1XbtDaSa BcNQ== X-Gm-Message-State: APjAAAVjWIZU6OhuQ/9Vz5nmKrIr8eGIRq8HXb/q3wJuDpYD7b4y5R8w 2XgpdCpQyPeHCkhziFTjU4bHDQ== X-Received: by 2002:a17:902:aa41:: with SMTP id c1mr1439479plr.153.1572459977459; Wed, 30 Oct 2019 11:26:17 -0700 (PDT) Received: from cabot-wlan.adilger.int (S0106a84e3fe4b223.cg.shawcable.net. [70.77.216.213]) by smtp.gmail.com with ESMTPSA id 39sm4053067pjo.7.2019.10.30.11.26.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 11:26:16 -0700 (PDT) From: Andreas Dilger Message-Id: <7C96E996-D52F-4901-9F64-B2C40A889829@dilger.ca> Content-Type: multipart/signed; boundary="Apple-Mail=_540B1263-203B-43E9-BA92-ABF36413FD90"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH 1/4] statx: define STATX_ATTR_VERITY Date: Wed, 30 Oct 2019 12:26:10 -0600 In-Reply-To: <20191029204141.145309-2-ebiggers@kernel.org> Cc: linux-fscrypt@vger.kernel.org, Linux FS-devel Mailing List , Ext4 Developers List , linux-f2fs-devel@lists.sourceforge.net, linux-api@vger.kernel.org, David Howells , Theodore Ts'o , Jaegeuk Kim , Victor Hsieh To: Eric Biggers References: <20191029204141.145309-1-ebiggers@kernel.org> <20191029204141.145309-2-ebiggers@kernel.org> X-Mailer: Apple Mail (2.3273) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org --Apple-Mail=_540B1263-203B-43E9-BA92-ABF36413FD90 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Oct 29, 2019, at 2:41 PM, Eric Biggers wrote: >=20 > From: Eric Biggers >=20 > Add a statx attribute bit STATX_ATTR_VERITY which will be set if the > file has fs-verity enabled. This is the statx() equivalent of > FS_VERITY_FL which is returned by FS_IOC_GETFLAGS. >=20 > This is useful because it allows applications to check whether a file = is > a verity file without opening it. Opening a verity file can be > expensive because the fsverity_info is set up on open, which involves > parsing metadata and optionally verifying a cryptographic signature. >=20 > This is analogous to how various other bits are exposed through both > FS_IOC_GETFLAGS and statx(), e.g. the encrypt bit. >=20 > Signed-off-by: Eric Biggers Reviewed-by: Andreas Dilger > --- > include/linux/stat.h | 3 ++- > include/uapi/linux/stat.h | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/include/linux/stat.h b/include/linux/stat.h > index 765573dc17d659..528c4baad09146 100644 > --- a/include/linux/stat.h > +++ b/include/linux/stat.h > @@ -33,7 +33,8 @@ struct kstat { > STATX_ATTR_IMMUTABLE | \ > STATX_ATTR_APPEND | \ > STATX_ATTR_NODUMP | \ > - STATX_ATTR_ENCRYPTED \ > + STATX_ATTR_ENCRYPTED | \ > + STATX_ATTR_VERITY \ > )/* Attrs corresponding to FS_*_FL flags */ > u64 ino; > dev_t dev; > diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h > index 7b35e98d3c58b1..ad80a5c885d598 100644 > --- a/include/uapi/linux/stat.h > +++ b/include/uapi/linux/stat.h > @@ -167,8 +167,8 @@ struct statx { > #define STATX_ATTR_APPEND 0x00000020 /* [I] File is = append-only */ > #define STATX_ATTR_NODUMP 0x00000040 /* [I] File is not to = be dumped */ > #define STATX_ATTR_ENCRYPTED 0x00000800 /* [I] File requires = key to decrypt in fs */ > - > #define STATX_ATTR_AUTOMOUNT 0x00001000 /* Dir: Automount = trigger */ > +#define STATX_ATTR_VERITY 0x00100000 /* [I] Verity = protected file */ >=20 >=20 > #endif /* _UAPI_LINUX_STAT_H */ > -- > 2.24.0.rc1.363.gb1bccd3e3d-goog >=20 Cheers, Andreas --Apple-Mail=_540B1263-203B-43E9-BA92-ABF36413FD90 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIzBAEBCAAdFiEEDb73u6ZejP5ZMprvcqXauRfMH+AFAl251cMACgkQcqXauRfM H+DZ+xAAhLyZsNstVnuqyPFkwbCFPUlVQ0TjfHLGBCf1GxKf+I8XJCgAQdG4VJeb H5U3+9NMn5JZP/e0hGGGCnZtE7LpLRkQ7ja4hRS3cDS1eieU5JL7j2DYhCvAplsr +WieKbYKUXLPByc5+fRW+VIRUkNPLl03IflKpo+746OnT0KMu/NfpViWbiVyuFyd bRoKMEwAhyRCgAgYXHQ6Rjyl/rUAA7jnI1Coau5KB9u4NdKsDheF3l7FMiENEpKc Za3SXo6Cq7N7KDu9E2YwD6jGPZx7uD3b0tpVIkc8D2zYgxFwwzFZmmh0P8/3hVd2 UJY8adBQ4RKGtbYfjtznKPRb9kiEWeevRCwEfwtU7W5LQ0jOi37WdfSlHeIVbvqQ FrhGKiV9jQYG4HHu42CB0mcacmOZb0xNRjivgSJQYvNCwK1VCwWn+ATLAuONN458 9ScrS0DkbBYN1k+mcz9erwA+MjWUzR+5LHgwbZ/CUNP8rlwSLzlXGxKnD0xrUHUg i7ttSxL9LGodPt4r+pc32rCTfVFwvm6q0yS6a8WuB8uWGltW0/ofxkBHYsAwARZx LkZIi3v8PM5G4ZuStQB0otNLudLmJXIkfmRp7vVgr8iOUNzMTT2Y/Li9zW2n9xcR YnghFoyhVUvxNSwhudMMN1IL47pyaCEVB9aVppsYtbheS//T5/I= =tGAO -----END PGP SIGNATURE----- --Apple-Mail=_540B1263-203B-43E9-BA92-ABF36413FD90--