Commit af74e5fe authored by Namhyung Kim's avatar Namhyung Kim
Browse files

tools headers: Update the VFS headers with the kernel sources



To pick up the changes in:

  7ed6cbe0 fs: add STATX_DIO_READ_ALIGN
  8fc7e23a fs: reformat the statx definition
  a5874fde exec: Add a new AT_EXECVE_CHECK flag to execveat(2)
  1ebd4a3c blk-crypto: add ioctls to create and prepare hardware-wrapped keys
  af6505e5 fs: add RWF_DONTCACHE iocb and FOP_DONTCACHE file_operations flag
  10783d0b fs, iov_iter: define meta io descriptor
  8f6116b5 statmount: add a new supported_mask field
  37c4a959 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: default avatarIngo Molnar <mingo@kernel.org>
Tested-by: default avatarVenkat Rao Bagalkote <venkat88@linux.ibm.com>
Cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20250410001125.391820-5-namhyung@kernel.org


Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
parent ae629773
Loading
Loading
Loading
Loading
+75 −24
Original line number Diff line number Diff line
@@ -98,43 +98,93 @@ struct statx_timestamp {
 */
struct statx {
	/* 0x00 */
	__u32	stx_mask;	/* What results were written [uncond] */
	__u32	stx_blksize;	/* Preferred general I/O size [uncond] */
	__u64	stx_attributes;	/* Flags conveying information about the file [uncond] */
	/* What results were written [uncond] */
	__u32	stx_mask;

	/* Preferred general I/O size [uncond] */
	__u32	stx_blksize;

	/* Flags conveying information about the file [uncond] */
	__u64	stx_attributes;

	/* 0x10 */
	__u32	stx_nlink;	/* Number of hard links */
	__u32	stx_uid;	/* User ID of owner */
	__u32	stx_gid;	/* Group ID of owner */
	__u16	stx_mode;	/* File mode */
	/* Number of hard links */
	__u32	stx_nlink;

	/* User ID of owner */
	__u32	stx_uid;

	/* Group ID of owner */
	__u32	stx_gid;

	/* File mode */
	__u16	stx_mode;
	__u16	__spare0[1];

	/* 0x20 */
	__u64	stx_ino;	/* Inode number */
	__u64	stx_size;	/* File size */
	__u64	stx_blocks;	/* Number of 512-byte blocks allocated */
	__u64	stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
	/* Inode number */
	__u64	stx_ino;

	/* File size */
	__u64	stx_size;

	/* Number of 512-byte blocks allocated */
	__u64	stx_blocks;

	/* Mask to show what's supported in stx_attributes */
	__u64	stx_attributes_mask;

	/* 0x40 */
	struct statx_timestamp	stx_atime;	/* Last access time */
	struct statx_timestamp	stx_btime;	/* File creation time */
	struct statx_timestamp	stx_ctime;	/* Last attribute change time */
	struct statx_timestamp	stx_mtime;	/* Last data modification time */
	/* Last access time */
	struct statx_timestamp	stx_atime;

	/* File creation time */
	struct statx_timestamp	stx_btime;

	/* Last attribute change time */
	struct statx_timestamp	stx_ctime;

	/* Last data modification time */
	struct statx_timestamp	stx_mtime;

	/* 0x80 */
	__u32	stx_rdev_major;	/* Device ID of special file [if bdev/cdev] */
	/* Device ID of special file [if bdev/cdev] */
	__u32	stx_rdev_major;
	__u32	stx_rdev_minor;
	__u32	stx_dev_major;	/* ID of device containing file [uncond] */

	/* ID of device containing file [uncond] */
	__u32	stx_dev_major;
	__u32	stx_dev_minor;

	/* 0x90 */
	__u64	stx_mnt_id;
	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */
	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */

	/* Memory buffer alignment for direct I/O */
	__u32	stx_dio_mem_align;

	/* File offset alignment for direct I/O */
	__u32	stx_dio_offset_align;

	/* 0xa0 */
	__u64	stx_subvol;	/* Subvolume identifier */
	__u32	stx_atomic_write_unit_min;	/* Min atomic write unit in bytes */
	__u32	stx_atomic_write_unit_max;	/* Max atomic write unit in bytes */
	/* Subvolume identifier */
	__u64	stx_subvol;

	/* Min atomic write unit in bytes */
	__u32	stx_atomic_write_unit_min;

	/* Max atomic write unit in bytes */
	__u32	stx_atomic_write_unit_max;

	/* 0xb0 */
	__u32   stx_atomic_write_segments_max;	/* Max atomic write segment count */
	__u32   __spare1[1];
	/* Max atomic write segment count */
	__u32   stx_atomic_write_segments_max;

	/* File offset alignment for direct I/O reads */
	__u32	stx_dio_read_offset_align;

	/* 0xb8 */
	__u64	__spare3[9];	/* Spare space for future expansion */

	/* 0x100 */
};

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

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

+4 −0
Original line number Diff line number Diff line
@@ -155,4 +155,8 @@
#define AT_HANDLE_MNT_ID_UNIQUE	0x001	/* Return the u64 unique mount ID. */
#define AT_HANDLE_CONNECTABLE	0x002	/* Request a connectable file handle */

/* Flags for execveat2(2). */
#define AT_EXECVE_CHECK		0x10000	/* Only perform a check if execution
					   would be allowed. */

#endif /* _UAPI_LINUX_FCNTL_H */
+16 −5
Original line number Diff line number Diff line
@@ -40,6 +40,15 @@
#define BLOCK_SIZE_BITS 10
#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)

/* flags for integrity meta */
#define IO_INTEGRITY_CHK_GUARD		(1U << 0) /* enforce guard check */
#define IO_INTEGRITY_CHK_REFTAG		(1U << 1) /* enforce ref check */
#define IO_INTEGRITY_CHK_APPTAG		(1U << 2) /* enforce app check */

#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \
				  IO_INTEGRITY_CHK_REFTAG | \
				  IO_INTEGRITY_CHK_APPTAG)

