diff options
author | Eric Biggers <ebiggers@google.com> | 2019-10-29 23:41:38 +0300 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2019-11-13 23:15:34 +0300 |
commit | 3ad2522c64cff1f5aebb987b00683268f0cc7c29 (patch) | |
tree | 36a0a6a48ca5a0135f291b5574148179211c4369 /include/uapi/linux/stat.h | |
parent | c0d782a3ccdc614210f6c604e82e48fda3c7a4ca (diff) | |
download | linux-3ad2522c64cff1f5aebb987b00683268f0cc7c29.tar.xz |
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/uapi/linux/stat.h')
-rw-r--r-- | include/uapi/linux/stat.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h index 7b35e98d3c58..ad80a5c885d5 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 */ #endif /* _UAPI_LINUX_STAT_H */ |