summaryrefslogtreecommitdiffstats
path: root/include/linux/stat.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-10-29 13:41:38 -0700
committerEric Biggers <ebiggers@google.com>2019-11-13 12:15:34 -0800
commit3ad2522c64cff1f5aebb987b00683268f0cc7c29 (patch)
tree36a0a6a48ca5a0135f291b5574148179211c4369 /include/linux/stat.h
parentc0d782a3ccdc614210f6c604e82e48fda3c7a4ca (diff)
downloadlinux-stable-3ad2522c64cff1f5aebb987b00683268f0cc7c29.tar.gz
linux-stable-3ad2522c64cff1f5aebb987b00683268f0cc7c29.tar.bz2
linux-stable-3ad2522c64cff1f5aebb987b00683268f0cc7c29.zip
statx: define STATX_ATTR_VERITY
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. 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. This is analogous to how various other bits are exposed through both FS_IOC_GETFLAGS and statx(), e.g. the encrypt bit. Reviewed-by: Andreas Dilger <adilger@dilger.ca> Acked-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'include/linux/stat.h')
-rw-r--r--include/linux/stat.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 765573dc17d6..528c4baad091 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;