#define SEEK_SET	0	/* seek relative to beginning of file */
#define SEEK_CUR	1	/* seek relative to current file position */
#define SEEK_END	2	/* seek relative to end of file */
@@ -203,10 +212,8 @@ struct fsxattr {
#define BLKROTATIONAL _IO(0x12,126)
#define BLKZEROOUT _IO(0x12,127)
#define BLKGETDISKSEQ _IOR(0x12,128,__u64)
/*
 * A jump here: 130-136 are reserved for zoned block devices
 * (see uapi/linux/blkzoned.h)
 */
/* 130-136 are used by zoned block device ioctls (uapi/linux/blkzoned.h) */
/* 137-141 are used by blk-crypto ioctls (uapi/linux/blk-crypto.h) */

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

/* buffered IO that drops the cache after reading or writing data */
#define RWF_DONTCACHE	((__force __kernel_rwf_t)0x00000080)

/* mask of flags supported by the kernel */
#define RWF_SUPPORTED	(RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT |\
			 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC)
			 RWF_APPEND | RWF_NOAPPEND | RWF_ATOMIC |\
			 RWF_DONTCACHE)

#define PROCFS_IOCTL_MAGIC 'f'

+9 −1
Original line number Diff line number Diff line
@@ -179,7 +179,12 @@ struct statmount {
	__u32 opt_array;	/* [str] Array of nul terminated fs options */
	__u32 opt_sec_num;	/* Number of security options */
	__u32 opt_sec_array;	/* [str] Array of nul terminated security options */
	__u64 __spare2[46];
	__u64 supported_mask;	/* Mask flags that this kernel supports */
	__u32 mnt_uidmap_num;	/* Number of uid mappings */
	__u32 mnt_uidmap;	/* [str] Array of uid mappings (as seen from callers namespace) */
	__u32 mnt_gidmap_num;	/* Number of gid mappings */
	__u32 mnt_gidmap;	/* [str] Array of gid mappings (as seen from callers namespace) */
	__u64 __spare2[43];
	char str[];		/* Variable size part containing strings */
};

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

