History

fs: add FS_XFLAG_VERITY for fs-verity files

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.

Andrey Albershteyn committed 9 months ago

Commit 0e6b7ea1 parent 40210c24 files · +24 −3Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/fs.h+1−0
@@ -253,6 +253,7 @@ struct file_attr { · 252 unmodified lines
253253 #define FS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */
254254 #define FS_XFLAG_DAX 0x00008000 /* use DAX for IO */
255255 #define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */
256+#define FS_XFLAG_VERITY 0x00020000 /* fs-verity enabled */
256257 #define FS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */
257258
258259 /* the read-only stuff doesn't really belong here, but any other place is

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t