Skip to content

Commit af74e5f

Browse files
committed
tools headers: Update the VFS headers with the kernel sources
To pick up the changes in: 7ed6cbe fs: add STATX_DIO_READ_ALIGN 8fc7e23 fs: reformat the statx definition a5874fd exec: Add a new AT_EXECVE_CHECK flag to execveat(2) 1ebd4a3 blk-crypto: add ioctls to create and prepare hardware-wrapped keys af6505e fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag 10783d0 fs, iov_iter: define meta io descriptor 8f6116b statmount: add a new supported_mask field 37c4a95 statmount: allow to retrieve idmappings Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/stat.h include/uapi/linux/stat.h diff -u tools/perf/trace/beauty/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h diff -u tools/perf/trace/beauty/include/uapi/linux/fs.h include/uapi/linux/fs.h diff -u tools/perf/trace/beauty/include/uapi/linux/mount.h include/uapi/linux/mount.h Please see tools/include/uapi/README for further details. Acked-by: Ingo Molnar <[email protected]> Tested-by: Venkat Rao Bagalkote <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent ae62977 commit af74e5f

File tree

5 files changed

+179
-54
lines changed

5 files changed

+179
-54
lines changed

tools/include/uapi/linux/stat.h

Lines changed: 75 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,43 +98,93 @@ struct statx_timestamp {
9898
*/
9999
struct statx {
100100
/* 0x00 */
101-
__u32 stx_mask; /* What results were written [uncond] */
102-
__u32 stx_blksize; /* Preferred general I/O size [uncond] */
103-
__u64 stx_attributes; /* Flags conveying information about the file [uncond] */
101+
/* What results were written [uncond] */
102+
__u32 stx_mask;
103+
104+
/* Preferred general I/O size [uncond] */
105+
__u32 stx_blksize;
106+
107+
/* Flags conveying information about the file [uncond] */
108+
__u64 stx_attributes;
109+
104110
/* 0x10 */
105-
__u32 stx_nlink; /* Number of hard links */
106-
__u32 stx_uid; /* User ID of owner */
107-
__u32 stx_gid; /* Group ID of owner */
108-
__u16 stx_mode; /* File mode */
111+
/* Number of hard links */
112+
__u32 stx_nlink;
113+
114+
/* User ID of owner */
115+
__u32 stx_uid;
116+
117+
/* Group ID of owner */
118+
__u32 stx_gid;
119+
120+
/* File mode */
121+
__u16 stx_mode;
109122
__u16 __spare0[1];
123+
110124
/* 0x20 */
111-
__u64 stx_ino; /* Inode number */
112-
__u64 stx_size; /* File size */
113-
__u64 stx_blocks; /* Number of 512-byte blocks allocated */
114-
__u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
125+
/* Inode number */
126+
__u64 stx_ino;
127+
128+
/* File size */
129+
__u64 stx_size;
130+
131+
/* Number of 512-byte blocks allocated */
132+
__u64 stx_blocks;
133+
134+
/* Mask to show what's supported in stx_attributes */
135+
__u64 stx_attributes_mask;
136+
115137
/* 0x40 */
116-
struct statx_timestamp stx_atime; /* Last access time */
117-
struct statx_timestamp stx_btime; /* File creation time */
118-
struct statx_timestamp stx_ctime; /* Last attribute change time */
119-
struct statx_timestamp stx_mtime; /* Last data modification time */
138+
/* Last access time */
139+
struct statx_timestamp stx_atime;
140+
141+
/* File creation time */
142+
struct statx_timestamp stx_btime;
143+
144+
/* Last attribute change time */
145+
struct statx_timestamp stx_ctime;
146+
147+
/* Last data modification time */
148+
struct statx_timestamp stx_mtime;
149+
120150
/* 0x80 */
121-
__u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */
151+
/* Device ID of special file [if bdev/cdev] */
152+
__u32 stx_rdev_major;
122153
__u32 stx_rdev_minor;
123-
__u32 stx_dev_major; /* ID of device containing file [uncond] */
154+
155+
/* ID of device containing file [uncond] */
156+
__u32 stx_dev_major;
124157
__u32 stx_dev_minor;
158+
125159
/* 0x90 */
126160
__u64 stx_mnt_id;
127-
__u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128-
__u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
161+
162+
/* Memory buffer alignment for direct I/O */
163+
__u32 stx_dio_mem_align;
164+
165+
/* File offset alignment for direct I/O */
166+
__u32 stx_dio_offset_align;
167+
129168
/* 0xa0 */
130-
__u64 stx_subvol; /* Subvolume identifier */
131-
__u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */
132-
__u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */
169+
/* Subvolume identifier */
170+
__u64 stx_subvol;
171+
172+
/* Min atomic write unit in bytes */
173+
__u32 stx_atomic_write_unit_min;
174+
175+
/* Max atomic write unit in bytes */
176+
__u32 stx_atomic_write_unit_max;
177+
133178
/* 0xb0 */
134-
__u32 stx_atomic_write_segments_max; /* Max atomic write segment count */
135-
__u32 __spare1[1];
179+
/* Max atomic write segment count */
180+
__u32 stx_atomic_write_segments_max;
181+
182+
/* File offset alignment for direct I/O reads */
183+
__u32 stx_dio_read_offset_align;
184+
136185
/* 0xb8 */
137186
__u64 __spare3[9]; /* Spare space for future expansion */
187+
138188
/* 0x100 */
139189
};
140190

@@ -164,6 +214,7 @@ struct statx {
164214
#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
165215
#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
166216
#define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */
217+
#define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment info */
167218

168219
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
169220

tools/perf/trace/beauty/include/uapi/linux/fcntl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,8 @@
155155
#define AT_HANDLE_MNT_ID_UNIQUE 0x001 /* Return the u64 unique mount ID. */
156156
#define AT_HANDLE_CONNECTABLE 0x002 /* Request a connectable file handle */
157157

158+
/* Flags for execveat2(2). */
159+
#define AT_EXECVE_CHECK 0x10000 /* Only perform a check if execution
160+
would be allowed. */
161+
158162
#endif /* _UAPI_LINUX_FCNTL_H */

tools/perf/trace/beauty/include/uapi/linux/fs.h

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@
4040
#define BLOCK_SIZE_BITS 10
4141
#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
4242

43+
/* flags for integrity meta */
44+
#define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */
45+
#define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */
46+
#define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */
47+
48+
#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \
49+
IO_INTEGRITY_CHK_REFTAG | \
50+
IO_INTEGRITY_CHK_APPTAG)
51+
4352
#define SEEK_SET 0 /* seek relative to beginning of file */
4453
#define SEEK_CUR 1 /* seek relative to current file position */
4554
#define SEEK_END 2 /* seek relative to end of file */
@@ -203,10 +212,8 @@ struct fsxattr {
203212
#define BLKROTATIONAL _IO(0x12,126)
204213
#define BLKZEROOUT _IO(0x12,127)
205214
#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
206-
/*
207-
* A jump here: 130-136 are reserved for zoned block devices
208-
* (see uapi/linux/blkzoned.h)
209-
*/
215+
/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
216+
/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */
210217

211218
#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */
212219
#define FIBMAP _IO(0x00,1) /* bmap access */
@@ -332,9 +339,13 @@ typedef int __bitwise __kernel_rwf_t;
332339
/* Atomic Write */
333340
#define RWF_ATOMIC ((__force __kernel_rwf_t)0x00000040)
334341

342+
/* buffered IO that drops the cache after reading or writing data */
343+
#define RWF_DONTCACHE ((__force __kernel_rwf_t)0x00000080)
344+
335345
/* mask of flags supported by the kernel */
336346
#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
337-
RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC)
347+
RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
348+
RWF_DONTCACHE)
338349