/*
 * Special @mnt_id values that can be passed to listmount
+75 −24
Original line number Diff line number Diff line
@@ -98,43 +98,93 @@ struct statx_timestamp {
 */
struct statx {
	/* 0x00 */
	__u32	stx_mask;	/* What results were written [uncond] */
	__u32	stx_blksize;	/* Preferred general I/O size [uncond] */
	__u64	stx_attributes;	/* Flags conveying information about the file [uncond] */
	/* What results were written [uncond] */
	__u32	stx_mask;

	/* Preferred general I/O size [uncond] */
	__u32	stx_blksize;

	/* Flags conveying information about the file [uncond] */
	__u64	stx_attributes;

	/* 0x10 */
	__u32	stx_nlink;	/* Number of hard links */
	__u32	stx_uid;	/* User ID of owner */
	__u32	stx_gid;	/* Group ID of owner */
	__u16	stx_mode;	/* File mode */
	/* Number of hard links */
	__u32	stx_nlink;

	/* User ID of owner */
	__u32	stx_uid;

	/* Group ID of owner */
	__u32	stx_gid;

	/* File mode */
	__u16	stx_mode;
	__u16	__spare0[1];

	/* 0x20 */
	__u64	stx_ino;	/* Inode number */
	__u64	stx_size;	/* File size */
	__u64	stx_blocks;	/* Number of 512-byte blocks allocated */
	__u64	stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
	/* Inode number */
	__u64	stx_ino;

	/* File size */
	__u64	stx_size;

	/* Number of 512-byte blocks allocated */
	__u64	stx_blocks;

	/* Mask to show what's supported in stx_attributes */
	__u64	stx_attributes_mask;

	/* 0x40 */
	struct statx_timestamp	stx_atime;	/* Last access time */
	struct statx_timestamp	stx_btime;	/* File creation time */
	struct statx_timestamp	stx_ctime;	/* Last attribute change time */
	struct statx_timestamp	stx_mtime;	/* Last data modification time */
	/* Last access time */
	struct statx_timestamp	stx_atime;

	/* File creation time */
	struct statx_timestamp	stx_btime;

	/* Last attribute change time */
	struct statx_timestamp	stx_ctime;

	/* Last data modification time */
	struct statx_timestamp	stx_mtime;

	/* 0x80 */
	__u32	stx_rdev_major;	/* Device ID of special file [if bdev/cdev] */
	/* Device ID of special file [if bdev/cdev] */
	__u32	stx_rdev_major;
	__u32	stx_rdev_minor;
	__u32	stx_dev_major;	/* ID of device containing file [uncond] */

	/* ID of device containing file [uncond] */
	__u32	stx_dev_major;
	__u32	stx_dev_minor;

	/* 0x90 */
	__u64	stx_mnt_id;
	__u32	stx_dio_mem_align;	/* Memory buffer alignment for direct I/O */
	__u32	stx_dio_offset_align;	/* File offset alignment for direct I/O */

	/* Memory buffer alignment for direct I/O */
	__u32	stx_dio_mem_align;

	/* File offset alignment for direct I/O */
	__u32	stx_dio_offset_align;

	/* 0xa0 */
	__u64	stx_subvol;	/* Subvolume identifier */
	__u32	stx_atomic_write_unit_min;	/* Min atomic write unit in bytes */
	__u32	stx_atomic_write_unit_max;	/* Max atomic write unit in bytes */
	/* Subvolume identifier */
	__u64	stx_subvol;

	/* Min atomic write unit in bytes */
	__u32	stx_atomic_write_unit_min;

	/* Max atomic write unit in bytes */
	__u32	stx_atomic_write_unit_max;

	/* 0xb0 */
	__u32   stx_atomic_write_segments_max;	/* Max atomic write segment count */
	__u32   __spare1[1];
	/* Max atomic write segment count */
	__u32   stx_atomic_write_segments_max;

	/* File offset alignment for direct I/O reads */
	__u32	stx_dio_read_offset_align;

	/* 0xb8 */
	__u64	__spare3[9];	/* Spare space for future expansion */

	/* 0x100 */
};

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

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