fs-verity introduced inode flag for inodes with enabled fs-verity on them. This patch adds FS_XFLAG_VERITY file attribute which can be retrieved with FS_IOC_FSGETXATTR ioctl() and file_getattr() syscall. This flag is read-only and can not be set with corresponding set ioctl() and file_setattr(). The FS_IOC_SETFLAGS requires file to be opened for writing which is not allowed for verity files. The FS_IOC_FSSETXATTR and file_setattr() clears this flag from the user input. As this is now common flag for both flag interfaces (flags/xflags) add it to overlapping flags list to exclude it from overwrite.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -253,6 +253,7 @@ struct file_attr { · 252 unmodified lines | |||
| 253 | #define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ | 253 | #define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ |
| 254 | #define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */ | 254 | #define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */ |
| 255 | #define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ | 255 | #define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ |
| 256 | #define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */ | ||
| 256 | #define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ | 257 | #define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ |
| 257 | 258 | ||
| 258 | /* the read-only stuff doesn't really belong here, but any other place is | 259 | /* the read-only stuff doesn't really belong here, but any other place is |