339350
#define PROCFS_IOCTL_MAGIC 'f'
340351

tools/perf/trace/beauty/include/uapi/linux/mount.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ struct statmount {
179179
__u32 opt_array; /* [str] Array of nul terminated fs options */
180180
__u32 opt_sec_num; /* Number of security options */
181181
__u32 opt_sec_array; /* [str] Array of nul terminated security options */
182-
__u64 __spare2[46];
182+
__u64 supported_mask; /* Mask flags that this kernel supports */
183+
__u32 mnt_uidmap_num; /* Number of uid mappings */
184+
__u32 mnt_uidmap; /* [str] Array of uid mappings (as seen from callers namespace) */
185+
__u32 mnt_gidmap_num; /* Number of gid mappings */
186+
__u32 mnt_gidmap; /* [str] Array of gid mappings (as seen from callers namespace) */
187+
__u64 __spare2[43];
183188
char str[]; /* Variable size part containing strings */
184189
};
185190

@@ -217,6 +222,9 @@ struct mnt_id_req {
217222
#define STATMOUNT_SB_SOURCE 0x00000200U /* Want/got sb_source */
218223
#define STATMOUNT_OPT_ARRAY 0x00000400U /* Want/got opt_... */
219224
#define STATMOUNT_OPT_SEC_ARRAY 0x00000800U /* Want/got opt_sec... */
225+
#define STATMOUNT_SUPPORTED_MASK 0x00001000U /* Want/got supported mask flags */
226+
#define STATMOUNT_MNT_UIDMAP 0x00002000U /* Want/got uidmap... */
227+
#define STATMOUNT_MNT_GIDMAP 0x00004000U /* Want/got gidmap... */
220228

221229
/*
222230
* Special @mnt_id values that can be passed to listmount

tools/perf/trace/beauty/include/uapi/linux/stat.h

Lines changed: 75 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,43 +98,93 @@ struct statx_timestamp {
9898
*/
9999
struct statx {
100100
/* 0x00 */
101-
__u32 stx_mask; /* What results were written [uncond] */
102-
__u32 stx_blksize; /* Preferred general I/O size [uncond] */
103-
__u64 stx_attributes; /* Flags conveying information about the file [uncond] */
101+
/* What results were written [uncond] */
102+
__u32 stx_mask;
103+
104+
/* Preferred general I/O size [uncond] */
105+
__u32 stx_blksize;
106+
107+
/* Flags conveying information about the file [uncond] */
108+
__u64 stx_attributes;
109+
104110
/* 0x10 */
105-
__u32 stx_nlink; /* Number of hard links */
106-
__u32 stx_uid; /* User ID of owner */
107-
__u32 stx_gid; /* Group ID of owner */
108-
__u16 stx_mode; /* File mode */
111+
/* Number of hard links */
112+
__u32 stx_nlink;
113+
114+
/* User ID of owner */
115+
__u32 stx_uid;
116+
117+
/* Group ID of owner */
118+
__u32 stx_gid;
119+
120+
/* File mode */
121+
__u16 stx_mode;
109122
__u16 __spare0[1];
123+
110124
/* 0x20 */
111-
__u64 stx_ino; /* Inode number */
112-
__u64 stx_size; /* File size */
113-
__u64 stx_blocks; /* Number of 512-byte blocks allocated */
114-
__u64 stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
125+
/* Inode number */
126+
__u64 stx_ino;
127+
128+
/* File size */
129+
__u64 stx_size;
130+
131+
/* Number of 512-byte blocks allocated */
132+
__u64 stx_blocks;
133+
134+
/* Mask to show what's supported in stx_attributes */
135+
__u64 stx_attributes_mask;
136+
115137
/* 0x40 */
116-
struct statx_timestamp stx_atime; /* Last access time */
117-
struct statx_timestamp stx_btime; /* File creation time */
118-
struct statx_timestamp stx_ctime; /* Last attribute change time */
119-
struct statx_timestamp stx_mtime; /* Last data modification time */
138+
/* Last access time */
139+
struct statx_timestamp stx_atime;
140+
141+
/* File creation time */
142+
struct statx_timestamp stx_btime;
143+
144+
/* Last attribute change time */
145+
struct statx_timestamp stx_ctime;
146+
147+
/* Last data modification time */
148+
struct statx_timestamp stx_mtime;
149+
120150
/* 0x80 */
121-
__u32 stx_rdev_major; /* Device ID of special file [if bdev/cdev] */
151+
/* Device ID of special file [if bdev/cdev] */
152+
__u32 stx_rdev_major;
122153
__u32 stx_rdev_minor;
123-
__u32 stx_dev_major; /* ID of device containing file [uncond] */
154+
155+
/* ID of device containing file [uncond] */
156+
__u32 stx_dev_major;
124157
__u32 stx_dev_minor;
158+
125159
/* 0x90 */
126160
__u64 stx_mnt_id;
127-
__u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128-
__u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
161+
162+
/* Memory buffer alignment for direct I/O */
163+
__u32 stx_dio_mem_align;
164+
165+
/* File offset alignment for direct I/O */
166+
__u32 stx_dio_offset_align;
167+
129168
/* 0xa0 */
130-
__u64 stx_subvol; /* Subvolume identifier */
131-
__u32 stx_atomic_write_unit_min; /* Min atomic write unit in bytes */
132-
__u32 stx_atomic_write_unit_max; /* Max atomic write unit in bytes */
169+
/* Subvolume identifier */
170+
__u64 stx_subvol;
171+
172+
/* Min atomic write unit in bytes */
173+
__u32 stx_atomic_write_unit_min;
174+
175+
/* Max atomic write unit in bytes */
176+
__u32 stx_atomic_write_unit_max;
177+
133178
/* 0xb0 */
134-
__u32 stx_atomic_write_segments_max; /* Max atomic write segment count */
135-
__u32 __spare1[1];
179+
/* Max atomic write segment count */
180+
__u32 stx_atomic_write_segments_max;
181+
182+
/* File offset alignment for direct I/O reads */
183+
__u32 stx_dio_read_offset_align;
184+
136185
/* 0xb8 */
137186
__u64 __spare3[9]; /* Spare space for future expansion */
187+
138188
/* 0x100 */
139189
};
140190

@@ -164,6 +214,7 @@ struct statx {
164214
#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
165215
#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
166216
#define STATX_WRITE_ATOMIC 0x00010000U /* Want/got atomic_write_* fields */
217+
#define STATX_DIO_READ_ALIGN 0x00020000U /* Want/got dio read alignment info */
167218

168219
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
169220

0 commit comments

Comments
 (0)