| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/20 12:16 | flow | patch-triage |
3mArgs:null Results: {
"EnableConfigs": [
"IO_URING"
],
"FocusSymbols": [
"io_fremovexattr_prep",
"io_fremovexattr",
"io_flistxattr_prep",
"io_flistxattr",
"file_removexattr",
"file_listxattr"
],
"KMSANReasoning": "The patch series introduces support for two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes existing VFS helpers (file_removexattr and file_listxattr) by making them non-static and wraps them in io_uring handlers.\n\nKMSAN vs KASAN Applicability:\n- No uninitialized memory risks or kernel-to-user info-leaks are introduced.\n- In both `io_fremovexattr_prep` and `io_flistxattr_prep`, all fields of the per-command `io_xattr` context are explicitly initialized prior to use (`filename` initialized via `INIT_DELAYED_FILENAME`, pointers `kname` and `kvalue` explicitly set to NULL, and value/size/flags populated from the SQE).\n- The allocated memory for `ix-\u003ectx.kname` is filled via `import_xattr_name` (using `strncpy_from_user`), and `file_removexattr` treats it strictly as a null-terminated C string.\n- `io_flistxattr` directly delegates to the existing `file_listxattr` helper (which calls `listxattr`, identical to the `flistxattr(2)` syscall), with no changes to user-space copying or buffer management.\n- Any bugs likely to arise from this patch relate to file reference handling, async cancellation lifecycles, memory freeing on error paths, or mount write locks (`mnt_want_write_file`), which are comprehensively covered by KASAN and LOCKDEP.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false,
"Reasoning": "The patch introduces two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes fs/xattr.c functions file_removexattr() and file_listxattr() to io_uring and implements prep and issue handlers with user input validation, memory allocation, and asynchronous execution in io_uring/xattr.c. This reachable core subsystem functionality is fully testable and worth fuzzing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/20 12:16 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 42baea3a0d1118620152da23c58db443974630c5\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Sep 20 12:16:14 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/fs/internal.h b/fs/internal.h\nindex c658c8a5ebd56..ff7344ac8cefa 100644\n--- a/fs/internal.h\n+++ b/fs/internal.h\n@@ -298,6 +298,8 @@ int filename_setxattr(int dfd, struct filename *filename,\n \t\t unsigned int lookup_flags, struct kernel_xattr_ctx *ctx);\n int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);\n int import_xattr_name(struct xattr_name *kname, const char __user *name);\n+ssize_t file_listxattr(struct file *f, char __user *list, size_t size);\n+int file_removexattr(struct file *f, struct xattr_name *kname);\n \n int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode);\n \ndiff --git a/fs/xattr.c b/fs/xattr.c\nindex d589791152007..31b8a5eeec1e8 100644\n--- a/fs/xattr.c\n+++ b/fs/xattr.c\n@@ -953,7 +953,6 @@ listxattr(struct dentry *d, char __user *list, size_t size)\n \treturn error;\n }\n \n-static\n ssize_t file_listxattr(struct file *f, char __user *list, size_t size)\n {\n \taudit_file(f);\n@@ -1036,7 +1035,7 @@ removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n \treturn vfs_removexattr(idmap, d, name);\n }\n \n-static int file_removexattr(struct file *f, struct xattr_name *kname)\n+int file_removexattr(struct file *f, struct xattr_name *kname)\n {\n \tint error = mnt_want_write_file(f);\n \ndiff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h\nindex 909fb7aea638e..45de6dd6e3c4e 100644\n--- a/include/uapi/linux/io_uring.h\n+++ b/include/uapi/linux/io_uring.h\n@@ -318,6 +318,8 @@ enum io_uring_op {\n \tIORING_OP_PIPE,\n \tIORING_OP_NOP128,\n \tIORING_OP_URING_CMD128,\n+\tIORING_OP_FREMOVEXATTR,\n+\tIORING_OP_FLISTXATTR,\n \n \t/* this goes last, obviously */\n \tIORING_OP_LAST,\n@@ -426,7 +428,7 @@ enum io_uring_op {\n * IORING_RECVSEND_BUNDLE\tUsed with IOSQE_BUFFER_SELECT. If set, send or\n *\t\t\t\trecv will grab as many buffers from the buffer\n *\t\t\t\tgroup ID given and send them all. The completion\n- *\t\t\t\tresult \twill be the number of buffers send, with\n+ *\t\t\t\tresult\twill be the number of buffers send, with\n *\t\t\t\tthe starting buffer ID in cqe-\u003eflags as per\n *\t\t\t\tusual for provided buffer usage. The buffers\n *\t\t\t\twill be\tcontiguous from the starting buffer ID.\ndiff --git a/io_uring/opdef.c b/io_uring/opdef.c\nindex cf3aa2242cd76..14a511f7a9df5 100644\n--- a/io_uring/opdef.c\n+++ b/io_uring/opdef.c\n@@ -591,6 +591,16 @@ const struct io_issue_def io_issue_defs[] = {\n \t\t.prep\t\t\t= io_uring_cmd_prep,\n \t\t.issue\t\t\t= io_uring_cmd,\n \t},\n+\t[IORING_OP_FREMOVEXATTR] = {\n+\t\t.needs_file\t\t= 1,\n+\t\t.prep\t\t\t= io_fremovexattr_prep,\n+\t\t.issue\t\t\t= io_fremovexattr,\n+\t},\n+\t[IORING_OP_FLISTXATTR] = {\n+\t\t.needs_file\t\t= 1,\n+\t\t.prep\t\t\t= io_flistxattr_prep,\n+\t\t.issue\t\t\t= io_flistxattr,\n+\t},\n };\n \n const struct io_cold_def io_cold_defs[] = {\n@@ -849,6 +859,14 @@ const struct io_cold_def io_cold_defs[] = {\n \t\t.sqe_copy\t\t= io_uring_cmd_sqe_copy,\n \t\t.cleanup\t\t= io_uring_cmd_cleanup,\n \t},\n+\t[IORING_OP_FREMOVEXATTR] = {\n+\t\t.name\t\t\t= \"FREMOVEXATTR\",\n+\t\t.cleanup\t\t= io_xattr_cleanup,\n+\t},\n+\t[IORING_OP_FLISTXATTR] = {\n+\t\t.name\t\t\t= \"FLISTXATTR\",\n+\t\t.cleanup\t\t= io_xattr_cleanup,\n+\t},\n };\n \n const char *io_uring_get_opcode(u8 opcode)\ndiff --git a/io_uring/xattr.c b/io_uring/xattr.c\nindex 5303df3f247f4..f2d6b19040589 100644\n--- a/io_uring/xattr.c\n+++ b/io_uring/xattr.c\n@@ -195,3 +195,86 @@ int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)\n \tio_xattr_finish(req, ret);\n \treturn IOU_COMPLETE;\n }\n+\n+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n+{\n+\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n+\tconst char __user *name;\n+\tint ret;\n+\n+\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n+\tix-\u003ectx.kname = NULL;\n+\tix-\u003ectx.kvalue = NULL;\n+\n+\tif (READ_ONCE(sqe-\u003eoff) || READ_ONCE(sqe-\u003eaddr2) || READ_ONCE(sqe-\u003elen) ||\n+\t READ_ONCE(sqe-\u003exattr_flags) || READ_ONCE(sqe-\u003ebuf_index) ||\n+\t READ_ONCE(sqe-\u003esplice_fd_in) || READ_ONCE(sqe-\u003eaddr3) ||\n+\t READ_ONCE(sqe-\u003e__pad2[0]))\n+\t\treturn -EINVAL;\n+\n+\tname = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr));\n+\n+\tix-\u003ectx.kname = kmalloc_obj(*ix-\u003ectx.kname);\n+\tif (!ix-\u003ectx.kname)\n+\t\treturn -ENOMEM;\n+\n+\tret = import_xattr_name(ix-\u003ectx.kname, name);\n+\tif (ret) {\n+\t\tkfree(ix-\u003ectx.kname);\n+\t\tix-\u003ectx.kname = NULL;\n+\t\treturn ret;\n+\t}\n+\n+\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n+\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n+\treturn 0;\n+}\n+\n+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)\n+{\n+\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n+\tint ret;\n+\n+\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n+\n+\tret = file_removexattr(req-\u003efile, ix-\u003ectx.kname);\n+\tio_xattr_finish(req, ret);\n+\treturn IOU_COMPLETE;\n+}\n+\n+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n+{\n+\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n+\n+\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n+\tix-\u003ectx.kname = NULL;\n+\tix-\u003ectx.kvalue = NULL;\n+\n+\tif (READ_ONCE(sqe-\u003eaddr) || READ_ONCE(sqe-\u003eoff) ||\n+\t READ_ONCE(sqe-\u003ebuf_index) || READ_ONCE(sqe-\u003esplice_fd_in) ||\n+\t READ_ONCE(sqe-\u003eaddr3) || READ_ONCE(sqe-\u003e__pad2[0]))\n+\t\treturn -EINVAL;\n+\n+\tix-\u003ectx.value = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr2));\n+\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\n+\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\n+\n+\tif (ix-\u003ectx.flags)\n+\t\treturn -EINVAL;\n+\n+\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n+\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n+\treturn 0;\n+}\n+\n+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)\n+{\n+\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n+\tint ret;\n+\n+\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n+\n+\tret = file_listxattr(req-\u003efile, ix-\u003ectx.value, ix-\u003ectx.size);\n+\tio_xattr_finish(req, ret);\n+\treturn IOU_COMPLETE;\n+}\ndiff --git a/io_uring/xattr.h b/io_uring/xattr.h\nindex 9b459d2ae90c5..d2487b49a5d21 100644\n--- a/io_uring/xattr.h\n+++ b/io_uring/xattr.h\n@@ -13,3 +13,9 @@ int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags);\n \n int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\n int io_getxattr(struct io_kiocb *req, unsigned int issue_flags);\n+\n+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\n+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags);\n+\n+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\n+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags);\ndiff --git a/tools/include/uapi/linux/io_uring.h b/tools/include/uapi/linux/io_uring.h\nindex f1c16f8177420..45de6dd6e3c4e 100644\n--- a/tools/include/uapi/linux/io_uring.h\n+++ b/tools/include/uapi/linux/io_uring.h\n@@ -10,6 +10,8 @@\n \n #include \u003clinux/fs.h\u003e\n #include \u003clinux/types.h\u003e\n+#include \u003clinux/io_uring/zcrx.h\u003e\n+\n /*\n * this file is shared with liburing and that has to autodetect\n * if linux/time_types.h is available or not, it can\n@@ -50,7 +52,7 @@ struct io_uring_sqe {\n \t};\n \t__u32\tlen;\t\t/* buffer size or number of iovecs */\n \tunion {\n-\t\t__kernel_rwf_t\trw_flags;\n+\t\t__u32\t\trw_flags;\n \t\t__u32\t\tfsync_flags;\n \t\t__u16\t\tpoll_events;\t/* compatibility */\n \t\t__u32\t\tpoll32_events;\t/* word-reversed for BE */\n@@ -71,6 +73,9 @@ struct io_uring_sqe {\n \t\t__u32\t\turing_cmd_flags;\n \t\t__u32\t\twaitid_flags;\n \t\t__u32\t\tfutex_flags;\n+\t\t__u32\t\tinstall_fd_flags;\n+\t\t__u32\t\tnop_flags;\n+\t\t__u32\t\tpipe_flags;\n \t};\n \t__u64\tuser_data;\t/* data to be passed back at completion time */\n \t/* pack this to avoid bogus arm OABI complaints */\n@@ -85,17 +90,26 @@ struct io_uring_sqe {\n \tunion {\n \t\t__s32\tsplice_fd_in;\n \t\t__u32\tfile_index;\n+\t\t__u32\tzcrx_ifq_idx;\n \t\t__u32\toptlen;\n \t\tstruct {\n \t\t\t__u16\taddr_len;\n \t\t\t__u16\t__pad3[1];\n \t\t};\n+\t\tstruct {\n+\t\t\t__u8\twrite_stream;\n+\t\t\t__u8\t__pad4[3];\n+\t\t};\n \t};\n \tunion {\n \t\tstruct {\n \t\t\t__u64\taddr3;\n \t\t\t__u64\t__pad2[1];\n \t\t};\n+\t\tstruct {\n+\t\t\t__u64\tattr_ptr; /* pointer to attribute information */\n+\t\t\t__u64\tattr_type_mask; /* bit mask of attributes */\n+\t\t};\n \t\t__u64\toptval;\n \t\t/*\n \t\t * If the ring is initialized with IORING_SETUP_SQE128, then\n@@ -105,6 +119,18 @@ struct io_uring_sqe {\n \t};\n };\n \n+/* sqe-\u003eattr_type_mask flags */\n+#define IORING_RW_ATTR_FLAG_PI\t(1U \u003c\u003c 0)\n+/* PI attribute information */\n+struct io_uring_attr_pi {\n+\t\t__u16\tflags;\n+\t\t__u16\tapp_tag;\n+\t\t__u32\tlen;\n+\t\t__u64\taddr;\n+\t\t__u64\tseed;\n+\t\t__u64\trsvd;\n+};\n+\n /*\n * If sqe-\u003efile_index is set to this for opcodes that instantiate a new\n * direct descriptor (like openat/openat2/accept), then io_uring will allocate\n@@ -114,7 +140,7 @@ struct io_uring_sqe {\n */\n #define IORING_FILE_INDEX_ALLOC\t\t(~0U)\n \n-enum {\n+enum io_uring_sqe_flags_bit {\n \tIOSQE_FIXED_FILE_BIT,\n \tIOSQE_IO_DRAIN_BIT,\n \tIOSQE_IO_LINK_BIT,\n@@ -164,7 +190,8 @@ enum {\n /*\n * If COOP_TASKRUN is set, get notified if task work is available for\n * running and a kernel transition would be needed to run it. This sets\n- * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.\n+ * IORING_SQ_TASKRUN in the sq ring flags. Not valid without COOP_TASKRUN\n+ * or DEFER_TASKRUN.\n */\n #define IORING_SETUP_TASKRUN_FLAG\t(1U \u003c\u003c 9)\n #define IORING_SETUP_SQE128\t\t(1U \u003c\u003c 10) /* SQEs are 128 byte */\n@@ -198,6 +225,33 @@ enum {\n */\n #define IORING_SETUP_NO_SQARRAY\t\t(1U \u003c\u003c 16)\n \n+/* Use hybrid poll in iopoll process */\n+#define IORING_SETUP_HYBRID_IOPOLL\t(1U \u003c\u003c 17)\n+\n+/*\n+ * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have\n+ * IORING_CQE_F_32 set in cqe-\u003eflags.\n+ */\n+#define IORING_SETUP_CQE_MIXED\t\t(1U \u003c\u003c 18)\n+\n+/*\n+ * Allow both 64b and 128b SQEs. If a 128b SQE is posted, it will have\n+ * a 128b opcode.\n+ */\n+#define IORING_SETUP_SQE_MIXED\t\t(1U \u003c\u003c 19)\n+\n+/*\n+ * When set, io_uring ignores SQ head and tail and fetches SQEs to submit\n+ * starting from index 0 instead from the index stored in the head pointer.\n+ * IOW, the user should place all SQE at the beginning of the SQ memory\n+ * before issuing a submission syscall.\n+ *\n+ * It requires IORING_SETUP_NO_SQARRAY and is incompatible with\n+ * IORING_SETUP_SQPOLL. The user must also never change the SQ head and tail\n+ * values and keep it set to 0. Any other value is undefined behaviour.\n+ */\n+#define IORING_SETUP_SQ_REWIND\t\t(1U \u003c\u003c 20)\n+\n enum io_uring_op {\n \tIORING_OP_NOP,\n \tIORING_OP_READV,\n@@ -253,6 +307,19 @@ enum io_uring_op {\n \tIORING_OP_FUTEX_WAIT,\n \tIORING_OP_FUTEX_WAKE,\n \tIORING_OP_FUTEX_WAITV,\n+\tIORING_OP_FIXED_FD_INSTALL,\n+\tIORING_OP_FTRUNCATE,\n+\tIORING_OP_BIND,\n+\tIORING_OP_LISTEN,\n+\tIORING_OP_RECV_ZC,\n+\tIORING_OP_EPOLL_WAIT,\n+\tIORING_OP_READV_FIXED,\n+\tIORING_OP_WRITEV_FIXED,\n+\tIORING_OP_PIPE,\n+\tIORING_OP_NOP128,\n+\tIORING_OP_URING_CMD128,\n+\tIORING_OP_FREMOVEXATTR,\n+\tIORING_OP_FLISTXATTR,\n \n \t/* this goes last, obviously */\n \tIORING_OP_LAST,\n@@ -262,9 +329,13 @@ enum io_uring_op {\n * sqe-\u003euring_cmd_flags\t\ttop 8bits aren't available for userspace\n * IORING_URING_CMD_FIXED\tuse registered buffer; pass this flag\n *\t\t\t\talong with setting sqe-\u003ebuf_index.\n+ * IORING_URING_CMD_MULTISHOT\tmust be used with buffer select, like other\n+ *\t\t\t\tmultishot commands. Not compatible with\n+ *\t\t\t\tIORING_URING_CMD_FIXED, for now.\n */\n #define IORING_URING_CMD_FIXED\t(1U \u003c\u003c 0)\n-#define IORING_URING_CMD_MASK\tIORING_URING_CMD_FIXED\n+#define IORING_URING_CMD_MULTISHOT\t(1U \u003c\u003c 1)\n+#define IORING_URING_CMD_MASK\t(IORING_URING_CMD_FIXED | IORING_URING_CMD_MULTISHOT)\n \n \n /*\n@@ -274,6 +345,10 @@ enum io_uring_op {\n \n /*\n * sqe-\u003etimeout_flags\n+ *\n+ * IORING_TIMEOUT_IMMEDIATE_ARG:\tIf set, sqe-\u003eaddr stores the timeout\n+ *\t\t\t\t\tvalue in nanoseconds instead of\n+ *\t\t\t\t\tpointing to a timespec.\n */\n #define IORING_TIMEOUT_ABS\t\t(1U \u003c\u003c 0)\n #define IORING_TIMEOUT_UPDATE\t\t(1U \u003c\u003c 1)\n@@ -282,6 +357,7 @@ enum io_uring_op {\n #define IORING_LINK_TIMEOUT_UPDATE\t(1U \u003c\u003c 4)\n #define IORING_TIMEOUT_ETIME_SUCCESS\t(1U \u003c\u003c 5)\n #define IORING_TIMEOUT_MULTISHOT\t(1U \u003c\u003c 6)\n+#define IORING_TIMEOUT_IMMEDIATE_ARG\t(1U \u003c\u003c 7)\n #define IORING_TIMEOUT_CLOCK_MASK\t(IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)\n #define IORING_TIMEOUT_UPDATE_MASK\t(IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE)\n /*\n@@ -348,11 +424,24 @@ enum io_uring_op {\n *\t\t\t\t0 is reported if zerocopy was actually possible.\n *\t\t\t\tIORING_NOTIF_USAGE_ZC_COPIED if data was copied\n *\t\t\t\t(at least partially).\n+ *\n+ * IORING_RECVSEND_BUNDLE\tUsed with IOSQE_BUFFER_SELECT. If set, send or\n+ *\t\t\t\trecv will grab as many buffers from the buffer\n+ *\t\t\t\tgroup ID given and send them all. The completion\n+ *\t\t\t\tresult\twill be the number of buffers send, with\n+ *\t\t\t\tthe starting buffer ID in cqe-\u003eflags as per\n+ *\t\t\t\tusual for provided buffer usage. The buffers\n+ *\t\t\t\twill be\tcontiguous from the starting buffer ID.\n+ *\n+ * IORING_SEND_VECTORIZED\tIf set, SEND[_ZC] will take a pointer to a io_vec\n+ *\t\t\t\tto allow vectorized send operations.\n */\n #define IORING_RECVSEND_POLL_FIRST\t(1U \u003c\u003c 0)\n #define IORING_RECV_MULTISHOT\t\t(1U \u003c\u003c 1)\n #define IORING_RECVSEND_FIXED_BUF\t(1U \u003c\u003c 2)\n #define IORING_SEND_ZC_REPORT_USAGE\t(1U \u003c\u003c 3)\n+#define IORING_RECVSEND_BUNDLE\t\t(1U \u003c\u003c 4)\n+#define IORING_SEND_VECTORIZED\t\t(1U \u003c\u003c 5)\n \n /*\n * cqe.res for IORING_CQE_F_NOTIF if\n@@ -367,11 +456,13 @@ enum io_uring_op {\n * accept flags stored in sqe-\u003eioprio\n */\n #define IORING_ACCEPT_MULTISHOT\t(1U \u003c\u003c 0)\n+#define IORING_ACCEPT_DONTWAIT\t(1U \u003c\u003c 1)\n+#define IORING_ACCEPT_POLL_FIRST\t(1U \u003c\u003c 2)\n \n /*\n * IORING_OP_MSG_RING command types, stored in sqe-\u003eaddr\n */\n-enum {\n+enum io_uring_msg_ring_flags {\n \tIORING_MSG_DATA,\t/* pass sqe-\u003elen as 'res' and off as user_data */\n \tIORING_MSG_SEND_FD,\t/* send a registered fd to another ring */\n };\n@@ -386,11 +477,30 @@ enum {\n /* Pass through the flags from sqe-\u003efile_index to cqe-\u003eflags */\n #define IORING_MSG_RING_FLAGS_PASS\t(1U \u003c\u003c 1)\n \n+/*\n+ * IORING_OP_FIXED_FD_INSTALL flags (sqe-\u003einstall_fd_flags)\n+ *\n+ * IORING_FIXED_FD_NO_CLOEXEC\tDon't mark the fd as O_CLOEXEC\n+ */\n+#define IORING_FIXED_FD_NO_CLOEXEC\t(1U \u003c\u003c 0)\n+\n+/*\n+ * IORING_OP_NOP flags (sqe-\u003enop_flags)\n+ *\n+ * IORING_NOP_INJECT_RESULT\tInject result from sqe-\u003eresult\n+ */\n+#define IORING_NOP_INJECT_RESULT\t(1U \u003c\u003c 0)\n+#define IORING_NOP_FILE\t\t\t(1U \u003c\u003c 1)\n+#define IORING_NOP_FIXED_FILE\t\t(1U \u003c\u003c 2)\n+#define IORING_NOP_FIXED_BUFFER\t\t(1U \u003c\u003c 3)\n+#define IORING_NOP_TW\t\t\t(1U \u003c\u003c 4)\n+#define IORING_NOP_CQE32\t\t(1U \u003c\u003c 5)\n+\n /*\n * IO completion data structure (Completion Queue Entry)\n */\n struct io_uring_cqe {\n-\t__u64\tuser_data;\t/* sqe-\u003edata submission passed back */\n+\t__u64\tuser_data;\t/* sqe-\u003euser_data value passed back */\n \t__s32\tres;\t\t/* result code for this event */\n \t__u32\tflags;\n \n@@ -409,15 +519,33 @@ struct io_uring_cqe {\n * IORING_CQE_F_SOCK_NONEMPTY\tIf set, more data to read after socket recv\n * IORING_CQE_F_NOTIF\tSet for notification CQEs. Can be used to distinct\n * \t\t\tthem from sends.\n+ * IORING_CQE_F_BUF_MORE If set, the buffer ID set in the completion will get\n+ *\t\t\tmore completions. In other words, the buffer is being\n+ *\t\t\tpartially consumed, and will be used by the kernel for\n+ *\t\t\tmore completions. This is only set for buffers used via\n+ *\t\t\tthe incremental buffer consumption, as provided by\n+ *\t\t\ta ring buffer setup with IOU_PBUF_RING_INC. For any\n+ *\t\t\tother provided buffer type, all completions with a\n+ *\t\t\tbuffer passed back is automatically returned to the\n+ *\t\t\tapplication.\n+ * IORING_CQE_F_SKIP\tIf set, then the application/liburing must ignore this\n+ *\t\t\tCQE. It's only purpose is to fill a gap in the ring,\n+ *\t\t\tif a large CQE is attempted posted when the ring has\n+ *\t\t\tjust a single small CQE worth of space left before\n+ *\t\t\twrapping.\n+ * IORING_CQE_F_32\tIf set, this is a 32b/big-cqe posting. Use with rings\n+ *\t\t\tsetup in a mixed CQE mode, where both 16b and 32b\n+ *\t\t\tCQEs may be posted to the CQ ring.\n */\n #define IORING_CQE_F_BUFFER\t\t(1U \u003c\u003c 0)\n #define IORING_CQE_F_MORE\t\t(1U \u003c\u003c 1)\n #define IORING_CQE_F_SOCK_NONEMPTY\t(1U \u003c\u003c 2)\n #define IORING_CQE_F_NOTIF\t\t(1U \u003c\u003c 3)\n+#define IORING_CQE_F_BUF_MORE\t\t(1U \u003c\u003c 4)\n+#define IORING_CQE_F_SKIP\t\t(1U \u003c\u003c 5)\n+#define IORING_CQE_F_32\t\t\t(1U \u003c\u003c 15)\n \n-enum {\n-\tIORING_CQE_BUFFER_SHIFT\t\t= 16,\n-};\n+#define IORING_CQE_BUFFER_SHIFT\t\t16\n \n /*\n * Magic offsets for the application to mmap the data it needs\n@@ -478,6 +606,9 @@ struct io_cqring_offsets {\n #define IORING_ENTER_SQ_WAIT\t\t(1U \u003c\u003c 2)\n #define IORING_ENTER_EXT_ARG\t\t(1U \u003c\u003c 3)\n #define IORING_ENTER_REGISTERED_RING\t(1U \u003c\u003c 4)\n+#define IORING_ENTER_ABS_TIMER\t\t(1U \u003c\u003c 5)\n+#define IORING_ENTER_EXT_ARG_REG\t(1U \u003c\u003c 6)\n+#define IORING_ENTER_NO_IOWAIT\t\t(1U \u003c\u003c 7)\n \n /*\n * Passed in for io_uring_setup(2). Copied back with updated info on success\n@@ -512,11 +643,15 @@ struct io_uring_params {\n #define IORING_FEAT_CQE_SKIP\t\t(1U \u003c\u003c 11)\n #define IORING_FEAT_LINKED_FILE\t\t(1U \u003c\u003c 12)\n #define IORING_FEAT_REG_REG_RING\t(1U \u003c\u003c 13)\n+#define IORING_FEAT_RECVSEND_BUNDLE\t(1U \u003c\u003c 14)\n+#define IORING_FEAT_MIN_TIMEOUT\t\t(1U \u003c\u003c 15)\n+#define IORING_FEAT_RW_ATTR\t\t(1U \u003c\u003c 16)\n+#define IORING_FEAT_NO_IOWAIT\t\t(1U \u003c\u003c 17)\n \n /*\n * io_uring_register(2) opcodes and arguments\n */\n-enum {\n+enum io_uring_register_op {\n \tIORING_REGISTER_BUFFERS\t\t\t= 0,\n \tIORING_UNREGISTER_BUFFERS\t\t= 1,\n \tIORING_REGISTER_FILES\t\t\t= 2,\n@@ -558,6 +693,38 @@ enum {\n \t/* register a range of fixed file slots for automatic slot allocation */\n \tIORING_REGISTER_FILE_ALLOC_RANGE\t= 25,\n \n+\t/* return status information for a buffer group */\n+\tIORING_REGISTER_PBUF_STATUS\t\t= 26,\n+\n+\t/* set/clear busy poll settings */\n+\tIORING_REGISTER_NAPI\t\t\t= 27,\n+\tIORING_UNREGISTER_NAPI\t\t\t= 28,\n+\n+\tIORING_REGISTER_CLOCK\t\t\t= 29,\n+\n+\t/* clone registered buffers from source ring to current ring */\n+\tIORING_REGISTER_CLONE_BUFFERS\t\t= 30,\n+\n+\t/* send MSG_RING without having a ring */\n+\tIORING_REGISTER_SEND_MSG_RING\t\t= 31,\n+\n+\t/* register a netdev hw rx queue for zerocopy */\n+\tIORING_REGISTER_ZCRX_IFQ\t\t= 32,\n+\n+\t/* resize CQ ring */\n+\tIORING_REGISTER_RESIZE_RINGS\t\t= 33,\n+\n+\tIORING_REGISTER_MEM_REGION\t\t= 34,\n+\n+\t/* query various aspects of io_uring, see linux/io_uring/query.h */\n+\tIORING_REGISTER_QUERY\t\t\t= 35,\n+\n+\t/* auxiliary zcrx configuration, see enum zcrx_ctrl_op */\n+\tIORING_REGISTER_ZCRX_CTRL\t\t= 36,\n+\n+\t/* register bpf filtering programs */\n+\tIORING_REGISTER_BPF_FILTER\t\t= 37,\n+\n \t/* this goes last */\n \tIORING_REGISTER_LAST,\n \n@@ -566,7 +733,7 @@ enum {\n };\n \n /* io-wq worker categories */\n-enum {\n+enum io_wq_type {\n \tIO_WQ_BOUND,\n \tIO_WQ_UNBOUND,\n };\n@@ -578,6 +745,31 @@ struct io_uring_files_update {\n \t__aligned_u64 /* __s32 * */ fds;\n };\n \n+enum {\n+\t/* initialise with user provided memory pointed by user_addr */\n+\tIORING_MEM_REGION_TYPE_USER\t\t= 1,\n+};\n+\n+struct io_uring_region_desc {\n+\t__u64 user_addr;\n+\t__u64 size;\n+\t__u32 flags;\n+\t__u32 id;\n+\t__u64 mmap_offset;\n+\t__u64 __resv[4];\n+};\n+\n+enum {\n+\t/* expose the region as registered wait arguments */\n+\tIORING_MEM_REGION_REG_WAIT_ARG\t\t= 1,\n+};\n+\n+struct io_uring_mem_region_reg {\n+\t__u64 region_uptr; /* struct io_uring_region_desc * */\n+\t__u64 flags;\n+\t__u64 __resv[2];\n+};\n+\n /*\n * Register a fully sparse file space, rather than pass in an array of all\n * -1 file descriptors.\n@@ -638,6 +830,32 @@ struct io_uring_restriction {\n \t__u32 resv2[3];\n };\n \n+struct io_uring_task_restriction {\n+\t__u16 flags;\n+\t__u16 nr_res;\n+\t__u32 resv[3];\n+\t__DECLARE_FLEX_ARRAY(struct io_uring_restriction, restrictions);\n+};\n+\n+struct io_uring_clock_register {\n+\t__u32\tclockid;\n+\t__u32\t__resv[3];\n+};\n+\n+enum {\n+\tIORING_REGISTER_SRC_REGISTERED\t= (1U \u003c\u003c 0),\n+\tIORING_REGISTER_DST_REPLACE\t= (1U \u003c\u003c 1),\n+};\n+\n+struct io_uring_clone_buffers {\n+\t__u32\tsrc_fd;\n+\t__u32\tflags;\n+\t__u32\tsrc_off;\n+\t__u32\tdst_off;\n+\t__u32\tnr;\n+\t__u32\tpad[3];\n+};\n+\n struct io_uring_buf {\n \t__u64\taddr;\n \t__u32\tlen;\n@@ -670,9 +888,17 @@ struct io_uring_buf_ring {\n *\t\t\tmmap(2) with the offset set as:\n *\t\t\tIORING_OFF_PBUF_RING | (bgid \u003c\u003c IORING_OFF_PBUF_SHIFT)\n *\t\t\tto get a virtual mapping for the ring.\n+ * IOU_PBUF_RING_INC:\tIf set, buffers consumed from this buffer ring can be\n+ *\t\t\tconsumed incrementally. Normally one (or more) buffers\n+ *\t\t\tare fully consumed. With incremental consumptions, it's\n+ *\t\t\tfeasible to register big ranges of buffers, and each\n+ *\t\t\tuse of it will consume only as much as it needs. This\n+ *\t\t\trequires that both the kernel and application keep\n+ *\t\t\ttrack of where the current read/recv index is at.\n */\n-enum {\n+enum io_uring_register_pbuf_ring_flags {\n \tIOU_PBUF_RING_MMAP\t= 1,\n+\tIOU_PBUF_RING_INC\t= 2,\n };\n \n /* argument for IORING_(UN)REGISTER_PBUF_RING */\n@@ -681,13 +907,57 @@ struct io_uring_buf_reg {\n \t__u32\tring_entries;\n \t__u16\tbgid;\n \t__u16\tflags;\n-\t__u64\tresv[3];\n+\t__u32\tmin_left;\n+\t__u32\tresv[5];\n+};\n+\n+/* argument for IORING_REGISTER_PBUF_STATUS */\n+struct io_uring_buf_status {\n+\t__u32\tbuf_group;\t/* input */\n+\t__u32\thead;\t\t/* output */\n+\t__u32\tresv[8];\n+};\n+\n+enum io_uring_napi_op {\n+\t/* register/ungister backward compatible opcode */\n+\tIO_URING_NAPI_REGISTER_OP = 0,\n+\n+\t/* opcodes to update napi_list when static tracking is used */\n+\tIO_URING_NAPI_STATIC_ADD_ID = 1,\n+\tIO_URING_NAPI_STATIC_DEL_ID = 2\n+};\n+\n+enum io_uring_napi_tracking_strategy {\n+\t/* value must be 0 for backward compatibility */\n+\tIO_URING_NAPI_TRACKING_DYNAMIC = 0,\n+\tIO_URING_NAPI_TRACKING_STATIC = 1,\n+\tIO_URING_NAPI_TRACKING_INACTIVE = 255\n+};\n+\n+/* argument for IORING_(UN)REGISTER_NAPI */\n+struct io_uring_napi {\n+\t__u32\tbusy_poll_to;\n+\t__u8\tprefer_busy_poll;\n+\n+\t/* a io_uring_napi_op value */\n+\t__u8\topcode;\n+\t__u8\tpad[2];\n+\n+\t/*\n+\t * for IO_URING_NAPI_REGISTER_OP, it is a\n+\t * io_uring_napi_tracking_strategy value.\n+\t *\n+\t * for IO_URING_NAPI_STATIC_ADD_ID/IO_URING_NAPI_STATIC_DEL_ID\n+\t * it is the napi id to add/del from napi_list.\n+\t */\n+\t__u32\top_param;\n+\t__u32\tresv;\n };\n \n /*\n * io_uring_restriction-\u003eopcode values\n */\n-enum {\n+enum io_uring_register_restriction_op {\n \t/* Allow an io_uring_register(2) opcode */\n \tIORING_RESTRICTION_REGISTER_OP\t\t= 0,\n \n@@ -703,10 +973,33 @@ enum {\n \tIORING_RESTRICTION_LAST\n };\n \n+enum {\n+\tIORING_REG_WAIT_TS\t\t= (1U \u003c\u003c 0),\n+};\n+\n+/*\n+ * Argument for io_uring_enter(2) with\n+ * IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument\n+ * is an index into a previously registered fixed wait region described by\n+ * the below structure.\n+ */\n+struct io_uring_reg_wait {\n+\tstruct __kernel_timespec\tts;\n+\t__u32\t\t\t\tmin_wait_usec;\n+\t__u32\t\t\t\tflags;\n+\t__u64\t\t\t\tsigmask;\n+\t__u32\t\t\t\tsigmask_sz;\n+\t__u32\t\t\t\tpad[3];\n+\t__u64\t\t\t\tpad2[2];\n+};\n+\n+/*\n+ * Argument for io_uring_enter(2) with IORING_GETEVENTS | IORING_ENTER_EXT_ARG\n+ */\n struct io_uring_getevents_arg {\n \t__u64\tsigmask;\n \t__u32\tsigmask_sz;\n-\t__u32\tpad;\n+\t__u32\tmin_wait_usec;\n \t__u64\tts;\n };\n \n@@ -743,11 +1036,28 @@ struct io_uring_recvmsg_out {\n /*\n * Argument for IORING_OP_URING_CMD when file is a socket\n */\n-enum {\n+enum io_uring_socket_op {\n \tSOCKET_URING_OP_SIOCINQ\t\t= 0,\n \tSOCKET_URING_OP_SIOCOUTQ,\n \tSOCKET_URING_OP_GETSOCKOPT,\n \tSOCKET_URING_OP_SETSOCKOPT,\n+\tSOCKET_URING_OP_TX_TIMESTAMP,\n+\tSOCKET_URING_OP_GETSOCKNAME,\n+};\n+\n+/*\n+ * SOCKET_URING_OP_TX_TIMESTAMP definitions\n+ */\n+\n+#define IORING_TIMESTAMP_HW_SHIFT\t16\n+/* The cqe-\u003eflags bit from which the timestamp type is stored */\n+#define IORING_TIMESTAMP_TYPE_SHIFT\t(IORING_TIMESTAMP_HW_SHIFT + 1)\n+/* The cqe-\u003eflags flag signifying whether it's a hardware timestamp */\n+#define IORING_CQE_F_TSTAMP_HW\t\t((__u32)1 \u003c\u003c IORING_TIMESTAMP_HW_SHIFT)\n+\n+struct io_timespec {\n+\t__u64\t\ttv_sec;\n+\t__u64\t\ttv_nsec;\n };\n \n #ifdef __cplusplus\n"
} |
| 2/1 | 2026/09/20 12:16 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"IO_URING"
],
"FocusSymbols": [
"io_fremovexattr_prep",
"io_fremovexattr",
"io_flistxattr_prep",
"io_flistxattr",
"file_removexattr",
"file_listxattr"
],
"Reasoning": "The patch introduces two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes fs/xattr.c functions file_removexattr() and file_listxattr() to io_uring and implements prep and issue handlers with user input validation, memory allocation, and asynchronous execution in io_uring/xattr.c. This reachable core subsystem functionality is fully testable and worth fuzzing.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 42baea3a0d1118620152da23c58db443974630c5
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Sep 20 12:16:14 2026 +0000
syz-cluster: applied patch under review
diff --git a/fs/internal.h b/fs/internal.h
index c658c8a5ebd56..ff7344ac8cefa 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -298,6 +298,8 @@ int filename_setxattr(int dfd, struct filename *filename,
unsigned int lookup_flags, struct kernel_xattr_ctx *ctx);
int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);
int import_xattr_name(struct xattr_name *kname, const char __user *name);
+ssize_t file_listxattr(struct file *f, char __user *list, size_t size);
+int file_removexattr(struct file *f, struct xattr_name *kname);
int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode);
diff --git a/fs/xattr.c b/fs/xattr.c
index d589791152007..31b8a5eeec1e8 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -953,7 +953,6 @@ listxattr(struct dentry *d, char __user *list, size_t size)
return error;
}
-static
ssize_t file_listxattr(struct file *f, char __user *list, size_t size)
{
audit_file(f);
@@ -1036,7 +1035,7 @@ removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)
return vfs_removexattr(idmap, d, name);
}
-static int file_removexattr(struct file *f, struct xattr_name *kname)
+int file_removexattr(struct file *f, struct xattr_name *kname)
{
int error = mnt_want_write_file(f);
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 909fb7aea638e..45de6dd6e3c4e 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -318,6 +318,8 @@ enum io_uring_op {
IORING_OP_PIPE,
IORING_OP_NOP128,
IORING_OP_URING_CMD128,
+ IORING_OP_FREMOVEXATTR,
+ IORING_OP_FLISTXATTR,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -426,7 +428,7 @@ enum io_uring_op {
* IORING_RECVSEND_BUNDLE Used with IOSQE_BUFFER_SELECT. If set, send or
* recv will grab as many buffers from the buffer
* group ID given and send them all. The completion
- * result will be the number of buffers send, with
+ * result will be the number of buffers send, with
* the starting buffer ID in cqe->flags as per
* usual for provided buffer usage. The buffers
* will be contiguous from the starting buffer ID.
diff --git a/io_uring/opdef.c b/io_uring/opdef.c
index cf3aa2242cd76..14a511f7a9df5 100644
--- a/io_uring/opdef.c
+++ b/io_uring/opdef.c
@@ -591,6 +591,16 @@ const struct io_issue_def io_issue_defs[] = {
.prep = io_uring_cmd_prep,
.issue = io_uring_cmd,
},
+ [IORING_OP_FREMOVEXATTR] = {
+ .needs_file = 1,
+ .prep = io_fremovexattr_prep,
+ .issue = io_fremovexattr,
+ },
+ [IORING_OP_FLISTXATTR] = {
+ .needs_file = 1,
+ .prep = io_flistxattr_prep,
+ .issue = io_flistxattr,
+ },
};
const struct io_cold_def io_cold_defs[] = {
@@ -849,6 +859,14 @@ const struct io_cold_def io_cold_defs[] = {
.sqe_copy = io_uring_cmd_sqe_copy,
.cleanup = io_uring_cmd_cleanup,
},
+ [IORING_OP_FREMOVEXATTR] = {
+ .name = "FREMOVEXATTR",
+ .cleanup = io_xattr_cleanup,
+ },
+ [IORING_OP_FLISTXATTR] = {
+ .name = "FLISTXATTR",
+ .cleanup = io_xattr_cleanup,
+ },
};
const char *io_uring_get_opcode(u8 opcode)
diff --git a/io_uring/xattr.c b/io_uring/xattr.c
index 5303df3f247f4..f2d6b19040589 100644
--- a/io_uring/xattr.c
+++ b/io_uring/xattr.c
@@ -195,3 +195,86 @@ int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)
io_xattr_finish(req, ret);
return IOU_COMPLETE;
}
+
+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ const char __user *name;
+ int ret;
+
+ INIT_DELAYED_FILENAME(&ix->filename);
+ ix->ctx.kname = NULL;
+ ix->ctx.kvalue = NULL;
+
+ if (READ_ONCE(sqe->off) || READ_ONCE(sqe->addr2) || READ_ONCE(sqe->len) ||
+ READ_ONCE(sqe->xattr_flags) || READ_ONCE(sqe->buf_index) ||
+ READ_ONCE(sqe->splice_fd_in) || READ_ONCE(sqe->addr3) ||
+ READ_ONCE(sqe->__pad2[0]))
+ return -EINVAL;
+
+ name = u64_to_user_ptr(READ_ONCE(sqe->addr));
+
+ ix->ctx.kname = kmalloc_obj(*ix->ctx.kname);
+ if (!ix->ctx.kname)
+ return -ENOMEM;
+
+ ret = import_xattr_name(ix->ctx.kname, name);
+ if (ret) {
+ kfree(ix->ctx.kname);
+ ix->ctx.kname = NULL;
+ return ret;
+ }
+
+ req->flags |= REQ_F_NEED_CLEANUP;
+ req->flags |= REQ_F_FORCE_ASYNC;
+ return 0;
+}
+
+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ int ret;
+
+ WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK);
+
+ ret = file_removexattr(req->file, ix->ctx.kname);
+ io_xattr_finish(req, ret);
+ return IOU_COMPLETE;
+}
+
+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+
+ INIT_DELAYED_FILENAME(&ix->filename);
+ ix->ctx.kname = NULL;
+ ix->ctx.kvalue = NULL;
+
+ if (READ_ONCE(sqe->addr) || READ_ONCE(sqe->off) ||
+ READ_ONCE(sqe->buf_index) || READ_ONCE(sqe->splice_fd_in) ||
+ READ_ONCE(sqe->addr3) || READ_ONCE(sqe->__pad2[0]))
+ return -EINVAL;
+
+ ix->ctx.value = u64_to_user_ptr(READ_ONCE(sqe->addr2));
+ ix->ctx.size = READ_ONCE(sqe->len);
+ ix->ctx.flags = READ_ONCE(sqe->xattr_flags);
+
+ if (ix->ctx.flags)
+ return -EINVAL;
+
+ req->flags |= REQ_F_NEED_CLEANUP;
+ req->flags |= REQ_F_FORCE_ASYNC;
+ return 0;
+}
+
+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ int ret;
+
+ WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK);
+
+ ret = file_listxattr(req->file, ix->ctx.value, ix->ctx.size);
+ io_xattr_finish(req, ret);
+ return IOU_COMPLETE;
+}
diff --git a/io_uring/xattr.h b/io_uring/xattr.h
index 9b459d2ae90c5..d2487b49a5d21 100644
--- a/io_uring/xattr.h
+++ b/io_uring/xattr.h
@@ -13,3 +13,9 @@ int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags);
int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
int io_getxattr(struct io_kiocb *req, unsigned int issue_flags);
+
+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags);
+
+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags);
diff --git a/tools/include/uapi/linux/io_uring.h b/tools/include/uapi/linux/io_uring.h
index f1c16f8177420..45de6dd6e3c4e 100644
--- a/tools/include/uapi/linux/io_uring.h
+++ b/tools/include/uapi/linux/io_uring.h
@@ -10,6 +10,8 @@
#include <linux/fs.h>
#include <linux/types.h>
+#include <linux/io_uring/zcrx.h>
+
/*
* this file is shared with liburing and that has to autodetect
* if linux/time_types.h is available or not, it can
@@ -50,7 +52,7 @@ struct io_uring_sqe {
};
__u32 len; /* buffer size or number of iovecs */
union {
- __kernel_rwf_t rw_flags;
+ __u32 rw_flags;
__u32 fsync_flags;
__u16 poll_events; /* compatibility */
__u32 poll32_events; /* word-reversed for BE */
@@ -71,6 +73,9 @@ struct io_uring_sqe {
__u32 uring_cmd_flags;
__u32 waitid_flags;
__u32 futex_flags;
+ __u32 install_fd_flags;
+ __u32 nop_flags;
+ __u32 pipe_flags;
};
__u64 user_data; /* data to be passed back at completion time */
/* pack this to avoid bogus arm OABI complaints */
@@ -85,17 +90,26 @@ struct io_uring_sqe {
union {
__s32 splice_fd_in;
__u32 file_index;
+ __u32 zcrx_ifq_idx;
__u32 optlen;
struct {
__u16 addr_len;
__u16 __pad3[1];
};
+ struct {
+ __u8 write_stream;
+ __u8 __pad4[3];
+ };
};
union {
struct {
__u64 addr3;
__u64 __pad2[1];
};
+ struct {
+ __u64 attr_ptr; /* pointer to attribute information */
+ __u64 attr_type_mask; /* bit mask of attributes */
+ };
__u64 optval;
/*
* If the ring is initialized with IORING_SETUP_SQE128, then
@@ -105,6 +119,18 @@ struct io_uring_sqe {
};
};
+/* sqe->attr_type_mask flags */
+#define IORING_RW_ATTR_FLAG_PI (1U << 0)
+/* PI attribute information */
+struct io_uring_attr_pi {
+ __u16 flags;
+ __u16 app_tag;
+ __u32 len;
+ __u64 addr;
+ __u64 seed;
+ __u64 rsvd;
+};
+
/*
* If sqe->file_index is set to this for opcodes that instantiate a new
* direct descriptor (like openat/openat2/accept), then io_uring will allocate
@@ -114,7 +140,7 @@ struct io_uring_sqe {
*/
#define IORING_FILE_INDEX_ALLOC (~0U)
-enum {
+enum io_uring_sqe_flags_bit {
IOSQE_FIXED_FILE_BIT,
IOSQE_IO_DRAIN_BIT,
IOSQE_IO_LINK_BIT,
@@ -164,7 +190,8 @@ enum {
/*
* If COOP_TASKRUN is set, get notified if task work is available for
* running and a kernel transition would be needed to run it. This sets
- * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
+ * IORING_SQ_TASKRUN in the sq ring flags. Not valid without COOP_TASKRUN
+ * or DEFER_TASKRUN.
*/
#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
@@ -198,6 +225,33 @@ enum {
*/
#define IORING_SETUP_NO_SQARRAY (1U << 16)
+/* Use hybrid poll in iopoll process */
+#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
+
+/*
+ * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have
+ * IORING_CQE_F_32 set in cqe->flags.
+ */
+#define IORING_SETUP_CQE_MIXED (1U << 18)
+
+/*
+ * Allow both 64b and 128b SQEs. If a 128b SQE is posted, it will have
+ * a 128b opcode.
+ */
+#define IORING_SETUP_SQE_MIXED (1U << 19)
+
+/*
+ * When set, io_uring ignores SQ head and tail and fetches SQEs to submit
+ * starting from index 0 instead from the index stored in the head pointer.
+ * IOW, the user should place all SQE at the beginning of the SQ memory
+ * before issuing a submission syscall.
+ *
+ * It requires IORING_SETUP_NO_SQARRAY and is incompatible with
+ * IORING_SETUP_SQPOLL. The user must also never change the SQ head and tail
+ * values and keep it set to 0. Any other value is undefined behaviour.
+ */
+#define IORING_SETUP_SQ_REWIND (1U << 20)
+
enum io_uring_op {
IORING_OP_NOP,
IORING_OP_READV,
@@ -253,6 +307,19 @@ enum io_uring_op {
IORING_OP_FUTEX_WAIT,
IORING_OP_FUTEX_WAKE,
IORING_OP_FUTEX_WAITV,
+ IORING_OP_FIXED_FD_INSTALL,
+ IORING_OP_FTRUNCATE,
+ IORING_OP_BIND,
+ IORING_OP_LISTEN,
+ IORING_OP_RECV_ZC,
+ IORING_OP_EPOLL_WAIT,
+ IORING_OP_READV_FIXED,
+ IORING_OP_WRITEV_FIXED,
+ IORING_OP_PIPE,
+ IORING_OP_NOP128,
+ IORING_OP_URING_CMD128,
+ IORING_OP_FREMOVEXATTR,
+ IORING_OP_FLISTXATTR,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -262,9 +329,13 @@ enum io_uring_op {
* sqe->uring_cmd_flags top 8bits aren't available for userspace
* IORING_URING_CMD_FIXED use registered buffer; pass this flag
* along with setting sqe->buf_index.
+ * IORING_URING_CMD_MULTISHOT must be used with buffer select, like other
+ * multishot commands. Not compatible with
+ * IORING_URING_CMD_FIXED, for now.
*/
#define IORING_URING_CMD_FIXED (1U << 0)
-#define IORING_URING_CMD_MASK IORING_URING_CMD_FIXED
+#define IORING_URING_CMD_MULTISHOT (1U << 1)
+#define IORING_URING_CMD_MASK (IORING_URING_CMD_FIXED | IORING_URING_CMD_MULTISHOT)
/*
@@ -274,6 +345,10 @@ enum io_uring_op {
/*
* sqe->timeout_flags
+ *
+ * IORING_TIMEOUT_IMMEDIATE_ARG: If set, sqe->addr stores the timeout
+ * value in nanoseconds instead of
+ * pointing to a timespec.
*/
#define IORING_TIMEOUT_ABS (1U << 0)
#define IORING_TIMEOUT_UPDATE (1U << 1)
@@ -282,6 +357,7 @@ enum io_uring_op {
#define IORING_LINK_TIMEOUT_UPDATE (1U << 4)
#define IORING_TIMEOUT_ETIME_SUCCESS (1U << 5)
#define IORING_TIMEOUT_MULTISHOT (1U << 6)
+#define IORING_TIMEOUT_IMMEDIATE_ARG (1U << 7)
#define IORING_TIMEOUT_CLOCK_MASK (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)
#define IORING_TIMEOUT_UPDATE_MASK (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE)
/*
@@ -348,11 +424,24 @@ enum io_uring_op {
* 0 is reported if zerocopy was actually possible.
* IORING_NOTIF_USAGE_ZC_COPIED if data was copied
* (at least partially).
+ *
+ * IORING_RECVSEND_BUNDLE Used with IOSQE_BUFFER_SELECT. If set, send or
+ * recv will grab as many buffers from the buffer
+ * group ID given and send them all. The completion
+ * result will be the number of buffers send, with
+ * the starting buffer ID in cqe->flags as per
+ * usual for provided buffer usage. The buffers
+ * will be contiguous from the starting buffer ID.
+ *
+ * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec
+ * to allow vectorized send operations.
*/
#define IORING_RECVSEND_POLL_FIRST (1U << 0)
#define IORING_RECV_MULTISHOT (1U << 1)
#define IORING_RECVSEND_FIXED_BUF (1U << 2)
#define IORING_SEND_ZC_REPORT_USAGE (1U << 3)
+#define IORING_RECVSEND_BUNDLE (1U << 4)
+#define IORING_SEND_VECTORIZED (1U << 5)
/*
* cqe.res for IORING_CQE_F_NOTIF if
@@ -367,11 +456,13 @@ enum io_uring_op {
* accept flags stored in sqe->ioprio
*/
#define IORING_ACCEPT_MULTISHOT (1U << 0)
+#define IORING_ACCEPT_DONTWAIT (1U << 1)
+#define IORING_ACCEPT_POLL_FIRST (1U << 2)
/*
* IORING_OP_MSG_RING command types, stored in sqe->addr
*/
-enum {
+enum io_uring_msg_ring_flags {
IORING_MSG_DATA, /* pass sqe->len as 'res' and off as user_data */
IORING_MSG_SEND_FD, /* send a registered fd to another ring */
};
@@ -386,11 +477,30 @@ enum {
/* Pass through the flags from sqe->file_index to cqe->flags */
#define IORING_MSG_RING_FLAGS_PASS (1U << 1)
+/*
+ * IORING_OP_FIXED_FD_INSTALL flags (sqe->install_fd_flags)
+ *
+ * IORING_FIXED_FD_NO_CLOEXEC Don't mark the fd as O_CLOEXEC
+ */
+#define IORING_FIXED_FD_NO_CLOEXEC (1U << 0)
+
+/*
+ * IORING_OP_NOP flags (sqe->nop_flags)
+ *
+ * IORING_NOP_INJECT_RESULT Inject result from sqe->result
+ */
+#define IORING_NOP_INJECT_RESULT (1U << 0)
+#define IORING_NOP_FILE (1U << 1)
+#define IORING_NOP_FIXED_FILE (1U << 2)
+#define IORING_NOP_FIXED_BUFFER (1U << 3)
+#define IORING_NOP_TW (1U << 4)
+#define IORING_NOP_CQE32 (1U << 5)
+
/*
* IO completion data structure (Completion Queue Entry)
*/
struct io_uring_cqe {
- __u64 user_data; /* sqe->data submission passed back */
+ __u64 user_data; /* sqe->user_data value passed back */
__s32 res; /* result code for this event */
__u32 flags;
@@ -409,15 +519,33 @@ struct io_uring_cqe {
* IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv
* IORING_CQE_F_NOTIF Set for notification CQEs. Can be used to distinct
* them from sends.
+ * IORING_CQE_F_BUF_MORE If set, the buffer ID set in the completion will get
+ * more completions. In other words, the buffer is being
+ * partially consumed, and will be used by the kernel for
+ * more completions. This is only set for buffers used via
+ * the incremental buffer consumption, as provided by
+ * a ring buffer setup with IOU_PBUF_RING_INC. For any
+ * other provided buffer type, all completions with a
+ * buffer passed back is automatically returned to the
+ * application.
+ * IORING_CQE_F_SKIP If set, then the application/liburing must ignore this
+ * CQE. It's only purpose is to fill a gap in the ring,
+ * if a large CQE is attempted posted when the ring has
+ * just a single small CQE worth of space left before
+ * wrapping.
+ * IORING_CQE_F_32 If set, this is a 32b/big-cqe posting. Use with rings
+ * setup in a mixed CQE mode, where both 16b and 32b
+ * CQEs may be posted to the CQ ring.
*/
#define IORING_CQE_F_BUFFER (1U << 0)
#define IORING_CQE_F_MORE (1U << 1)
#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
#define IORING_CQE_F_NOTIF (1U << 3)
+#define IORING_CQE_F_BUF_MORE (1U << 4)
+#define IORING_CQE_F_SKIP (1U << 5)
+#define IORING_CQE_F_32 (1U << 15)
-enum {
- IORING_CQE_BUFFER_SHIFT = 16,
-};
+#define IORING_CQE_BUFFER_SHIFT 16
/*
* Magic offsets for the application to mmap the data it needs
@@ -478,6 +606,9 @@ struct io_cqring_offsets {
#define IORING_ENTER_SQ_WAIT (1U << 2)
#define IORING_ENTER_EXT_ARG (1U << 3)
#define IORING_ENTER_REGISTERED_RING (1U << 4)
+#define IORING_ENTER_ABS_TIMER (1U << 5)
+#define IORING_ENTER_EXT_ARG_REG (1U << 6)
+#define IORING_ENTER_NO_IOWAIT (1U << 7)
/*
* Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -512,11 +643,15 @@ struct io_uring_params {
#define IORING_FEAT_CQE_SKIP (1U << 11)
#define IORING_FEAT_LINKED_FILE (1U << 12)
#define IORING_FEAT_REG_REG_RING (1U << 13)
+#define IORING_FEAT_RECVSEND_BUNDLE (1U << 14)
+#define IORING_FEAT_MIN_TIMEOUT (1U << 15)
+#define IORING_FEAT_RW_ATTR (1U << 16)
+#define IORING_FEAT_NO_IOWAIT (1U << 17)
/*
* io_uring_register(2) opcodes and arguments
*/
-enum {
+enum io_uring_register_op {
IORING_REGISTER_BUFFERS = 0,
IORING_UNREGISTER_BUFFERS = 1,
IORING_REGISTER_FILES = 2,
@@ -558,6 +693,38 @@ enum {
/* register a range of fixed file slots for automatic slot allocation */
IORING_REGISTER_FILE_ALLOC_RANGE = 25,
+ /* return status information for a buffer group */
+ IORING_REGISTER_PBUF_STATUS = 26,
+
+ /* set/clear busy poll settings */
+ IORING_REGISTER_NAPI = 27,
+ IORING_UNREGISTER_NAPI = 28,
+
+ IORING_REGISTER_CLOCK = 29,
+
+ /* clone registered buffers from source ring to current ring */
+ IORING_REGISTER_CLONE_BUFFERS = 30,
+
+ /* send MSG_RING without having a ring */
+ IORING_REGISTER_SEND_MSG_RING = 31,
+
+ /* register a netdev hw rx queue for zerocopy */
+ IORING_REGISTER_ZCRX_IFQ = 32,
+
+ /* resize CQ ring */
+ IORING_REGISTER_RESIZE_RINGS = 33,
+
+ IORING_REGISTER_MEM_REGION = 34,
+
+ /* query various aspects of io_uring, see linux/io_uring/query.h */
+ IORING_REGISTER_QUERY = 35,
+
+ /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
+ IORING_REGISTER_ZCRX_CTRL = 36,
+
+ /* register bpf filtering programs */
+ IORING_REGISTER_BPF_FILTER = 37,
+
/* this goes last */
IORING_REGISTER_LAST,
@@ -566,7 +733,7 @@ enum {
};
/* io-wq worker categories */
-enum {
+enum io_wq_type {
IO_WQ_BOUND,
IO_WQ_UNBOUND,
};
@@ -578,6 +745,31 @@ struct io_uring_files_update {
__aligned_u64 /* __s32 * */ fds;
};
+enum {
+ /* initialise with user provided memory pointed by user_addr */
+ IORING_MEM_REGION_TYPE_USER = 1,
+};
+
+struct io_uring_region_desc {
+ __u64 user_addr;
+ __u64 size;
+ __u32 flags;
+ __u32 id;
+ __u64 mmap_offset;
+ __u64 __resv[4];
+};
+
+enum {
+ /* expose the region as registered wait arguments */
+ IORING_MEM_REGION_REG_WAIT_ARG = 1,
+};
+
+struct io_uring_mem_region_reg {
+ __u64 region_uptr; /* struct io_uring_region_desc * */
+ __u64 flags;
+ __u64 __resv[2];
+};
+
/*
* Register a fully sparse file space, rather than pass in an array of all
* -1 file descriptors.
@@ -638,6 +830,32 @@ struct io_uring_restriction {
__u32 resv2[3];
};
+struct io_uring_task_restriction {
+ __u16 flags;
+ __u16 nr_res;
+ __u32 resv[3];
+ __DECLARE_FLEX_ARRAY(struct io_uring_restriction, restrictions);
+};
+
+struct io_uring_clock_register {
+ __u32 clockid;
+ __u32 __resv[3];
+};
+
+enum {
+ IORING_REGISTER_SRC_REGISTERED = (1U << 0),
+ IORING_REGISTER_DST_REPLACE = (1U << 1),
+};
+
+struct io_uring_clone_buffers {
+ __u32 src_fd;
+ __u32 flags;
+ __u32 src_off;
+ __u32 dst_off;
+ __u32 nr;
+ __u32 pad[3];
+};
+
struct io_uring_buf {
__u64 addr;
__u32 len;
@@ -670,9 +888,17 @@ struct io_uring_buf_ring {
* mmap(2) with the offset set as:
* IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT)
* to get a virtual mapping for the ring.
+ * IOU_PBUF_RING_INC: If set, buffers consumed from this buffer ring can be
+ * consumed incrementally. Normally one (or more) buffers
+ * are fully consumed. With incremental consumptions, it's
+ * feasible to register big ranges of buffers, and each
+ * use of it will consume only as much as it needs. This
+ * requires that both the kernel and application keep
+ * track of where the current read/recv index is at.
*/
-enum {
+enum io_uring_register_pbuf_ring_flags {
IOU_PBUF_RING_MMAP = 1,
+ IOU_PBUF_RING_INC = 2,
};
/* argument for IORING_(UN)REGISTER_PBUF_RING */
@@ -681,13 +907,57 @@ struct io_uring_buf_reg {
__u32 ring_entries;
__u16 bgid;
__u16 flags;
- __u64 resv[3];
+ __u32 min_left;
+ __u32 resv[5];
+};
+
+/* argument for IORING_REGISTER_PBUF_STATUS */
+struct io_uring_buf_status {
+ __u32 buf_group; /* input */
+ __u32 head; /* output */
+ __u32 resv[8];
+};
+
+enum io_uring_napi_op {
+ /* register/ungister backward compatible opcode */
+ IO_URING_NAPI_REGISTER_OP = 0,
+
+ /* opcodes to update napi_list when static tracking is used */
+ IO_URING_NAPI_STATIC_ADD_ID = 1,
+ IO_URING_NAPI_STATIC_DEL_ID = 2
+};
+
+enum io_uring_napi_tracking_strategy {
+ /* value must be 0 for backward compatibility */
+ IO_URING_NAPI_TRACKING_DYNAMIC = 0,
+ IO_URING_NAPI_TRACKING_STATIC = 1,
+ IO_URING_NAPI_TRACKING_INACTIVE = 255
+};
+
+/* argument for IORING_(UN)REGISTER_NAPI */
+struct io_uring_napi {
+ __u32 busy_poll_to;
+ __u8 prefer_busy_poll;
+
+ /* a io_uring_napi_op value */
+ __u8 opcode;
+ __u8 pad[2];
+
+ /*
+ * for IO_URING_NAPI_REGISTER_OP, it is a
+ * io_uring_napi_tracking_strategy value.
+ *
+ * for IO_URING_NAPI_STATIC_ADD_ID/IO_URING_NAPI_STATIC_DEL_ID
+ * it is the napi id to add/del from napi_list.
+ */
+ __u32 op_param;
+ __u32 resv;
};
/*
* io_uring_restriction->opcode values
*/
-enum {
+enum io_uring_register_restriction_op {
/* Allow an io_uring_register(2) opcode */
IORING_RESTRICTION_REGISTER_OP = 0,
@@ -703,10 +973,33 @@ enum {
IORING_RESTRICTION_LAST
};
+enum {
+ IORING_REG_WAIT_TS = (1U << 0),
+};
+
+/*
+ * Argument for io_uring_enter(2) with
+ * IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument
+ * is an index into a previously registered fixed wait region described by
+ * the below structure.
+ */
+struct io_uring_reg_wait {
+ struct __kernel_timespec ts;
+ __u32 min_wait_usec;
+ __u32 flags;
+ __u64 sigmask;
+ __u32 sigmask_sz;
+ __u32 pad[3];
+ __u64 pad2[2];
+};
+
+/*
+ * Argument for io_uring_enter(2) with IORING_GETEVENTS | IORING_ENTER_EXT_ARG
+ */
struct io_uring_getevents_arg {
__u64 sigmask;
__u32 sigmask_sz;
- __u32 pad;
+ __u32 min_wait_usec;
__u64 ts;
};
@@ -743,11 +1036,28 @@ struct io_uring_recvmsg_out {
/*
* Argument for IORING_OP_URING_CMD when file is a socket
*/
-enum {
+enum io_uring_socket_op {
SOCKET_URING_OP_SIOCINQ = 0,
SOCKET_URING_OP_SIOCOUTQ,
SOCKET_URING_OP_GETSOCKOPT,
SOCKET_URING_OP_SETSOCKOPT,
+ SOCKET_URING_OP_TX_TIMESTAMP,
+ SOCKET_URING_OP_GETSOCKNAME,
+};
+
+/*
+ * SOCKET_URING_OP_TX_TIMESTAMP definitions
+ */
+
+#define IORING_TIMESTAMP_HW_SHIFT 16
+/* The cqe->flags bit from which the timestamp type is stored */
+#define IORING_TIMESTAMP_TYPE_SHIFT (IORING_TIMESTAMP_HW_SHIFT + 1)
+/* The cqe->flags flag signifying whether it's a hardware timestamp */
+#define IORING_CQE_F_TSTAMP_HW ((__u32)1 << IORING_TIMESTAMP_HW_SHIFT)
+
+struct io_timespec {
+ __u64 tv_sec;
+ __u64 tv_nsec;
};
#ifdef __cplusplus
|
| 3/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12722 output: 20 thoughts: 385 Thoughts: **Analyzing this Patch Series** Okay, let's break this down. First, I need to understand what this patch series is actually *doing*. The commit diff shows some clear areas of modification. * `fs/internal.h` and `fs/xattr.c` look like they're the core of the change, with `file_listxattr` and `file_removexattr` being exposed and the static qualifiers removed, which is interesting. It indicates we're making these functions accessible from outside their original scope, which likely enables something in the io\_uring subsystem. * `include/uapi/linux/io_uring.h` and `io_uring/opdef.c` and `io_uring/xattr.c` are clearly the io\_uring side of this. We're adding new opcodes: `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`, and their corresponding prep and execution functions, as well as declarations in `io_uring/xattr.h`. Looks like these are for *file* extended attribute operations, based on the function names. * Now, I see a significant change in the `tools/include/uapi/linux/io_uring.h` which is the userspace header copy. That's a critical synchronization point. We need to make sure the userspace definitions align with the kernel. So, the core of it seems to be exposing xattr operations on files through io\_uring. Now I need to dive into the code itself and check any Kconfig requirements to get a clear picture of how this impacts the broader system and what dependencies are at play. Let's see if this looks correct. |
| 4/2 | 2026/09/20 12:16 | tool | grepper |
0mArgs:{
"Expression": "io_fremovexattr"
}Results: {
"Output": "io_uring/opdef.c=54=const struct io_issue_def io_issue_defs[] = {\n--\nio_uring/opdef.c-595-\t\t.needs_file\t\t= 1,\nio_uring/opdef.c:596:\t\t.prep\t\t\t= io_fremovexattr_prep,\nio_uring/opdef.c:597:\t\t.issue\t\t\t= io_fremovexattr,\nio_uring/opdef.c-598-\t},\n--\nio_uring/xattr.c=186=int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/xattr.c-198-\nio_uring/xattr.c:199:int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-200-{\n--\nio_uring/xattr.c-232-\nio_uring/xattr.c:233:int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-234-{\n--\nio_uring/xattr.h=15=int io_getxattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-16-\nio_uring/xattr.h:17:int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:18:int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-19-\n"
} |
| 5/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 13955 output: 25 thoughts: 23 Thoughts: Here's my analysis of the provided text, rendered in the first person, assuming I'm an expert in systems programming and kernel internals: **Diving into the io_uring Makefile** Okay, so the prompt is to understand how `io_uring/xattr.c` gets compiled within the broader `io_uring` context. My first instinct, as always, is to navigate to the `io_uring/Makefile`. I need to see the dependencies, compiler flags, and any conditional logic that governs the build process for that specific C file. I'm looking for clues about the object file's name, the include paths, and linking process to confirm assumptions and determine potential areas for optimization or modification. This includes verifying whether it is built into the main io_uring library or treated as a separate module. This is just the first step. |
| 6/2 | 2026/09/20 12:16 | tool | grepper |
0mArgs:{
"Expression": "xattr",
"PathPrefix": "io_uring"
}Results: {
"Output": "io_uring/Makefile=9=obj-$(CONFIG_IO_URING)\t\t+= io_uring.o opdef.o kbuf.o rsrc.o notif.o \\\n--\nio_uring/Makefile-11-\t\t\t\t\ttw.o wait.o eventfd.o uring_cmd.o \\\nio_uring/Makefile:12:\t\t\t\t\topenclose.o sqpoll.o xattr.o nop.o \\\nio_uring/Makefile-13-\t\t\t\t\tfs.o splice.o sync.o msg_ring.o \\\n--\nio_uring/io_uring.c=3280=static int __init io_uring_init(void)\n--\nio_uring/io_uring.c-3327-\tBUILD_BUG_SQE_ELEM(28, __u32, hardlink_flags);\nio_uring/io_uring.c:3328:\tBUILD_BUG_SQE_ELEM(28, __u32, xattr_flags);\nio_uring/io_uring.c-3329-\tBUILD_BUG_SQE_ELEM(28, __u32, msg_ring_flags);\n--\nio_uring/opdef.c-20-\nio_uring/opdef.c:21:#include \"xattr.h\"\nio_uring/opdef.c-22-#include \"nop.h\"\n--\nio_uring/opdef.c=54=const struct io_issue_def io_issue_defs[] = {\n--\nio_uring/opdef.c-389-\t\t.needs_file = 1,\nio_uring/opdef.c:390:\t\t.prep\t\t\t= io_fsetxattr_prep,\nio_uring/opdef.c:391:\t\t.issue\t\t\t= io_fsetxattr,\nio_uring/opdef.c-392-\t},\nio_uring/opdef.c-393-\t[IORING_OP_SETXATTR] = {\nio_uring/opdef.c:394:\t\t.prep\t\t\t= io_setxattr_prep,\nio_uring/opdef.c:395:\t\t.issue\t\t\t= io_setxattr,\nio_uring/opdef.c-396-\t},\n--\nio_uring/opdef.c-398-\t\t.needs_file = 1,\nio_uring/opdef.c:399:\t\t.prep\t\t\t= io_fgetxattr_prep,\nio_uring/opdef.c:400:\t\t.issue\t\t\t= io_fgetxattr,\nio_uring/opdef.c-401-\t},\nio_uring/opdef.c-402-\t[IORING_OP_GETXATTR] = {\nio_uring/opdef.c:403:\t\t.prep\t\t\t= io_getxattr_prep,\nio_uring/opdef.c:404:\t\t.issue\t\t\t= io_getxattr,\nio_uring/opdef.c-405-\t},\n--\nio_uring/opdef.c-595-\t\t.needs_file\t\t= 1,\nio_uring/opdef.c:596:\t\t.prep\t\t\t= io_fremovexattr_prep,\nio_uring/opdef.c:597:\t\t.issue\t\t\t= io_fremovexattr,\nio_uring/opdef.c-598-\t},\n--\nio_uring/opdef.c-600-\t\t.needs_file\t\t= 1,\nio_uring/opdef.c:601:\t\t.prep\t\t\t= io_flistxattr_prep,\nio_uring/opdef.c:602:\t\t.issue\t\t\t= io_flistxattr,\nio_uring/opdef.c-603-\t},\n--\nio_uring/opdef.c=606=const struct io_cold_def io_cold_defs[] = {\n--\nio_uring/opdef.c-770-\t\t.name\t\t\t= \"FSETXATTR\",\nio_uring/opdef.c:771:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-772-\t},\n--\nio_uring/opdef.c-774-\t\t.name\t\t\t= \"SETXATTR\",\nio_uring/opdef.c:775:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-776-\t},\n--\nio_uring/opdef.c-778-\t\t.name\t\t\t= \"FGETXATTR\",\nio_uring/opdef.c:779:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-780-\t},\n--\nio_uring/opdef.c-782-\t\t.name\t\t\t= \"GETXATTR\",\nio_uring/opdef.c:783:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-784-\t},\n--\nio_uring/opdef.c-863-\t\t.name\t\t\t= \"FREMOVEXATTR\",\nio_uring/opdef.c:864:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-865-\t},\n--\nio_uring/opdef.c-867-\t\t.name\t\t\t= \"FLISTXATTR\",\nio_uring/opdef.c:868:\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-869-\t},\n--\nio_uring/xattr.c-9-#include \u003clinux/io_uring.h\u003e\nio_uring/xattr.c:10:#include \u003clinux/xattr.h\u003e\nio_uring/xattr.c-11-\n--\nio_uring/xattr.c-16-#include \"io_uring.h\"\nio_uring/xattr.c:17:#include \"xattr.h\"\nio_uring/xattr.c-18-\nio_uring/xattr.c:19:struct io_xattr {\nio_uring/xattr.c-20-\tstruct file\t\t\t*file;\nio_uring/xattr.c:21:\tstruct kernel_xattr_ctx\t\tctx;\nio_uring/xattr.c-22-\tstruct delayed_filename\t\tfilename;\n--\nio_uring/xattr.c-24-\nio_uring/xattr.c:25:void io_xattr_cleanup(struct io_kiocb *req)\nio_uring/xattr.c-26-{\nio_uring/xattr.c:27:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-28-\n--\nio_uring/xattr.c-33-\nio_uring/xattr.c:34:static void io_xattr_finish(struct io_kiocb *req, int ret)\nio_uring/xattr.c-35-{\n--\nio_uring/xattr.c-37-\nio_uring/xattr.c:38:\tio_xattr_cleanup(req);\nio_uring/xattr.c-39-\tio_req_set_res(req, ret, 0);\n--\nio_uring/xattr.c-41-\nio_uring/xattr.c:42:static int __io_getxattr_prep(struct io_kiocb *req,\nio_uring/xattr.c-43-\t\t\t const struct io_uring_sqe *sqe)\nio_uring/xattr.c-44-{\nio_uring/xattr.c:45:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-46-\tconst char __user *name;\n--\nio_uring/xattr.c-53-\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\nio_uring/xattr.c:54:\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\nio_uring/xattr.c-55-\n--\nio_uring/xattr.c-62-\nio_uring/xattr.c:63:\tret = import_xattr_name(ix-\u003ectx.kname, name);\nio_uring/xattr.c-64-\tif (ret) {\n--\nio_uring/xattr.c-73-\nio_uring/xattr.c:74:int io_fgetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-75-{\nio_uring/xattr.c:76:\treturn __io_getxattr_prep(req, sqe);\nio_uring/xattr.c-77-}\nio_uring/xattr.c-78-\nio_uring/xattr.c:79:int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-80-{\nio_uring/xattr.c:81:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-82-\tconst char __user *path;\n--\nio_uring/xattr.c-87-\nio_uring/xattr.c:88:\tret = __io_getxattr_prep(req, sqe);\nio_uring/xattr.c-89-\tif (ret)\n--\nio_uring/xattr.c-96-\nio_uring/xattr.c:97:int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-98-{\nio_uring/xattr.c:99:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-100-\tint ret;\n--\nio_uring/xattr.c-103-\nio_uring/xattr.c:104:\tret = file_getxattr(req-\u003efile, \u0026ix-\u003ectx);\nio_uring/xattr.c:105:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-106-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c-108-\nio_uring/xattr.c:109:int io_getxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-110-{\nio_uring/xattr.c:111:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-112-\tCLASS(filename_complete_delayed, name)(\u0026ix-\u003efilename);\n--\nio_uring/xattr.c-116-\nio_uring/xattr.c:117:\tret = filename_getxattr(AT_FDCWD, name, LOOKUP_FOLLOW, \u0026ix-\u003ectx);\nio_uring/xattr.c:118:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-119-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c-121-\nio_uring/xattr.c:122:static int __io_setxattr_prep(struct io_kiocb *req,\nio_uring/xattr.c-123-\t\t\tconst struct io_uring_sqe *sqe)\nio_uring/xattr.c-124-{\nio_uring/xattr.c:125:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-126-\tconst char __user *name;\n--\nio_uring/xattr.c-133-\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\nio_uring/xattr.c:134:\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\nio_uring/xattr.c-135-\n--\nio_uring/xattr.c-139-\nio_uring/xattr.c:140:\tret = setxattr_copy(name, \u0026ix-\u003ectx);\nio_uring/xattr.c-141-\tif (ret) {\n--\nio_uring/xattr.c-150-\nio_uring/xattr.c:151:int io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-152-{\nio_uring/xattr.c:153:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-154-\tconst char __user *path;\n--\nio_uring/xattr.c-159-\nio_uring/xattr.c:160:\tret = __io_setxattr_prep(req, sqe);\nio_uring/xattr.c-161-\tif (ret)\n--\nio_uring/xattr.c-168-\nio_uring/xattr.c:169:int io_fsetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-170-{\nio_uring/xattr.c:171:\treturn __io_setxattr_prep(req, sqe);\nio_uring/xattr.c-172-}\nio_uring/xattr.c-173-\nio_uring/xattr.c:174:int io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-175-{\nio_uring/xattr.c:176:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-177-\tint ret;\n--\nio_uring/xattr.c-180-\nio_uring/xattr.c:181:\tret = file_setxattr(req-\u003efile, \u0026ix-\u003ectx);\nio_uring/xattr.c:182:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-183-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c-185-\nio_uring/xattr.c:186:int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-187-{\nio_uring/xattr.c:188:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-189-\tCLASS(filename_complete_delayed, name)(\u0026ix-\u003efilename);\n--\nio_uring/xattr.c-193-\nio_uring/xattr.c:194:\tret = filename_setxattr(AT_FDCWD, name, LOOKUP_FOLLOW, \u0026ix-\u003ectx);\nio_uring/xattr.c:195:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-196-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c-198-\nio_uring/xattr.c:199:int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-200-{\nio_uring/xattr.c:201:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-202-\tconst char __user *name;\n--\nio_uring/xattr.c-209-\tif (READ_ONCE(sqe-\u003eoff) || READ_ONCE(sqe-\u003eaddr2) || READ_ONCE(sqe-\u003elen) ||\nio_uring/xattr.c:210:\t READ_ONCE(sqe-\u003exattr_flags) || READ_ONCE(sqe-\u003ebuf_index) ||\nio_uring/xattr.c-211-\t READ_ONCE(sqe-\u003esplice_fd_in) || READ_ONCE(sqe-\u003eaddr3) ||\n--\nio_uring/xattr.c-220-\nio_uring/xattr.c:221:\tret = import_xattr_name(ix-\u003ectx.kname, name);\nio_uring/xattr.c-222-\tif (ret) {\n--\nio_uring/xattr.c-232-\nio_uring/xattr.c:233:int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-234-{\nio_uring/xattr.c:235:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-236-\tint ret;\n--\nio_uring/xattr.c-239-\nio_uring/xattr.c:240:\tret = file_removexattr(req-\u003efile, ix-\u003ectx.kname);\nio_uring/xattr.c:241:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-242-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c-244-\nio_uring/xattr.c:245:int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-246-{\nio_uring/xattr.c:247:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-248-\n--\nio_uring/xattr.c-259-\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\nio_uring/xattr.c:260:\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\nio_uring/xattr.c-261-\n--\nio_uring/xattr.c-269-\nio_uring/xattr.c:270:int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-271-{\nio_uring/xattr.c:272:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-273-\tint ret;\n--\nio_uring/xattr.c-276-\nio_uring/xattr.c:277:\tret = file_listxattr(req-\u003efile, ix-\u003ectx.value, ix-\u003ectx.size);\nio_uring/xattr.c:278:\tio_xattr_finish(req, ret);\nio_uring/xattr.c-279-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.h-2-\nio_uring/xattr.h:3:void io_xattr_cleanup(struct io_kiocb *req);\nio_uring/xattr.h-4-\nio_uring/xattr.h:5:int io_fsetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:6:int io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-7-\nio_uring/xattr.h:8:int io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:9:int io_setxattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-10-\nio_uring/xattr.h:11:int io_fgetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:12:int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-13-\nio_uring/xattr.h:14:int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:15:int io_getxattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-16-\nio_uring/xattr.h:17:int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:18:int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags);\nio_uring/xattr.h-19-\nio_uring/xattr.h:20:int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);\nio_uring/xattr.h:21:int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags);\n"
} |
| 7/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19750 output: 18 thoughts: 29 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Investigating io_uring Configuration** Alright, let's get down to brass tacks. I need to figure out the exact configuration options that govern the `io_uring` subsystem. It’s pretty standard practice, when I'm chasing down kernel configuration details, to start with the obvious suspects. I suspect the key configuration option is likely nestled within the `io_uring` specific Kconfig file, perhaps something like `io_uring/Kconfig`. If that doesn't immediately reveal the parent configuration option, I'll branch out and pivot to `init/Kconfig`. That's often a good spot to check for higher-level features that might umbrella a specific subsystem like `io_uring`. I want to quickly identify the precise configuration symbol—the one that, when set, actually enables the whole `io_uring` shebang. After all, knowing the right symbol is the first critical step in ensuring my kernel builds are tailored properly, and that I'm able to enable or disable it as needed when doing analysis. Let's see what we can find! |
| 8/2 | 2026/09/20 12:16 | tool | grepper |
0mArgs:{
"Expression": "config IO_URING"
}Results: {
"Output": "init/Kconfig=1952=config AIO\n--\ninit/Kconfig-1959-\ninit/Kconfig:1960:config IO_URING\ninit/Kconfig-1961-\tbool \"Enable IO uring support\" if EXPERT\n--\ninit/Kconfig=1969=config GCOV_PROFILE_URING\n--\ninit/Kconfig-1981-\ninit/Kconfig:1982:config IO_URING_MOCK_FILE\ninit/Kconfig-1983-\ttristate \"Enable io_uring mock files (Experimental)\" if EXPERT\n--\nio_uring/Kconfig-5-\nio_uring/Kconfig:6:config IO_URING_ZCRX\nio_uring/Kconfig-7-\tdef_bool y\n--\nio_uring/Kconfig-12-\nio_uring/Kconfig:13:config IO_URING_BPF\nio_uring/Kconfig-14-\tdef_bool y\n--\nio_uring/Kconfig-17-\nio_uring/Kconfig:18:config IO_URING_BPF_OPS\nio_uring/Kconfig-19-\tdef_bool y\n"
} |
| 9/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 20340 output: 25 thoughts: 26 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Xattr Configuration Deep Dive** Alright, let's get down to brass tacks. I'm thinking about the extended attribute implementation, specifically `fs/xattr.c`. My immediate question is, how robust is the xattr support in this kernel? Is the relevant code always compiled into the kernel, or is its inclusion contingent on some configuration options or dependencies? I need to quickly ascertain the build-time flexibility here, so I can predict how easily a kernel module that depends on xattr features will behave on my target systems. Knowing the compile-time configuration choices is crucial for troubleshooting and porting. Time to dissect that source code. |
| 10/2 | 2026/09/20 12:16 | tool | grepper |
0mArgs:{
"Expression": "xattr\\.o",
"PathPrefix": "fs"
}Results: {
"Output": "fs/9p/Makefile=2=obj-$(CONFIG_9P_FS) := 9p.o\n--\nfs/9p/Makefile-13-\tfid.o \\\nfs/9p/Makefile:14:\txattr.o\nfs/9p/Makefile-15-\n--\nfs/Makefile=10=obj-y :=\topen.o read_write.o file_table.o super.o \\\n--\nfs/Makefile-13-\t\tattr.o bad_inode.o file.o filesystems.o namespace.o \\\nfs/Makefile:14:\t\tseq_file.o xattr.o libfs.o fs-writeback.o \\\nfs/Makefile-15-\t\tpnode.o splice.o sync.o utimes.o d_path.o \\\n--\nfs/afs/Makefile=6=kafs-y := \\\n--\nfs/afs/Makefile-41-\twrite.o \\\nfs/afs/Makefile:42:\txattr.o \\\nfs/afs/Makefile-43-\tyfsclient.o\n--\nfs/btrfs/Makefile=24=btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \\\n--\nfs/btrfs/Makefile-26-\t transaction.o inode.o file.o defrag.o \\\nfs/btrfs/Makefile:27:\t extent_map.o sysfs.o accessors.o xattr.o ordered-data.o \\\nfs/btrfs/Makefile-28-\t extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \\\n--\nfs/cachefiles/Makefile=6=cachefiles-y := \\\n--\nfs/cachefiles/Makefile-15-\tvolume.o \\\nfs/cachefiles/Makefile:16:\txattr.o\nfs/cachefiles/Makefile-17-\n--\nfs/ceph/Makefile=8=ceph-y := super.o inode.o dir.o file.o locks.o addr.o ioctl.o \\\nfs/ceph/Makefile:9:\texport.o caps.o snap.o xattr.o quota.o io.o \\\nfs/ceph/Makefile-10-\tmds_client.o mdsmap.o strings.o ceph_frag.o \\\n--\nfs/ceph/xattr.c=1107=static int ceph_sync_setxattr(struct inode *inode, const char *name,\n--\nfs/ceph/xattr.c-1153-\t\treq-\u003er_args.setxattr.flags = cpu_to_le32(flags);\nfs/ceph/xattr.c:1154:\t\treq-\u003er_args.setxattr.osdmap_epoch =\nfs/ceph/xattr.c-1155-\t\t\tcpu_to_le32(osdc-\u003eosdmap-\u003eepoch);\n--\nfs/erofs/Makefile=4=erofs-objs := super.o inode.o data.o namei.o dir.o sysfs.o\nfs/erofs/Makefile:5:erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o\nfs/erofs/Makefile-6-erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o zutil.o\n--\nfs/ext2/Makefile=12=CFLAGS_trace.o := -I$(src)\nfs/ext2/Makefile-13-\nfs/ext2/Makefile:14:ext2-$(CONFIG_EXT2_FS_XATTR)\t += xattr.o xattr_user.o xattr_trusted.o\nfs/ext2/Makefile-15-ext2-$(CONFIG_EXT2_FS_POSIX_ACL) += acl.o\n--\nfs/ext4/Makefile=8=ext4-y\t:= balloc.o bitmap.o block_validity.o dir.o ext4_jbd2.o extents.o \\\n--\nfs/ext4/Makefile-11-\t\tmmp.o move_extent.o namei.o page-io.o readpage.o resize.o \\\nfs/ext4/Makefile:12:\t\tsuper.o symlink.o sysfs.o xattr.o xattr_hurd.o xattr_trusted.o \\\nfs/ext4/Makefile-13-\t\txattr_user.o fast_commit.o orphan.o\n--\nfs/f2fs/Makefile=7=f2fs-$(CONFIG_F2FS_STAT_FS) += debug.o\nfs/f2fs/Makefile:8:f2fs-$(CONFIG_F2FS_FS_XATTR) += xattr.o\nfs/f2fs/Makefile-9-f2fs-$(CONFIG_F2FS_FS_POSIX_ACL) += acl.o\n--\nfs/fuse/Makefile=13=fuse-y := trace.o\t# put trace.o first so we see ftrace errors sooner\nfs/fuse/Makefile:14:fuse-y += dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o req_timeout.o req.o\nfs/fuse/Makefile-15-fuse-y += poll.o notify.o\n--\nfs/gfs2/Makefile=3=obj-$(CONFIG_GFS2_FS) += gfs2.o\nfs/gfs2/Makefile:4:gfs2-y := acl.o bmap.o dir.o xattr.o glock.o \\\nfs/gfs2/Makefile-5-\tglops.o log.o lops.o main.o meta_io.o \\\n--\nfs/hfsplus/Makefile=8=hfsplus-objs := super.o options.o inode.o ioctl.o extents.o catalog.o dir.o btree.o \\\nfs/hfsplus/Makefile-9-\t\tbnode.o brec.o bfind.o tables.o unicode.o wrapper.o bitmap.o part_tbl.o \\\nfs/hfsplus/Makefile:10:\t\tattributes.o xattr.o xattr_user.o xattr_security.o xattr_trusted.o\nfs/hfsplus/Makefile-11-\n--\nfs/jffs2/Makefile=14=jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER)\t+= wbuf.o\nfs/jffs2/Makefile:15:jffs2-$(CONFIG_JFFS2_FS_XATTR)\t\t+= xattr.o xattr_trusted.o xattr_user.o\nfs/jffs2/Makefile-16-jffs2-$(CONFIG_JFFS2_FS_SECURITY)\t+= security.o\n--\nfs/jfs/Makefile=8=jfs-y := super.o file.o inode.o namei.o jfs_mount.o jfs_umount.o \\\n--\nfs/jfs/Makefile-12-\t jfs_logmgr.o jfs_txnmgr.o \\\nfs/jfs/Makefile:13:\t resize.o xattr.o ioctl.o\nfs/jfs/Makefile-14-\n--\nfs/nfs/Makefile=33=nfsv4-$(CONFIG_NFS_V4_0)\t+= nfs40client.o nfs40proc.o\nfs/nfs/Makefile:34:nfsv4-$(CONFIG_NFS_V4_2)\t+= nfs42proc.o nfs42xattr.o\nfs/nfs/Makefile-35-\n--\nfs/ntfs3/Makefile=33=ntfs3-y :=\tattrib.o \\\n--\nfs/ntfs3/Makefile-49-\t\tupcase.o \\\nfs/ntfs3/Makefile:50:\t\txattr.o\nfs/ntfs3/Makefile-51-\n--\nfs/ocfs2/Makefile=11=ocfs2-objs := \\\n--\nfs/ocfs2/Makefile-41-\tquota_global.o\t\t\\\nfs/ocfs2/Makefile:42:\txattr.o\t\t\t\\\nfs/ocfs2/Makefile-43-\tacl.o\t\\\n--\nfs/orangefs/Makefile=6=obj-$(CONFIG_ORANGEFS_FS) += orangefs.o\nfs/orangefs/Makefile-7-\nfs/orangefs/Makefile:8:orangefs-objs := acl.o file.o orangefs-cache.o orangefs-utils.o xattr.o \\\nfs/orangefs/Makefile-9-\t\t dcache.o inode.o orangefs-sysfs.o orangefs-mod.o super.o \\\n--\nfs/smb/client/Makefile=19=$(obj)/cifs_spnego_negtokeninit.asn1.o: $(obj)/cifs_spnego_negtokeninit.asn1.c $(obj)/cifs_spnego_negtokeninit.asn1.h\nfs/smb/client/Makefile-20-\nfs/smb/client/Makefile:21:cifs-$(CONFIG_CIFS_XATTR) += xattr.o\nfs/smb/client/Makefile-22-\n--\nfs/squashfs/Makefile=13=squashfs-$(CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU) += decompressor_multi_percpu.o\nfs/squashfs/Makefile:14:squashfs-$(CONFIG_SQUASHFS_XATTR) += xattr.o xattr_id.o\nfs/squashfs/Makefile-15-squashfs-$(CONFIG_SQUASHFS_LZ4) += lz4_wrapper.o\n--\nfs/ubifs/Makefile=9=ubifs-$(CONFIG_FS_ENCRYPTION) += crypto.o\nfs/ubifs/Makefile:10:ubifs-$(CONFIG_UBIFS_FS_XATTR) += xattr.o\nfs/ubifs/Makefile-11-ubifs-$(CONFIG_UBIFS_FS_AUTHENTICATION) += auth.o\n--\nfs/xfs/Makefile=71=xfs-y\t\t\t\t+= xfs_aops.o \\\n--\nfs/xfs/Makefile-110-\t\t\t\t xfs_verify_media.o \\\nfs/xfs/Makefile:111:\t\t\t\t xfs_xattr.o\nfs/xfs/Makefile-112-\n--\nfs/xfs/Makefile=169=xfs-y\t\t\t\t+= $(addprefix scrub/, \\\n--\nfs/xfs/Makefile-186-\t\t\t\t iscan.o \\\nfs/xfs/Makefile:187:\t\t\t\t listxattr.o \\\nfs/xfs/Makefile-188-\t\t\t\t metapath.o \\\n"
} |
| 11/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23173 output: 36 thoughts: 121 Thoughts: **Examining xattr Implementation in io_uring** Okay, so looking at the kernel's file system attributes (xattr) implementation, I see a clear distinction. `fs/xattr.c` is always built into the kernel, as per `fs/Makefile`. However, the io_uring specific xattr code, `io_uring/xattr.c`, is conditionally compiled. I see it's linked in if `CONFIG_IO_URING` is enabled, which makes sense; this is handled in `io_uring/Makefile`. Now, I need to dig into the details of how io_uring interacts with xattrs. Specifically, I should probably take a close look at the `io_fremovexattr_prep`, `io_fremovexattr`, `io_flistxattr_prep`, and `io_flistxattr` functions within `io_uring/xattr.c`. I'll need to understand how io_uring is handling the preperation for the request and the requests themselves. Let's see how these are designed to fit into the broader kernel xattr framework, given I'm very familiar with the fundamental design. |
| 12/2 | 2026/09/20 12:16 | tool | read-file |
0mArgs:{
"File": "io_uring/xattr.c",
"FirstLine": 195,
"LineCount": 90
}Results: {
"Contents": " 195:\t\tio_xattr_finish(req, ret);\n 196:\t\treturn IOU_COMPLETE;\n 197:\t}\n 198:\t\n 199:\tint io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 200:\t{\n 201:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 202:\t\tconst char __user *name;\n 203:\t\tint ret;\n 204:\t\n 205:\t\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n 206:\t\tix-\u003ectx.kname = NULL;\n 207:\t\tix-\u003ectx.kvalue = NULL;\n 208:\t\n 209:\t\tif (READ_ONCE(sqe-\u003eoff) || READ_ONCE(sqe-\u003eaddr2) || READ_ONCE(sqe-\u003elen) ||\n 210:\t\t READ_ONCE(sqe-\u003exattr_flags) || READ_ONCE(sqe-\u003ebuf_index) ||\n 211:\t\t READ_ONCE(sqe-\u003esplice_fd_in) || READ_ONCE(sqe-\u003eaddr3) ||\n 212:\t\t READ_ONCE(sqe-\u003e__pad2[0]))\n 213:\t\t\treturn -EINVAL;\n 214:\t\n 215:\t\tname = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr));\n 216:\t\n 217:\t\tix-\u003ectx.kname = kmalloc_obj(*ix-\u003ectx.kname);\n 218:\t\tif (!ix-\u003ectx.kname)\n 219:\t\t\treturn -ENOMEM;\n 220:\t\n 221:\t\tret = import_xattr_name(ix-\u003ectx.kname, name);\n 222:\t\tif (ret) {\n 223:\t\t\tkfree(ix-\u003ectx.kname);\n 224:\t\t\tix-\u003ectx.kname = NULL;\n 225:\t\t\treturn ret;\n 226:\t\t}\n 227:\t\n 228:\t\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n 229:\t\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n 230:\t\treturn 0;\n 231:\t}\n 232:\t\n 233:\tint io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)\n 234:\t{\n 235:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 236:\t\tint ret;\n 237:\t\n 238:\t\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n 239:\t\n 240:\t\tret = file_removexattr(req-\u003efile, ix-\u003ectx.kname);\n 241:\t\tio_xattr_finish(req, ret);\n 242:\t\treturn IOU_COMPLETE;\n 243:\t}\n 244:\t\n 245:\tint io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 246:\t{\n 247:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 248:\t\n 249:\t\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n 250:\t\tix-\u003ectx.kname = NULL;\n 251:\t\tix-\u003ectx.kvalue = NULL;\n 252:\t\n 253:\t\tif (READ_ONCE(sqe-\u003eaddr) || READ_ONCE(sqe-\u003eoff) ||\n 254:\t\t READ_ONCE(sqe-\u003ebuf_index) || READ_ONCE(sqe-\u003esplice_fd_in) ||\n 255:\t\t READ_ONCE(sqe-\u003eaddr3) || READ_ONCE(sqe-\u003e__pad2[0]))\n 256:\t\t\treturn -EINVAL;\n 257:\t\n 258:\t\tix-\u003ectx.value = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr2));\n 259:\t\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\n 260:\t\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\n 261:\t\n 262:\t\tif (ix-\u003ectx.flags)\n 263:\t\t\treturn -EINVAL;\n 264:\t\n 265:\t\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n 266:\t\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n 267:\t\treturn 0;\n 268:\t}\n 269:\t\n 270:\tint io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)\n 271:\t{\n 272:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 273:\t\tint ret;\n 274:\t\n 275:\t\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n 276:\t\n 277:\t\tret = file_listxattr(req-\u003efile, ix-\u003ectx.value, ix-\u003ectx.size);\n 278:\t\tio_xattr_finish(req, ret);\n 279:\t\treturn IOU_COMPLETE;\n 280:\t}\n"
} |
| 13/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25061 output: 35 thoughts: 35 Thoughts: Okay, let's dive into the cleanup process for `io_xattr`, specifically looking at the implementation. I'll focus on the relevant section in `io_uring/xattr.c` – lines 25 through 30. **Deep Dive into `io_xattr` Cleanup** My primary interest is how this module manages its resources, particularly in scenarios that may lead to potential leaks or corruption. Analyzing these few lines, I'm trying to get a sense of the mechanisms used to ensure robustness and prevent issues. I need to understand this to see if it measures up to current best practices. This section likely holds the core logic for releasing any allocated memory, closing file descriptors, or handling other cleanup-related tasks associated with eXtended Attributes operations using `io_uring`. Understanding this cleanup process is paramount for security and stability. My goal here is to determine whether it's thread-safe, handles error conditions gracefully, and is generally well-designed. I'm looking for clues about the overall approach taken: is it reference-counted, RAII-style, or something else entirely? |
| 14/2 | 2026/09/20 12:16 | tool | read-file |
0mArgs:{
"File": "io_uring/xattr.c",
"FirstLine": 24,
"LineCount": 40
}Results: {
"Contents": " 24:\t\n 25:\tvoid io_xattr_cleanup(struct io_kiocb *req)\n 26:\t{\n 27:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 28:\t\n 29:\t\tdismiss_delayed_filename(\u0026ix-\u003efilename);\n 30:\t\tkfree(ix-\u003ectx.kname);\n 31:\t\tkvfree(ix-\u003ectx.kvalue);\n 32:\t}\n 33:\t\n 34:\tstatic void io_xattr_finish(struct io_kiocb *req, int ret)\n 35:\t{\n 36:\t\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\n 37:\t\n 38:\t\tio_xattr_cleanup(req);\n 39:\t\tio_req_set_res(req, ret, 0);\n 40:\t}\n 41:\t\n 42:\tstatic int __io_getxattr_prep(struct io_kiocb *req,\n 43:\t\t\t\t const struct io_uring_sqe *sqe)\n 44:\t{\n 45:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 46:\t\tconst char __user *name;\n 47:\t\tint ret;\n 48:\t\n 49:\t\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n 50:\t\tix-\u003ectx.kvalue = NULL;\n 51:\t\tname = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr));\n 52:\t\tix-\u003ectx.value = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr2));\n 53:\t\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\n 54:\t\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\n 55:\t\n 56:\t\tif (ix-\u003ectx.flags)\n 57:\t\t\treturn -EINVAL;\n 58:\t\n 59:\t\tix-\u003ectx.kname = kmalloc_obj(*ix-\u003ectx.kname);\n 60:\t\tif (!ix-\u003ectx.kname)\n 61:\t\t\treturn -ENOMEM;\n 62:\t\n 63:\t\tret = import_xattr_name(ix-\u003ectx.kname, name);\n"
} |
| 15/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25992 output: 34 thoughts: 28 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Diving into the Extended Attribute Realm** Alright, time to revisit the extended attribute (xattr) handling, specifically within the `fs/xattr.c` module. My immediate goal is to refresh my understanding, or perhaps just confirm my assumptions, about how the `file_removexattr` and `file_listxattr` functions are implemented. I want to see how these low-level functions interact with the VFS layer and the specific filesystem implementations. Are there any subtle corner cases in their logic that I might have missed previously? I need to analyze the error handling, any potential race conditions, and how they handle different xattr sizes and types. Essentially, I'm aiming for a mental map of their internal operation to have a solid reference and ensure my understanding of the system is complete. |
| 16/2 | 2026/09/20 12:16 | tool | read-file |
0mArgs:{
"File": "fs/xattr.c",
"FirstLine": 950,
"LineCount": 95
}Results: {
"Contents": " 950:\t\n 951:\t\tkvfree(klist);\n 952:\t\n 953:\t\treturn error;\n 954:\t}\n 955:\t\n 956:\tssize_t file_listxattr(struct file *f, char __user *list, size_t size)\n 957:\t{\n 958:\t\taudit_file(f);\n 959:\t\treturn listxattr(f-\u003ef_path.dentry, list, size);\n 960:\t}\n 961:\t\n 962:\tstatic\n 963:\tssize_t filename_listxattr(int dfd, struct filename *filename,\n 964:\t\t\t\t unsigned int lookup_flags,\n 965:\t\t\t\t char __user *list, size_t size)\n 966:\t{\n 967:\t\tstruct path path;\n 968:\t\tssize_t error;\n 969:\tretry:\n 970:\t\terror = filename_lookup(dfd, filename, lookup_flags, \u0026path, NULL);\n 971:\t\tif (error)\n 972:\t\t\treturn error;\n 973:\t\terror = listxattr(path.dentry, list, size);\n 974:\t\tpath_put(\u0026path);\n 975:\t\tif (retry_estale(error, lookup_flags)) {\n 976:\t\t\tlookup_flags |= LOOKUP_REVAL;\n 977:\t\t\tgoto retry;\n 978:\t\t}\n 979:\t\treturn error;\n 980:\t}\n 981:\t\n 982:\tstatic ssize_t path_listxattrat(int dfd, const char __user *pathname,\n 983:\t\t\t\t\tunsigned int at_flags, char __user *list,\n 984:\t\t\t\t\tsize_t size)\n 985:\t{\n 986:\t\tint lookup_flags;\n 987:\t\n 988:\t\tif ((at_flags \u0026 ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)\n 989:\t\t\treturn -EINVAL;\n 990:\t\n 991:\t\tCLASS(filename_maybe_null, filename)(pathname, at_flags);\n 992:\t\tif (!filename) {\n 993:\t\t\tCLASS(fd, f)(dfd);\n 994:\t\t\tif (fd_empty(f))\n 995:\t\t\t\treturn -EBADF;\n 996:\t\t\treturn file_listxattr(fd_file(f), list, size);\n 997:\t\t}\n 998:\t\n 999:\t\tlookup_flags = (at_flags \u0026 AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;\n1000:\t\treturn filename_listxattr(dfd, filename, lookup_flags, list, size);\n1001:\t}\n1002:\t\n1003:\tSYSCALL_DEFINE5(listxattrat, int, dfd, const char __user *, pathname,\n1004:\t\t\tunsigned int, at_flags,\n1005:\t\t\tchar __user *, list, size_t, size)\n1006:\t{\n1007:\t\treturn path_listxattrat(dfd, pathname, at_flags, list, size);\n1008:\t}\n1009:\t\n1010:\tSYSCALL_DEFINE3(listxattr, const char __user *, pathname, char __user *, list,\n1011:\t\t\tsize_t, size)\n1012:\t{\n1013:\t\treturn path_listxattrat(AT_FDCWD, pathname, 0, list, size);\n1014:\t}\n1015:\t\n1016:\tSYSCALL_DEFINE3(llistxattr, const char __user *, pathname, char __user *, list,\n1017:\t\t\tsize_t, size)\n1018:\t{\n1019:\t\treturn path_listxattrat(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, list, size);\n1020:\t}\n1021:\t\n1022:\tSYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)\n1023:\t{\n1024:\t\treturn path_listxattrat(fd, NULL, AT_EMPTY_PATH, list, size);\n1025:\t}\n1026:\t\n1027:\t/*\n1028:\t * Extended attribute REMOVE operations\n1029:\t */\n1030:\tstatic long\n1031:\tremovexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n1032:\t{\n1033:\t\tif (is_posix_acl_xattr(name))\n1034:\t\t\treturn vfs_remove_acl(idmap, d, name);\n1035:\t\treturn vfs_removexattr(idmap, d, name);\n1036:\t}\n1037:\t\n1038:\tint file_removexattr(struct file *f, struct xattr_name *kname)\n1039:\t{\n1040:\t\tint error = mnt_want_write_file(f);\n1041:\t\n1042:\t\tif (!error) {\n1043:\t\t\taudit_file(f);\n1044:\t\t\terror = removexattr(file_mnt_idmap(f),\n"
} |
| 17/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27678 output: 27 thoughts: 566 Thoughts: **My Assessment of the New io_uring Opcodes: Worthy of Fuzzing** Okay, so I'm looking at this patch adding new `io_uring` opcodes, specifically `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`. My initial impression is that these are definitely worth a closer look, and the criteria for fuzzing are definitely met. Let me break down my reasoning: This isn't just a minor addition; we're talking about new syscall-level operations interacting directly with the core io_uring and VFS subsystems. That alone raises a red flag in a good way. These new opcodes are directly accessible through standard `io_uring_enter` calls and SQEs from userspace, making them very easy to reach, and therefore highly vulnerable, in a real environment. The code itself involves a number of moving parts that are typically great fuzzing targets. We've got runtime checks, memory allocations with `kmalloc_obj`, user pointer copies via `import_xattr_name`, state transitions, and that `WARN_ON_ONCE` check with `IO_URING_F_NONBLOCK`. All these things can be great fuzzing targets. That’s a good list of things that can be easily exploited. I mean, we're talking about *executable code* within core subsystems. That's a textbook definition of a fuzzing target, and worth fuzzing is absolutely TRUE. Now, let's nail down some of the configuration details. We know that `CONFIG_IO_URING` is required to even compile the `io_uring/xattr.c` code, but let's just make sure there aren't any other gotchas. A quick review of the `Kconfig` and `Makefile` files confirms that `fs/xattr.c` is always compiled and that the `io_uring/xattr.c` code is exclusively included when `CONFIG_IO_URING=y`. Nothing else jumps out at me as a secondary dependency. |
| 18/2 | 2026/09/20 12:16 | tool | grepper |
0mArgs:{
"Expression": "xattr\\.o",
"PathPrefix": "io_uring"
}Results: {
"Output": "io_uring/Makefile=9=obj-$(CONFIG_IO_URING)\t\t+= io_uring.o opdef.o kbuf.o rsrc.o notif.o \\\n--\nio_uring/Makefile-11-\t\t\t\t\ttw.o wait.o eventfd.o uring_cmd.o \\\nio_uring/Makefile:12:\t\t\t\t\topenclose.o sqpoll.o xattr.o nop.o \\\nio_uring/Makefile-13-\t\t\t\t\tfs.o splice.o sync.o msg_ring.o \\\n"
} |
| 19/2 | 2026/09/20 12:16 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 28847 output: 28 thoughts: 52 Thoughts: **My Initial Thoughts on io_uring Build Configuration** Okay, so `io_uring/xattr.o` is always built when `CONFIG_IO_URING` is enabled. That's straightforward enough. But, I'm already thinking about potential dependencies. Just because it's built doesn't mean it's *fully* functional with just that one flag. I need to be absolutely sure I'm not missing some subtle nuance, some other config option that's a prerequisite for the more advanced features, or even core functionality, of `io_uring`. Time to dive into `init/Kconfig` and see if anything else is hiding in there that might trip me up. Better to be thorough than to chase down a kernel bug later. Let's see what the config file has to say. |
| 20/2 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "config IO_URING",
"PathPrefix": "init/Kconfig"
}Results: {
"Output": "init/Kconfig=1952=config AIO\n--\ninit/Kconfig-1959-\ninit/Kconfig:1960:config IO_URING\ninit/Kconfig-1961-\tbool \"Enable IO uring support\" if EXPERT\n--\ninit/Kconfig=1969=config GCOV_PROFILE_URING\n--\ninit/Kconfig-1981-\ninit/Kconfig:1982:config IO_URING_MOCK_FILE\ninit/Kconfig-1983-\ttristate \"Enable io_uring mock files (Experimental)\" if EXPERT\n"
} |
| 21/2 | 2026/09/20 12:17 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29257 output: 33 thoughts: 21 Thoughts: Here's my take on those lines in `init/Kconfig`, thinking like I'd approach this as an expert: **Delving into `init/Kconfig` – Lines 1960-1968** Okay, so let's zoom in on lines 1960 through 1968 in `init/Kconfig`. Right, I'm already anticipating what we're going to find in this section, knowing the usual structure of this file. Given the context of `init/`, my guess is we are going to configure something that happens early in the boot process. This likely involves drivers, features, or architectural details that are fundamental to system initialization. I'm mentally preparing to assess the syntax – is it `config`, `menu`, `bool`, `tristate`, or `default` directives that we're dealing with? Are there any dependencies (`depends on`, `select`, `requires`) at play? Are there any prompts that give me a clear sense of what this setting *does*? Crucially, I'm watching for clues on how this Kconfig option impacts the final image size and functionality. Are there any default values that might impact resource utilization or performance, and whether those defaults should be altered or not? In my mind, I'm also cross-referencing this location against my understanding of the larger system. Is this relating to some commonly used or recently modified part of the kernel? Depending on the specifics, I'm already weighing the potential implications for performance, security, or overall system robustness. Is this something I have dealt with before? Is this something that I can immediately visualize, or do I need to dig deeper into the code to fully comprehend the implications? Ultimately, I will see how these few lines fit into the broader scheme and influence the final image. |
| 22/2 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "init/Kconfig",
"FirstLine": 1955,
"LineCount": 20
}Results: {
"Contents": "1955:\t\thelp\n1956:\t\t This option enables POSIX asynchronous I/O which may by used\n1957:\t\t by some high performance threaded applications. Disabling\n1958:\t\t this option saves about 7k.\n1959:\t\n1960:\tconfig IO_URING\n1961:\t\tbool \"Enable IO uring support\" if EXPERT\n1962:\t\tselect IO_WQ\n1963:\t\tdefault y\n1964:\t\thelp\n1965:\t\t This option enables support for the io_uring interface, enabling\n1966:\t\t applications to submit and complete IO through submission and\n1967:\t\t completion rings that are shared between the kernel and application.\n1968:\t\n1969:\tconfig GCOV_PROFILE_URING\n1970:\t\tbool \"Enable GCOV profiling on the io_uring subsystem\"\n1971:\t\tdepends on IO_URING \u0026\u0026 GCOV_KERNEL\n1972:\t\thelp\n1973:\t\t Enable GCOV profiling on the io_uring subsystem, to facilitate\n1974:\t\t code coverage testing.\n"
} |
| 23/2 | 2026/09/20 12:17 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29992 output: 31 thoughts: 229 Thoughts: **My Analysis of IO_URING and xattr Focus Symbols** Okay, so `IO_URING` has no dependencies, it's just `select IO_WQ` and set `default y`. That means enabling it is a simple matter of selecting `"IO_URING"`. Done. Easy. Now, I need to understand what the "FocusSymbols" are. Right, let's see which functions are involved or have been added. Let's see... I see `io_fremovexattr_prep`, `io_fremovexattr`, `io_flistxattr_prep`, `io_flistxattr`, `file_removexattr`, and `file_listxattr`. Hmm, are `file_removexattr` and `file_listxattr` the right "FocusSymbols"? They seem like core operations. Wait a second, those *were* static functions within `fs/xattr.c`, specifically called by the system call definitions `SYSCALL_DEFINE3(flistxattr, ...)` and `SYSCALL_DEFINE2(fremovexattr, ...)`. Let me just double check `SYSCALL_DEFINE2(fremovexattr)` in `fs/xattr.c` to be certain. |
| 24/2 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "file_removexattr",
"PathPrefix": "fs/xattr.c"
}Results: {
"Output": "fs/xattr.c=1031=removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n--\nfs/xattr.c-1037-\nfs/xattr.c:1038:int file_removexattr(struct file *f, struct xattr_name *kname)\nfs/xattr.c-1039-{\n--\nfs/xattr.c=1074=static int path_removexattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-1092-\t\t\treturn -EBADF;\nfs/xattr.c:1093:\t\treturn file_removexattr(fd_file(f), \u0026kname);\nfs/xattr.c-1094-\t}\n"
} |
| 25/2 | 2026/09/20 12:17 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 30737 output: 191 thoughts: 907 Thoughts: **My Analysis of the io_uring fremovexattr/flistxattr Implementation** Okay, let's break this down. My focus here is to identify the key functions related to the io_uring support for `fremovexattr` and `flistxattr` and determine their relevance for fuzzing. First, I see `io_xattr_cleanup` is already in use and, it’s being used as the `.cleanup` callback for `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`. Got it. That’s a good starting point but not the core logic. Now, let's zoom in on the newly added functions specifically introduced in the patch: `io_fremovexattr_prep`, `io_fremovexattr`, `io_flistxattr_prep`, and `io_flistxattr`. These are *directly* tied to the new io_uring functionality. The fact that `file_removexattr` and `file_listxattr` are now non-static and called by the `io_f...` functions, makes them part of the overall flow too. My initial thought was to include `file_removexattr` and `file_listxattr` but I needed to verify their scope, and now it’s clear they are NOT ubiquitous. They are exclusively called when `fremovexattr` or `flistxattr` or the new io_uring opcodes are used. This makes them relevant, and perhaps, *more* relevant than I initially thought. I did a quick scan of `io_uring/opdef.c` and `io_uring/xattr.c` as well as `fs/xattr.c` to confirm my findings and to make sure I’m not missing anything. I confirmed my initial understanding that `io_issue_defs` and `io_cold_defs` are data structures, not functions. I confirmed that `file_listxattr` and `file_removexattr` are exported through `fs/internal.h` and this reinforces their visibility and, therefore, potential fuzzer targets. Now for the final verification: I'm checking if all the criteria for identifying fuzz targets are met. 1. **Reachability:** We're dealing with `io_uring_enter` which is a critical piece in QEMU/GCE kernel fuzzing setups, so the code is *absolutely* reachable from userspace via the io_uring submission queue. No questions there. 2. **WorthFuzzing:** Yes, big yes! This adds new io_uring opcodes (`IORING_OP_FREMOVEXATTR`, `IORING_OP_FLISTXATTR`), parses user inputs, includes prep functions, allocates memory, executes file operations asynchronously, and has request completion logic. This is a rich attack surface. 3. **FocusSymbols:** Based on my analysis, the following functions are key: `io_fremovexattr_prep`, `io_fremovexattr`, `io_flistxattr_prep`, `io_flistxattr`, `file_removexattr`, and `file_listxattr`. 4. **EnableConfigs:** It's driven by `CONFIG_IO_URING=y`, which is a straightforward dependency. I made sure to check if anything else was required, and the answer is no. So, after this rigorous review, I'm confident in my selection of symbols for fuzzing. This looks like a solid target. |
| 26/2 | 2026/09/20 12:17 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"IO_URING"
],
"FocusSymbols": [
"io_fremovexattr_prep",
"io_fremovexattr",
"io_flistxattr_prep",
"io_flistxattr",
"file_removexattr",
"file_listxattr"
],
"Reasoning": "The patch introduces two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes fs/xattr.c functions file_removexattr() and file_listxattr() to io_uring and implements prep and issue handlers with user input validation, memory allocation, and asynchronous execution in io_uring/xattr.c. This reachable core subsystem functionality is fully testable and worth fuzzing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"IO_URING"
],
"FocusSymbols": [
"io_fremovexattr_prep",
"io_fremovexattr",
"io_flistxattr_prep",
"io_flistxattr",
"file_removexattr",
"file_listxattr"
],
"Reasoning": "The patch introduces two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes fs/xattr.c functions file_removexattr() and file_listxattr() to io_uring and implements prep and issue handlers with user input validation, memory allocation, and asynchronous execution in io_uring/xattr.c. This reachable core subsystem functionality is fully testable and worth fuzzing.",
"WorthFuzzing": true
} |
| 27/1 | 2026/09/20 12:17 | action | If |
2mArgs:{
"WorthFuzzing": true
}Results: null |
| 28/2 | 2026/09/20 12:17 | agent | kmsan-evaluator |
2mModel:core Args: null Results: {
"KMSANReasoning": "The patch series introduces support for two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes existing VFS helpers (file_removexattr and file_listxattr) by making them non-static and wraps them in io_uring handlers.\n\nKMSAN vs KASAN Applicability:\n- No uninitialized memory risks or kernel-to-user info-leaks are introduced.\n- In both `io_fremovexattr_prep` and `io_flistxattr_prep`, all fields of the per-command `io_xattr` context are explicitly initialized prior to use (`filename` initialized via `INIT_DELAYED_FILENAME`, pointers `kname` and `kvalue` explicitly set to NULL, and value/size/flags populated from the SQE).\n- The allocated memory for `ix-\u003ectx.kname` is filled via `import_xattr_name` (using `strncpy_from_user`), and `file_removexattr` treats it strictly as a null-terminated C string.\n- `io_flistxattr` directly delegates to the existing `file_listxattr` helper (which calls `listxattr`, identical to the `flistxattr(2)` syscall), with no changes to user-space copying or buffer management.\n- Any bugs likely to arise from this patch relate to file reference handling, async cancellation lifecycles, memory freeing on error paths, or mount write locks (`mnt_want_write_file`), which are comprehensively covered by KASAN and LOCKDEP.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 42baea3a0d1118620152da23c58db443974630c5
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Sep 20 12:16:14 2026 +0000
syz-cluster: applied patch under review
diff --git a/fs/internal.h b/fs/internal.h
index c658c8a5ebd56..ff7344ac8cefa 100644
--- a/fs/internal.h
+++ b/fs/internal.h
@@ -298,6 +298,8 @@ int filename_setxattr(int dfd, struct filename *filename,
unsigned int lookup_flags, struct kernel_xattr_ctx *ctx);
int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);
int import_xattr_name(struct xattr_name *kname, const char __user *name);
+ssize_t file_listxattr(struct file *f, char __user *list, size_t size);
+int file_removexattr(struct file *f, struct xattr_name *kname);
int may_write_xattr(struct mnt_idmap *idmap, struct inode *inode);
diff --git a/fs/xattr.c b/fs/xattr.c
index d589791152007..31b8a5eeec1e8 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -953,7 +953,6 @@ listxattr(struct dentry *d, char __user *list, size_t size)
return error;
}
-static
ssize_t file_listxattr(struct file *f, char __user *list, size_t size)
{
audit_file(f);
@@ -1036,7 +1035,7 @@ removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)
return vfs_removexattr(idmap, d, name);
}
-static int file_removexattr(struct file *f, struct xattr_name *kname)
+int file_removexattr(struct file *f, struct xattr_name *kname)
{
int error = mnt_want_write_file(f);
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h
index 909fb7aea638e..45de6dd6e3c4e 100644
--- a/include/uapi/linux/io_uring.h
+++ b/include/uapi/linux/io_uring.h
@@ -318,6 +318,8 @@ enum io_uring_op {
IORING_OP_PIPE,
IORING_OP_NOP128,
IORING_OP_URING_CMD128,
+ IORING_OP_FREMOVEXATTR,
+ IORING_OP_FLISTXATTR,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -426,7 +428,7 @@ enum io_uring_op {
* IORING_RECVSEND_BUNDLE Used with IOSQE_BUFFER_SELECT. If set, send or
* recv will grab as many buffers from the buffer
* group ID given and send them all. The completion
- * result will be the number of buffers send, with
+ * result will be the number of buffers send, with
* the starting buffer ID in cqe->flags as per
* usual for provided buffer usage. The buffers
* will be contiguous from the starting buffer ID.
diff --git a/io_uring/opdef.c b/io_uring/opdef.c
index cf3aa2242cd76..14a511f7a9df5 100644
--- a/io_uring/opdef.c
+++ b/io_uring/opdef.c
@@ -591,6 +591,16 @@ const struct io_issue_def io_issue_defs[] = {
.prep = io_uring_cmd_prep,
.issue = io_uring_cmd,
},
+ [IORING_OP_FREMOVEXATTR] = {
+ .needs_file = 1,
+ .prep = io_fremovexattr_prep,
+ .issue = io_fremovexattr,
+ },
+ [IORING_OP_FLISTXATTR] = {
+ .needs_file = 1,
+ .prep = io_flistxattr_prep,
+ .issue = io_flistxattr,
+ },
};
const struct io_cold_def io_cold_defs[] = {
@@ -849,6 +859,14 @@ const struct io_cold_def io_cold_defs[] = {
.sqe_copy = io_uring_cmd_sqe_copy,
.cleanup = io_uring_cmd_cleanup,
},
+ [IORING_OP_FREMOVEXATTR] = {
+ .name = "FREMOVEXATTR",
+ .cleanup = io_xattr_cleanup,
+ },
+ [IORING_OP_FLISTXATTR] = {
+ .name = "FLISTXATTR",
+ .cleanup = io_xattr_cleanup,
+ },
};
const char *io_uring_get_opcode(u8 opcode)
diff --git a/io_uring/xattr.c b/io_uring/xattr.c
index 5303df3f247f4..f2d6b19040589 100644
--- a/io_uring/xattr.c
+++ b/io_uring/xattr.c
@@ -195,3 +195,86 @@ int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)
io_xattr_finish(req, ret);
return IOU_COMPLETE;
}
+
+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ const char __user *name;
+ int ret;
+
+ INIT_DELAYED_FILENAME(&ix->filename);
+ ix->ctx.kname = NULL;
+ ix->ctx.kvalue = NULL;
+
+ if (READ_ONCE(sqe->off) || READ_ONCE(sqe->addr2) || READ_ONCE(sqe->len) ||
+ READ_ONCE(sqe->xattr_flags) || READ_ONCE(sqe->buf_index) ||
+ READ_ONCE(sqe->splice_fd_in) || READ_ONCE(sqe->addr3) ||
+ READ_ONCE(sqe->__pad2[0]))
+ return -EINVAL;
+
+ name = u64_to_user_ptr(READ_ONCE(sqe->addr));
+
+ ix->ctx.kname = kmalloc_obj(*ix->ctx.kname);
+ if (!ix->ctx.kname)
+ return -ENOMEM;
+
+ ret = import_xattr_name(ix->ctx.kname, name);
+ if (ret) {
+ kfree(ix->ctx.kname);
+ ix->ctx.kname = NULL;
+ return ret;
+ }
+
+ req->flags |= REQ_F_NEED_CLEANUP;
+ req->flags |= REQ_F_FORCE_ASYNC;
+ return 0;
+}
+
+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ int ret;
+
+ WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK);
+
+ ret = file_removexattr(req->file, ix->ctx.kname);
+ io_xattr_finish(req, ret);
+ return IOU_COMPLETE;
+}
+
+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+
+ INIT_DELAYED_FILENAME(&ix->filename);
+ ix->ctx.kname = NULL;
+ ix->ctx.kvalue = NULL;
+
+ if (READ_ONCE(sqe->addr) || READ_ONCE(sqe->off) ||
+ READ_ONCE(sqe->buf_index) || READ_ONCE(sqe->splice_fd_in) ||
+ READ_ONCE(sqe->addr3) || READ_ONCE(sqe->__pad2[0]))
+ return -EINVAL;
+
+ ix->ctx.value = u64_to_user_ptr(READ_ONCE(sqe->addr2));
+ ix->ctx.size = READ_ONCE(sqe->len);
+ ix->ctx.flags = READ_ONCE(sqe->xattr_flags);
+
+ if (ix->ctx.flags)
+ return -EINVAL;
+
+ req->flags |= REQ_F_NEED_CLEANUP;
+ req->flags |= REQ_F_FORCE_ASYNC;
+ return 0;
+}
+
+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)
+{
+ struct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);
+ int ret;
+
+ WARN_ON_ONCE(issue_flags & IO_URING_F_NONBLOCK);
+
+ ret = file_listxattr(req->file, ix->ctx.value, ix->ctx.size);
+ io_xattr_finish(req, ret);
+ return IOU_COMPLETE;
+}
diff --git a/io_uring/xattr.h b/io_uring/xattr.h
index 9b459d2ae90c5..d2487b49a5d21 100644
--- a/io_uring/xattr.h
+++ b/io_uring/xattr.h
@@ -13,3 +13,9 @@ int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags);
int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
int io_getxattr(struct io_kiocb *req, unsigned int issue_flags);
+
+int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
+int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags);
+
+int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
+int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags);
diff --git a/tools/include/uapi/linux/io_uring.h b/tools/include/uapi/linux/io_uring.h
index f1c16f8177420..45de6dd6e3c4e 100644
--- a/tools/include/uapi/linux/io_uring.h
+++ b/tools/include/uapi/linux/io_uring.h
@@ -10,6 +10,8 @@
#include <linux/fs.h>
#include <linux/types.h>
+#include <linux/io_uring/zcrx.h>
+
/*
* this file is shared with liburing and that has to autodetect
* if linux/time_types.h is available or not, it can
@@ -50,7 +52,7 @@ struct io_uring_sqe {
};
__u32 len; /* buffer size or number of iovecs */
union {
- __kernel_rwf_t rw_flags;
+ __u32 rw_flags;
__u32 fsync_flags;
__u16 poll_events; /* compatibility */
__u32 poll32_events; /* word-reversed for BE */
@@ -71,6 +73,9 @@ struct io_uring_sqe {
__u32 uring_cmd_flags;
__u32 waitid_flags;
__u32 futex_flags;
+ __u32 install_fd_flags;
+ __u32 nop_flags;
+ __u32 pipe_flags;
};
__u64 user_data; /* data to be passed back at completion time */
/* pack this to avoid bogus arm OABI complaints */
@@ -85,17 +90,26 @@ struct io_uring_sqe {
union {
__s32 splice_fd_in;
__u32 file_index;
+ __u32 zcrx_ifq_idx;
__u32 optlen;
struct {
__u16 addr_len;
__u16 __pad3[1];
};
+ struct {
+ __u8 write_stream;
+ __u8 __pad4[3];
+ };
};
union {
struct {
__u64 addr3;
__u64 __pad2[1];
};
+ struct {
+ __u64 attr_ptr; /* pointer to attribute information */
+ __u64 attr_type_mask; /* bit mask of attributes */
+ };
__u64 optval;
/*
* If the ring is initialized with IORING_SETUP_SQE128, then
@@ -105,6 +119,18 @@ struct io_uring_sqe {
};
};
+/* sqe->attr_type_mask flags */
+#define IORING_RW_ATTR_FLAG_PI (1U << 0)
+/* PI attribute information */
+struct io_uring_attr_pi {
+ __u16 flags;
+ __u16 app_tag;
+ __u32 len;
+ __u64 addr;
+ __u64 seed;
+ __u64 rsvd;
+};
+
/*
* If sqe->file_index is set to this for opcodes that instantiate a new
* direct descriptor (like openat/openat2/accept), then io_uring will allocate
@@ -114,7 +140,7 @@ struct io_uring_sqe {
*/
#define IORING_FILE_INDEX_ALLOC (~0U)
-enum {
+enum io_uring_sqe_flags_bit {
IOSQE_FIXED_FILE_BIT,
IOSQE_IO_DRAIN_BIT,
IOSQE_IO_LINK_BIT,
@@ -164,7 +190,8 @@ enum {
/*
* If COOP_TASKRUN is set, get notified if task work is available for
* running and a kernel transition would be needed to run it. This sets
- * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
+ * IORING_SQ_TASKRUN in the sq ring flags. Not valid without COOP_TASKRUN
+ * or DEFER_TASKRUN.
*/
#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
@@ -198,6 +225,33 @@ enum {
*/
#define IORING_SETUP_NO_SQARRAY (1U << 16)
+/* Use hybrid poll in iopoll process */
+#define IORING_SETUP_HYBRID_IOPOLL (1U << 17)
+
+/*
+ * Allow both 16b and 32b CQEs. If a 32b CQE is posted, it will have
+ * IORING_CQE_F_32 set in cqe->flags.
+ */
+#define IORING_SETUP_CQE_MIXED (1U << 18)
+
+/*
+ * Allow both 64b and 128b SQEs. If a 128b SQE is posted, it will have
+ * a 128b opcode.
+ */
+#define IORING_SETUP_SQE_MIXED (1U << 19)
+
+/*
+ * When set, io_uring ignores SQ head and tail and fetches SQEs to submit
+ * starting from index 0 instead from the index stored in the head pointer.
+ * IOW, the user should place all SQE at the beginning of the SQ memory
+ * before issuing a submission syscall.
+ *
+ * It requires IORING_SETUP_NO_SQARRAY and is incompatible with
+ * IORING_SETUP_SQPOLL. The user must also never change the SQ head and tail
+ * values and keep it set to 0. Any other value is undefined behaviour.
+ */
+#define IORING_SETUP_SQ_REWIND (1U << 20)
+
enum io_uring_op {
IORING_OP_NOP,
IORING_OP_READV,
@@ -253,6 +307,19 @@ enum io_uring_op {
IORING_OP_FUTEX_WAIT,
IORING_OP_FUTEX_WAKE,
IORING_OP_FUTEX_WAITV,
+ IORING_OP_FIXED_FD_INSTALL,
+ IORING_OP_FTRUNCATE,
+ IORING_OP_BIND,
+ IORING_OP_LISTEN,
+ IORING_OP_RECV_ZC,
+ IORING_OP_EPOLL_WAIT,
+ IORING_OP_READV_FIXED,
+ IORING_OP_WRITEV_FIXED,
+ IORING_OP_PIPE,
+ IORING_OP_NOP128,
+ IORING_OP_URING_CMD128,
+ IORING_OP_FREMOVEXATTR,
+ IORING_OP_FLISTXATTR,
/* this goes last, obviously */
IORING_OP_LAST,
@@ -262,9 +329,13 @@ enum io_uring_op {
* sqe->uring_cmd_flags top 8bits aren't available for userspace
* IORING_URING_CMD_FIXED use registered buffer; pass this flag
* along with setting sqe->buf_index.
+ * IORING_URING_CMD_MULTISHOT must be used with buffer select, like other
+ * multishot commands. Not compatible with
+ * IORING_URING_CMD_FIXED, for now.
*/
#define IORING_URING_CMD_FIXED (1U << 0)
-#define IORING_URING_CMD_MASK IORING_URING_CMD_FIXED
+#define IORING_URING_CMD_MULTISHOT (1U << 1)
+#define IORING_URING_CMD_MASK (IORING_URING_CMD_FIXED | IORING_URING_CMD_MULTISHOT)
/*
@@ -274,6 +345,10 @@ enum io_uring_op {
/*
* sqe->timeout_flags
+ *
+ * IORING_TIMEOUT_IMMEDIATE_ARG: If set, sqe->addr stores the timeout
+ * value in nanoseconds instead of
+ * pointing to a timespec.
*/
#define IORING_TIMEOUT_ABS (1U << 0)
#define IORING_TIMEOUT_UPDATE (1U << 1)
@@ -282,6 +357,7 @@ enum io_uring_op {
#define IORING_LINK_TIMEOUT_UPDATE (1U << 4)
#define IORING_TIMEOUT_ETIME_SUCCESS (1U << 5)
#define IORING_TIMEOUT_MULTISHOT (1U << 6)
+#define IORING_TIMEOUT_IMMEDIATE_ARG (1U << 7)
#define IORING_TIMEOUT_CLOCK_MASK (IORING_TIMEOUT_BOOTTIME | IORING_TIMEOUT_REALTIME)
#define IORING_TIMEOUT_UPDATE_MASK (IORING_TIMEOUT_UPDATE | IORING_LINK_TIMEOUT_UPDATE)
/*
@@ -348,11 +424,24 @@ enum io_uring_op {
* 0 is reported if zerocopy was actually possible.
* IORING_NOTIF_USAGE_ZC_COPIED if data was copied
* (at least partially).
+ *
+ * IORING_RECVSEND_BUNDLE Used with IOSQE_BUFFER_SELECT. If set, send or
+ * recv will grab as many buffers from the buffer
+ * group ID given and send them all. The completion
+ * result will be the number of buffers send, with
+ * the starting buffer ID in cqe->flags as per
+ * usual for provided buffer usage. The buffers
+ * will be contiguous from the starting buffer ID.
+ *
+ * IORING_SEND_VECTORIZED If set, SEND[_ZC] will take a pointer to a io_vec
+ * to allow vectorized send operations.
*/
#define IORING_RECVSEND_POLL_FIRST (1U << 0)
#define IORING_RECV_MULTISHOT (1U << 1)
#define IORING_RECVSEND_FIXED_BUF (1U << 2)
#define IORING_SEND_ZC_REPORT_USAGE (1U << 3)
+#define IORING_RECVSEND_BUNDLE (1U << 4)
+#define IORING_SEND_VECTORIZED (1U << 5)
/*
* cqe.res for IORING_CQE_F_NOTIF if
@@ -367,11 +456,13 @@ enum io_uring_op {
* accept flags stored in sqe->ioprio
*/
#define IORING_ACCEPT_MULTISHOT (1U << 0)
+#define IORING_ACCEPT_DONTWAIT (1U << 1)
+#define IORING_ACCEPT_POLL_FIRST (1U << 2)
/*
* IORING_OP_MSG_RING command types, stored in sqe->addr
*/
-enum {
+enum io_uring_msg_ring_flags {
IORING_MSG_DATA, /* pass sqe->len as 'res' and off as user_data */
IORING_MSG_SEND_FD, /* send a registered fd to another ring */
};
@@ -386,11 +477,30 @@ enum {
/* Pass through the flags from sqe->file_index to cqe->flags */
#define IORING_MSG_RING_FLAGS_PASS (1U << 1)
+/*
+ * IORING_OP_FIXED_FD_INSTALL flags (sqe->install_fd_flags)
+ *
+ * IORING_FIXED_FD_NO_CLOEXEC Don't mark the fd as O_CLOEXEC
+ */
+#define IORING_FIXED_FD_NO_CLOEXEC (1U << 0)
+
+/*
+ * IORING_OP_NOP flags (sqe->nop_flags)
+ *
+ * IORING_NOP_INJECT_RESULT Inject result from sqe->result
+ */
+#define IORING_NOP_INJECT_RESULT (1U << 0)
+#define IORING_NOP_FILE (1U << 1)
+#define IORING_NOP_FIXED_FILE (1U << 2)
+#define IORING_NOP_FIXED_BUFFER (1U << 3)
+#define IORING_NOP_TW (1U << 4)
+#define IORING_NOP_CQE32 (1U << 5)
+
/*
* IO completion data structure (Completion Queue Entry)
*/
struct io_uring_cqe {
- __u64 user_data; /* sqe->data submission passed back */
+ __u64 user_data; /* sqe->user_data value passed back */
__s32 res; /* result code for this event */
__u32 flags;
@@ -409,15 +519,33 @@ struct io_uring_cqe {
* IORING_CQE_F_SOCK_NONEMPTY If set, more data to read after socket recv
* IORING_CQE_F_NOTIF Set for notification CQEs. Can be used to distinct
* them from sends.
+ * IORING_CQE_F_BUF_MORE If set, the buffer ID set in the completion will get
+ * more completions. In other words, the buffer is being
+ * partially consumed, and will be used by the kernel for
+ * more completions. This is only set for buffers used via
+ * the incremental buffer consumption, as provided by
+ * a ring buffer setup with IOU_PBUF_RING_INC. For any
+ * other provided buffer type, all completions with a
+ * buffer passed back is automatically returned to the
+ * application.
+ * IORING_CQE_F_SKIP If set, then the application/liburing must ignore this
+ * CQE. It's only purpose is to fill a gap in the ring,
+ * if a large CQE is attempted posted when the ring has
+ * just a single small CQE worth of space left before
+ * wrapping.
+ * IORING_CQE_F_32 If set, this is a 32b/big-cqe posting. Use with rings
+ * setup in a mixed CQE mode, where both 16b and 32b
+ * CQEs may be posted to the CQ ring.
*/
#define IORING_CQE_F_BUFFER (1U << 0)
#define IORING_CQE_F_MORE (1U << 1)
#define IORING_CQE_F_SOCK_NONEMPTY (1U << 2)
#define IORING_CQE_F_NOTIF (1U << 3)
+#define IORING_CQE_F_BUF_MORE (1U << 4)
+#define IORING_CQE_F_SKIP (1U << 5)
+#define IORING_CQE_F_32 (1U << 15)
-enum {
- IORING_CQE_BUFFER_SHIFT = 16,
-};
+#define IORING_CQE_BUFFER_SHIFT 16
/*
* Magic offsets for the application to mmap the data it needs
@@ -478,6 +606,9 @@ struct io_cqring_offsets {
#define IORING_ENTER_SQ_WAIT (1U << 2)
#define IORING_ENTER_EXT_ARG (1U << 3)
#define IORING_ENTER_REGISTERED_RING (1U << 4)
+#define IORING_ENTER_ABS_TIMER (1U << 5)
+#define IORING_ENTER_EXT_ARG_REG (1U << 6)
+#define IORING_ENTER_NO_IOWAIT (1U << 7)
/*
* Passed in for io_uring_setup(2). Copied back with updated info on success
@@ -512,11 +643,15 @@ struct io_uring_params {
#define IORING_FEAT_CQE_SKIP (1U << 11)
#define IORING_FEAT_LINKED_FILE (1U << 12)
#define IORING_FEAT_REG_REG_RING (1U << 13)
+#define IORING_FEAT_RECVSEND_BUNDLE (1U << 14)
+#define IORING_FEAT_MIN_TIMEOUT (1U << 15)
+#define IORING_FEAT_RW_ATTR (1U << 16)
+#define IORING_FEAT_NO_IOWAIT (1U << 17)
/*
* io_uring_register(2) opcodes and arguments
*/
-enum {
+enum io_uring_register_op {
IORING_REGISTER_BUFFERS = 0,
IORING_UNREGISTER_BUFFERS = 1,
IORING_REGISTER_FILES = 2,
@@ -558,6 +693,38 @@ enum {
/* register a range of fixed file slots for automatic slot allocation */
IORING_REGISTER_FILE_ALLOC_RANGE = 25,
+ /* return status information for a buffer group */
+ IORING_REGISTER_PBUF_STATUS = 26,
+
+ /* set/clear busy poll settings */
+ IORING_REGISTER_NAPI = 27,
+ IORING_UNREGISTER_NAPI = 28,
+
+ IORING_REGISTER_CLOCK = 29,
+
+ /* clone registered buffers from source ring to current ring */
+ IORING_REGISTER_CLONE_BUFFERS = 30,
+
+ /* send MSG_RING without having a ring */
+ IORING_REGISTER_SEND_MSG_RING = 31,
+
+ /* register a netdev hw rx queue for zerocopy */
+ IORING_REGISTER_ZCRX_IFQ = 32,
+
+ /* resize CQ ring */
+ IORING_REGISTER_RESIZE_RINGS = 33,
+
+ IORING_REGISTER_MEM_REGION = 34,
+
+ /* query various aspects of io_uring, see linux/io_uring/query.h */
+ IORING_REGISTER_QUERY = 35,
+
+ /* auxiliary zcrx configuration, see enum zcrx_ctrl_op */
+ IORING_REGISTER_ZCRX_CTRL = 36,
+
+ /* register bpf filtering programs */
+ IORING_REGISTER_BPF_FILTER = 37,
+
/* this goes last */
IORING_REGISTER_LAST,
@@ -566,7 +733,7 @@ enum {
};
/* io-wq worker categories */
-enum {
+enum io_wq_type {
IO_WQ_BOUND,
IO_WQ_UNBOUND,
};
@@ -578,6 +745,31 @@ struct io_uring_files_update {
__aligned_u64 /* __s32 * */ fds;
};
+enum {
+ /* initialise with user provided memory pointed by user_addr */
+ IORING_MEM_REGION_TYPE_USER = 1,
+};
+
+struct io_uring_region_desc {
+ __u64 user_addr;
+ __u64 size;
+ __u32 flags;
+ __u32 id;
+ __u64 mmap_offset;
+ __u64 __resv[4];
+};
+
+enum {
+ /* expose the region as registered wait arguments */
+ IORING_MEM_REGION_REG_WAIT_ARG = 1,
+};
+
+struct io_uring_mem_region_reg {
+ __u64 region_uptr; /* struct io_uring_region_desc * */
+ __u64 flags;
+ __u64 __resv[2];
+};
+
/*
* Register a fully sparse file space, rather than pass in an array of all
* -1 file descriptors.
@@ -638,6 +830,32 @@ struct io_uring_restriction {
__u32 resv2[3];
};
+struct io_uring_task_restriction {
+ __u16 flags;
+ __u16 nr_res;
+ __u32 resv[3];
+ __DECLARE_FLEX_ARRAY(struct io_uring_restriction, restrictions);
+};
+
+struct io_uring_clock_register {
+ __u32 clockid;
+ __u32 __resv[3];
+};
+
+enum {
+ IORING_REGISTER_SRC_REGISTERED = (1U << 0),
+ IORING_REGISTER_DST_REPLACE = (1U << 1),
+};
+
+struct io_uring_clone_buffers {
+ __u32 src_fd;
+ __u32 flags;
+ __u32 src_off;
+ __u32 dst_off;
+ __u32 nr;
+ __u32 pad[3];
+};
+
struct io_uring_buf {
__u64 addr;
__u32 len;
@@ -670,9 +888,17 @@ struct io_uring_buf_ring {
* mmap(2) with the offset set as:
* IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT)
* to get a virtual mapping for the ring.
+ * IOU_PBUF_RING_INC: If set, buffers consumed from this buffer ring can be
+ * consumed incrementally. Normally one (or more) buffers
+ * are fully consumed. With incremental consumptions, it's
+ * feasible to register big ranges of buffers, and each
+ * use of it will consume only as much as it needs. This
+ * requires that both the kernel and application keep
+ * track of where the current read/recv index is at.
*/
-enum {
+enum io_uring_register_pbuf_ring_flags {
IOU_PBUF_RING_MMAP = 1,
+ IOU_PBUF_RING_INC = 2,
};
/* argument for IORING_(UN)REGISTER_PBUF_RING */
@@ -681,13 +907,57 @@ struct io_uring_buf_reg {
__u32 ring_entries;
__u16 bgid;
__u16 flags;
- __u64 resv[3];
+ __u32 min_left;
+ __u32 resv[5];
+};
+
+/* argument for IORING_REGISTER_PBUF_STATUS */
+struct io_uring_buf_status {
+ __u32 buf_group; /* input */
+ __u32 head; /* output */
+ __u32 resv[8];
+};
+
+enum io_uring_napi_op {
+ /* register/ungister backward compatible opcode */
+ IO_URING_NAPI_REGISTER_OP = 0,
+
+ /* opcodes to update napi_list when static tracking is used */
+ IO_URING_NAPI_STATIC_ADD_ID = 1,
+ IO_URING_NAPI_STATIC_DEL_ID = 2
+};
+
+enum io_uring_napi_tracking_strategy {
+ /* value must be 0 for backward compatibility */
+ IO_URING_NAPI_TRACKING_DYNAMIC = 0,
+ IO_URING_NAPI_TRACKING_STATIC = 1,
+ IO_URING_NAPI_TRACKING_INACTIVE = 255
+};
+
+/* argument for IORING_(UN)REGISTER_NAPI */
+struct io_uring_napi {
+ __u32 busy_poll_to;
+ __u8 prefer_busy_poll;
+
+ /* a io_uring_napi_op value */
+ __u8 opcode;
+ __u8 pad[2];
+
+ /*
+ * for IO_URING_NAPI_REGISTER_OP, it is a
+ * io_uring_napi_tracking_strategy value.
+ *
+ * for IO_URING_NAPI_STATIC_ADD_ID/IO_URING_NAPI_STATIC_DEL_ID
+ * it is the napi id to add/del from napi_list.
+ */
+ __u32 op_param;
+ __u32 resv;
};
/*
* io_uring_restriction->opcode values
*/
-enum {
+enum io_uring_register_restriction_op {
/* Allow an io_uring_register(2) opcode */
IORING_RESTRICTION_REGISTER_OP = 0,
@@ -703,10 +973,33 @@ enum {
IORING_RESTRICTION_LAST
};
+enum {
+ IORING_REG_WAIT_TS = (1U << 0),
+};
+
+/*
+ * Argument for io_uring_enter(2) with
+ * IORING_GETEVENTS | IORING_ENTER_EXT_ARG_REG set, where the actual argument
+ * is an index into a previously registered fixed wait region described by
+ * the below structure.
+ */
+struct io_uring_reg_wait {
+ struct __kernel_timespec ts;
+ __u32 min_wait_usec;
+ __u32 flags;
+ __u64 sigmask;
+ __u32 sigmask_sz;
+ __u32 pad[3];
+ __u64 pad2[2];
+};
+
+/*
+ * Argument for io_uring_enter(2) with IORING_GETEVENTS | IORING_ENTER_EXT_ARG
+ */
struct io_uring_getevents_arg {
__u64 sigmask;
__u32 sigmask_sz;
- __u32 pad;
+ __u32 min_wait_usec;
__u64 ts;
};
@@ -743,11 +1036,28 @@ struct io_uring_recvmsg_out {
/*
* Argument for IORING_OP_URING_CMD when file is a socket
*/
-enum {
+enum io_uring_socket_op {
SOCKET_URING_OP_SIOCINQ = 0,
SOCKET_URING_OP_SIOCOUTQ,
SOCKET_URING_OP_GETSOCKOPT,
SOCKET_URING_OP_SETSOCKOPT,
+ SOCKET_URING_OP_TX_TIMESTAMP,
+ SOCKET_URING_OP_GETSOCKNAME,
+};
+
+/*
+ * SOCKET_URING_OP_TX_TIMESTAMP definitions
+ */
+
+#define IORING_TIMESTAMP_HW_SHIFT 16
+/* The cqe->flags bit from which the timestamp type is stored */
+#define IORING_TIMESTAMP_TYPE_SHIFT (IORING_TIMESTAMP_HW_SHIFT + 1)
+/* The cqe->flags flag signifying whether it's a hardware timestamp */
+#define IORING_CQE_F_TSTAMP_HW ((__u32)1 << IORING_TIMESTAMP_HW_SHIFT)
+
+struct io_timespec {
+ __u64 tv_sec;
+ __u64 tv_nsec;
};
#ifdef __cplusplus
|
| 29/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11934 output: 28 thoughts: 773 Thoughts: **KMSAN Fuzzing Session Evaluation** Okay, let's break this down. My goal is to determine if this patch series warrants a dedicated KMSAN fuzzing session. I'm operating under the guiding principle that KMSAN is only necessary if the risks introduced are *specifically* uninitialized memory reads or information leaks that wouldn't be caught by KASAN, LockDep, or other standard bug detectors. The key is to determine if this patch touches areas that could introduce uninitialized memory reads that would be exposed to userspace. I need to keep these rules in mind: only flag `NeedsKMSAN=true` if it's new kernel structures sent to userspace (like through `copy_to_user`, ioctl, etc.) and where there could be uninitialized fields; or conditional logic dependent on uninitialized variables; or complex data structure allocation that could expose uninitialized fields; or if bounds/lengths logic could access uninitialized bytes of buffers. Otherwise, if it is about out-of-bounds, overflows, null pointer dereferences, or use-after-free bugs, then it's a KASAN issue, and not KMSAN. So, I see that these patches introduce new file xattr operations via io_uring. Specifically, there's `file_listxattr` and `file_removexattr` being exposed via `IORING_OP_FLISTXATTR` and `IORING_OP_FREMOVEXATTR`. It looks like these are designed to allow userspace to manage extended attributes (xattrs) on files using io_uring. Now, I need to understand the data flow. I need to dig into the `io_uring/xattr.c` code. Specifically, how are the structures involved in the I/O operations (like `struct io_xattr`) initialized, used, and cleaned up? Are there any potential uninitialized reads happening during the xattr listing or removal operations? I'll probably start with `read-file` or `grepper` and look at how the xattr operations are implemented. I need to scrutinize how data is copied between kernel and userspace, looking for any opportunities for uninitialized memory to be leaked. I'll focus particularly on how the xattr data is structured and handled. |
| 30/3 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "struct io_xattr",
"PathPrefix": "io_uring"
}Results: {
"Output": "io_uring/xattr.c-18-\nio_uring/xattr.c:19:struct io_xattr {\nio_uring/xattr.c-20-\tstruct file\t\t\t*file;\n--\nio_uring/xattr.c=25=void io_xattr_cleanup(struct io_kiocb *req)\nio_uring/xattr.c-26-{\nio_uring/xattr.c:27:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-28-\n--\nio_uring/xattr.c=42=static int __io_getxattr_prep(struct io_kiocb *req,\n--\nio_uring/xattr.c-44-{\nio_uring/xattr.c:45:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-46-\tconst char __user *name;\n--\nio_uring/xattr.c=79=int io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-80-{\nio_uring/xattr.c:81:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-82-\tconst char __user *path;\n--\nio_uring/xattr.c=97=int io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-98-{\nio_uring/xattr.c:99:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-100-\tint ret;\n--\nio_uring/xattr.c=109=int io_getxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-110-{\nio_uring/xattr.c:111:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-112-\tCLASS(filename_complete_delayed, name)(\u0026ix-\u003efilename);\n--\nio_uring/xattr.c=122=static int __io_setxattr_prep(struct io_kiocb *req,\n--\nio_uring/xattr.c-124-{\nio_uring/xattr.c:125:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-126-\tconst char __user *name;\n--\nio_uring/xattr.c=151=int io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-152-{\nio_uring/xattr.c:153:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-154-\tconst char __user *path;\n--\nio_uring/xattr.c=174=int io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-175-{\nio_uring/xattr.c:176:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-177-\tint ret;\n--\nio_uring/xattr.c=186=int io_setxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-187-{\nio_uring/xattr.c:188:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-189-\tCLASS(filename_complete_delayed, name)(\u0026ix-\u003efilename);\n--\nio_uring/xattr.c=199=int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-200-{\nio_uring/xattr.c:201:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-202-\tconst char __user *name;\n--\nio_uring/xattr.c=233=int io_fremovexattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-234-{\nio_uring/xattr.c:235:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-236-\tint ret;\n--\nio_uring/xattr.c=245=int io_flistxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/xattr.c-246-{\nio_uring/xattr.c:247:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-248-\n--\nio_uring/xattr.c=270=int io_flistxattr(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/xattr.c-271-{\nio_uring/xattr.c:272:\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\nio_uring/xattr.c-273-\tint ret;\n"
} |
| 31/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 14775 output: 34 thoughts: 17 Thoughts: Here's a first-person summary, tailored for an expert audience, based on the prompt: **Diving into `io_uring/xattr.c`** Alright, let's get down to brass tacks and dissect this `xattr.c` file within the `io_uring` codebase. I'm especially interested in how they're handling extended attributes, specifically in the context of asynchronous I/O. Given the potential for race conditions and complexities with metadata consistency, I'm expecting some clever synchronization techniques and careful consideration of error handling here. I'll be looking for how they are mapping the `io_uring` context to the xattr operations. Are they leveraging the usual `getxattr`, `setxattr`, `listxattr`, and `removexattr` system calls, or is there some custom abstraction layer to integrate them with the ring? I want to see if they're optimizing for different scenarios – small attribute updates versus larger data transfers associated with the attributes. The interaction with the underlying filesystem is key. Are they assuming POSIX semantics or accommodating more sophisticated filesystem-specific features? I'll be checking to see how the file handles errors in an asynchronous I/O context. Does it properly handle errors like ENODATA, E2BIG, and EIO and how it manages retries? Finally, the design of the internal data structures used to track attribute operations is of great interest. How do they handle the lifecycle of buffers and metadata associated with `xattr` operations? Is the implementation thread-safe? This could reveal some interesting performance bottlenecks or optimizations, especially if they are making use of dedicated `io_uring` features like multi-shot SQEs to batch multiple `xattr` operations. Let’s get reading. |
| 32/3 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "io_uring/xattr.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0\n 2:\t#include \u003clinux/kernel.h\u003e\n 3:\t#include \u003clinux/errno.h\u003e\n 4:\t#include \u003clinux/fs.h\u003e\n 5:\t#include \u003clinux/file.h\u003e\n 6:\t#include \u003clinux/mm.h\u003e\n 7:\t#include \u003clinux/slab.h\u003e\n 8:\t#include \u003clinux/namei.h\u003e\n 9:\t#include \u003clinux/io_uring.h\u003e\n 10:\t#include \u003clinux/xattr.h\u003e\n 11:\t\n 12:\t#include \u003cuapi/linux/io_uring.h\u003e\n 13:\t\n 14:\t#include \"../fs/internal.h\"\n 15:\t\n 16:\t#include \"io_uring.h\"\n 17:\t#include \"xattr.h\"\n 18:\t\n 19:\tstruct io_xattr {\n 20:\t\tstruct file\t\t\t*file;\n 21:\t\tstruct kernel_xattr_ctx\t\tctx;\n 22:\t\tstruct delayed_filename\t\tfilename;\n 23:\t};\n 24:\t\n 25:\tvoid io_xattr_cleanup(struct io_kiocb *req)\n 26:\t{\n 27:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 28:\t\n 29:\t\tdismiss_delayed_filename(\u0026ix-\u003efilename);\n 30:\t\tkfree(ix-\u003ectx.kname);\n 31:\t\tkvfree(ix-\u003ectx.kvalue);\n 32:\t}\n 33:\t\n 34:\tstatic void io_xattr_finish(struct io_kiocb *req, int ret)\n 35:\t{\n 36:\t\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\n 37:\t\n 38:\t\tio_xattr_cleanup(req);\n 39:\t\tio_req_set_res(req, ret, 0);\n 40:\t}\n 41:\t\n 42:\tstatic int __io_getxattr_prep(struct io_kiocb *req,\n 43:\t\t\t\t const struct io_uring_sqe *sqe)\n 44:\t{\n 45:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 46:\t\tconst char __user *name;\n 47:\t\tint ret;\n 48:\t\n 49:\t\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n 50:\t\tix-\u003ectx.kvalue = NULL;\n 51:\t\tname = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr));\n 52:\t\tix-\u003ectx.value = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr2));\n 53:\t\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\n 54:\t\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\n 55:\t\n 56:\t\tif (ix-\u003ectx.flags)\n 57:\t\t\treturn -EINVAL;\n 58:\t\n 59:\t\tix-\u003ectx.kname = kmalloc_obj(*ix-\u003ectx.kname);\n 60:\t\tif (!ix-\u003ectx.kname)\n 61:\t\t\treturn -ENOMEM;\n 62:\t\n 63:\t\tret = import_xattr_name(ix-\u003ectx.kname, name);\n 64:\t\tif (ret) {\n 65:\t\t\tkfree(ix-\u003ectx.kname);\n 66:\t\t\treturn ret;\n 67:\t\t}\n 68:\t\n 69:\t\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n 70:\t\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n 71:\t\treturn 0;\n 72:\t}\n 73:\t\n 74:\tint io_fgetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 75:\t{\n 76:\t\treturn __io_getxattr_prep(req, sqe);\n 77:\t}\n 78:\t\n 79:\tint io_getxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 80:\t{\n"
} |
| 33/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16357 output: 36 thoughts: 26 Thoughts: Here's my take on those lines of thinking, as if they were my own: **Diving into the io_uring/xattr.c Implementation** Alright, given the context, I think it's time to dig deeper into the `io_uring/xattr.c` source code, specifically focusing on lines 81 through 200. This section likely contains the core logic related to handling extended attributes. I'm hoping to gain a more granular understanding of how io_uring interacts with xattrs. I want to check for potential race conditions, edge cases that might be overlooked, or even optimization opportunities within that particular code block. A closer look at the error handling and data validation within those lines is crucial for a complete assessment. I need to understand how the system manages the relationship between io_uring's asynchronous nature and the atomic operations typically involved in xattr management. Let's see what gems are hidden in there. |
| 34/3 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "io_uring/xattr.c",
"FirstLine": 81,
"LineCount": 100
}Results: {
"Contents": " 81:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 82:\t\tconst char __user *path;\n 83:\t\tint ret;\n 84:\t\n 85:\t\tif (unlikely(req-\u003eflags \u0026 REQ_F_FIXED_FILE))\n 86:\t\t\treturn -EBADF;\n 87:\t\n 88:\t\tret = __io_getxattr_prep(req, sqe);\n 89:\t\tif (ret)\n 90:\t\t\treturn ret;\n 91:\t\n 92:\t\tpath = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr3));\n 93:\t\n 94:\t\treturn delayed_getname(\u0026ix-\u003efilename, path);\n 95:\t}\n 96:\t\n 97:\tint io_fgetxattr(struct io_kiocb *req, unsigned int issue_flags)\n 98:\t{\n 99:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 100:\t\tint ret;\n 101:\t\n 102:\t\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n 103:\t\n 104:\t\tret = file_getxattr(req-\u003efile, \u0026ix-\u003ectx);\n 105:\t\tio_xattr_finish(req, ret);\n 106:\t\treturn IOU_COMPLETE;\n 107:\t}\n 108:\t\n 109:\tint io_getxattr(struct io_kiocb *req, unsigned int issue_flags)\n 110:\t{\n 111:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 112:\t\tCLASS(filename_complete_delayed, name)(\u0026ix-\u003efilename);\n 113:\t\tint ret;\n 114:\t\n 115:\t\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n 116:\t\n 117:\t\tret = filename_getxattr(AT_FDCWD, name, LOOKUP_FOLLOW, \u0026ix-\u003ectx);\n 118:\t\tio_xattr_finish(req, ret);\n 119:\t\treturn IOU_COMPLETE;\n 120:\t}\n 121:\t\n 122:\tstatic int __io_setxattr_prep(struct io_kiocb *req,\n 123:\t\t\t\tconst struct io_uring_sqe *sqe)\n 124:\t{\n 125:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 126:\t\tconst char __user *name;\n 127:\t\tint ret;\n 128:\t\n 129:\t\tINIT_DELAYED_FILENAME(\u0026ix-\u003efilename);\n 130:\t\tname = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr));\n 131:\t\tix-\u003ectx.cvalue = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr2));\n 132:\t\tix-\u003ectx.kvalue = NULL;\n 133:\t\tix-\u003ectx.size = READ_ONCE(sqe-\u003elen);\n 134:\t\tix-\u003ectx.flags = READ_ONCE(sqe-\u003exattr_flags);\n 135:\t\n 136:\t\tix-\u003ectx.kname = kmalloc_obj(*ix-\u003ectx.kname);\n 137:\t\tif (!ix-\u003ectx.kname)\n 138:\t\t\treturn -ENOMEM;\n 139:\t\n 140:\t\tret = setxattr_copy(name, \u0026ix-\u003ectx);\n 141:\t\tif (ret) {\n 142:\t\t\tkfree(ix-\u003ectx.kname);\n 143:\t\t\treturn ret;\n 144:\t\t}\n 145:\t\n 146:\t\treq-\u003eflags |= REQ_F_NEED_CLEANUP;\n 147:\t\treq-\u003eflags |= REQ_F_FORCE_ASYNC;\n 148:\t\treturn 0;\n 149:\t}\n 150:\t\n 151:\tint io_setxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 152:\t{\n 153:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 154:\t\tconst char __user *path;\n 155:\t\tint ret;\n 156:\t\n 157:\t\tif (unlikely(req-\u003eflags \u0026 REQ_F_FIXED_FILE))\n 158:\t\t\treturn -EBADF;\n 159:\t\n 160:\t\tret = __io_setxattr_prep(req, sqe);\n 161:\t\tif (ret)\n 162:\t\t\treturn ret;\n 163:\t\n 164:\t\tpath = u64_to_user_ptr(READ_ONCE(sqe-\u003eaddr3));\n 165:\t\n 166:\t\treturn delayed_getname(\u0026ix-\u003efilename, path);\n 167:\t}\n 168:\t\n 169:\tint io_fsetxattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n 170:\t{\n 171:\t\treturn __io_setxattr_prep(req, sqe);\n 172:\t}\n 173:\t\n 174:\tint io_fsetxattr(struct io_kiocb *req, unsigned int issue_flags)\n 175:\t{\n 176:\t\tstruct io_xattr *ix = io_kiocb_to_cmd(req, struct io_xattr);\n 177:\t\tint ret;\n 178:\t\n 179:\t\tWARN_ON_ONCE(issue_flags \u0026 IO_URING_F_NONBLOCK);\n 180:\t\n"
} |
| 35/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18217 output: 35 thoughts: 30 Thoughts: Okay, here's my take on those `fs/xattr.c` functions, from my expert perspective: **Diving into Extended Attributes in the Kernel** Alright, so I've been thinking about this xattr implementation, and to get a truly complete picture, I need to focus on a couple of key functions. Let's dig into `file_removexattr` and `file_listxattr`, both found right there in `fs/xattr.c`. These are crucial for understanding how the kernel handles both removing existing extended attributes from a file and retrieving a list of the ones that are currently set. Seeing how these functions interact is going to give me a solid understanding of the read/write process and any potential bottlenecks or areas for optimization. This will help with a good understanding of both the efficiency and security implementations. |
| 36/3 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "ssize_t file_listxattr",
"PathPrefix": "fs/xattr.c"
}Results: {
"Output": "fs/xattr.c=928=listxattr(struct dentry *d, char __user *list, size_t size)\n--\nfs/xattr.c-955-\nfs/xattr.c:956:ssize_t file_listxattr(struct file *f, char __user *list, size_t size)\nfs/xattr.c-957-{\n"
} |
| 37/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18566 output: 35 thoughts: 24 Thoughts: Here's my summary, as though I'm thinking through this process: **Diving into the XFS Extended Attributes Code** Okay, time to get my hands dirty. I'm going to take a look at the `fs/xattr.c` file, specifically around the 950 to 1050 line range. I need to refresh my memory on how XFS handles extended attributes internally. I know the core concepts, but I need a quick refresher on the specifics of this section, maybe how they're stored or retrieved at the lower level. I'm hoping I can piece together the workflow for a particular operation I'm debugging, or maybe I'm looking for a specific optimization. Either way, this targeted section should give me the information I need. |
| 38/3 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "fs/xattr.c",
"FirstLine": 950,
"LineCount": 100
}Results: {
"Contents": " 950:\t\n 951:\t\tkvfree(klist);\n 952:\t\n 953:\t\treturn error;\n 954:\t}\n 955:\t\n 956:\tssize_t file_listxattr(struct file *f, char __user *list, size_t size)\n 957:\t{\n 958:\t\taudit_file(f);\n 959:\t\treturn listxattr(f-\u003ef_path.dentry, list, size);\n 960:\t}\n 961:\t\n 962:\tstatic\n 963:\tssize_t filename_listxattr(int dfd, struct filename *filename,\n 964:\t\t\t\t unsigned int lookup_flags,\n 965:\t\t\t\t char __user *list, size_t size)\n 966:\t{\n 967:\t\tstruct path path;\n 968:\t\tssize_t error;\n 969:\tretry:\n 970:\t\terror = filename_lookup(dfd, filename, lookup_flags, \u0026path, NULL);\n 971:\t\tif (error)\n 972:\t\t\treturn error;\n 973:\t\terror = listxattr(path.dentry, list, size);\n 974:\t\tpath_put(\u0026path);\n 975:\t\tif (retry_estale(error, lookup_flags)) {\n 976:\t\t\tlookup_flags |= LOOKUP_REVAL;\n 977:\t\t\tgoto retry;\n 978:\t\t}\n 979:\t\treturn error;\n 980:\t}\n 981:\t\n 982:\tstatic ssize_t path_listxattrat(int dfd, const char __user *pathname,\n 983:\t\t\t\t\tunsigned int at_flags, char __user *list,\n 984:\t\t\t\t\tsize_t size)\n 985:\t{\n 986:\t\tint lookup_flags;\n 987:\t\n 988:\t\tif ((at_flags \u0026 ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)\n 989:\t\t\treturn -EINVAL;\n 990:\t\n 991:\t\tCLASS(filename_maybe_null, filename)(pathname, at_flags);\n 992:\t\tif (!filename) {\n 993:\t\t\tCLASS(fd, f)(dfd);\n 994:\t\t\tif (fd_empty(f))\n 995:\t\t\t\treturn -EBADF;\n 996:\t\t\treturn file_listxattr(fd_file(f), list, size);\n 997:\t\t}\n 998:\t\n 999:\t\tlookup_flags = (at_flags \u0026 AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;\n1000:\t\treturn filename_listxattr(dfd, filename, lookup_flags, list, size);\n1001:\t}\n1002:\t\n1003:\tSYSCALL_DEFINE5(listxattrat, int, dfd, const char __user *, pathname,\n1004:\t\t\tunsigned int, at_flags,\n1005:\t\t\tchar __user *, list, size_t, size)\n1006:\t{\n1007:\t\treturn path_listxattrat(dfd, pathname, at_flags, list, size);\n1008:\t}\n1009:\t\n1010:\tSYSCALL_DEFINE3(listxattr, const char __user *, pathname, char __user *, list,\n1011:\t\t\tsize_t, size)\n1012:\t{\n1013:\t\treturn path_listxattrat(AT_FDCWD, pathname, 0, list, size);\n1014:\t}\n1015:\t\n1016:\tSYSCALL_DEFINE3(llistxattr, const char __user *, pathname, char __user *, list,\n1017:\t\t\tsize_t, size)\n1018:\t{\n1019:\t\treturn path_listxattrat(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, list, size);\n1020:\t}\n1021:\t\n1022:\tSYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size)\n1023:\t{\n1024:\t\treturn path_listxattrat(fd, NULL, AT_EMPTY_PATH, list, size);\n1025:\t}\n1026:\t\n1027:\t/*\n1028:\t * Extended attribute REMOVE operations\n1029:\t */\n1030:\tstatic long\n1031:\tremovexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n1032:\t{\n1033:\t\tif (is_posix_acl_xattr(name))\n1034:\t\t\treturn vfs_remove_acl(idmap, d, name);\n1035:\t\treturn vfs_removexattr(idmap, d, name);\n1036:\t}\n1037:\t\n1038:\tint file_removexattr(struct file *f, struct xattr_name *kname)\n1039:\t{\n1040:\t\tint error = mnt_want_write_file(f);\n1041:\t\n1042:\t\tif (!error) {\n1043:\t\t\taudit_file(f);\n1044:\t\t\terror = removexattr(file_mnt_idmap(f),\n1045:\t\t\t\t\t f-\u003ef_path.dentry, kname-\u003ename);\n1046:\t\t\tmnt_drop_write_file(f);\n1047:\t\t}\n1048:\t\treturn error;\n1049:\t}\n"
} |
| 39/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 20292 output: 34 thoughts: 37 Thoughts: Here's my take: **Examining `listxattr` in `fs/xattr.c`** Okay, so I'm digging into how extended attributes are handled in the filesystem, and I need to understand `listxattr`. Right, it looks like it's defined in `fs/xattr.c`, specifically lines 910-955. Let's go through this code snippet. I need to understand how this function works because it's the critical building block for listing the extended attributes. Let's start reading it. |
| 40/3 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "fs/xattr.c",
"FirstLine": 910,
"LineCount": 45
}Results: {
"Contents": " 910:\t\n 911:\tSYSCALL_DEFINE4(lgetxattr, const char __user *, pathname,\n 912:\t\t\tconst char __user *, name, void __user *, value, size_t, size)\n 913:\t{\n 914:\t\treturn path_getxattrat(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, name,\n 915:\t\t\t\t value, size);\n 916:\t}\n 917:\t\n 918:\tSYSCALL_DEFINE4(fgetxattr, int, fd, const char __user *, name,\n 919:\t\t\tvoid __user *, value, size_t, size)\n 920:\t{\n 921:\t\treturn path_getxattrat(fd, NULL, AT_EMPTY_PATH, name, value, size);\n 922:\t}\n 923:\t\n 924:\t/*\n 925:\t * Extended attribute LIST operations\n 926:\t */\n 927:\tstatic ssize_t\n 928:\tlistxattr(struct dentry *d, char __user *list, size_t size)\n 929:\t{\n 930:\t\tssize_t error;\n 931:\t\tchar *klist = NULL;\n 932:\t\n 933:\t\tif (size) {\n 934:\t\t\tif (size \u003e XATTR_LIST_MAX)\n 935:\t\t\t\tsize = XATTR_LIST_MAX;\n 936:\t\t\tklist = kvmalloc(size, GFP_KERNEL);\n 937:\t\t\tif (!klist)\n 938:\t\t\t\treturn -ENOMEM;\n 939:\t\t}\n 940:\t\n 941:\t\terror = vfs_listxattr(d, klist, size);\n 942:\t\tif (error \u003e 0) {\n 943:\t\t\tif (size \u0026\u0026 copy_to_user(list, klist, error))\n 944:\t\t\t\terror = -EFAULT;\n 945:\t\t} else if (error == -ERANGE \u0026\u0026 size \u003e= XATTR_LIST_MAX) {\n 946:\t\t\t/* The file system tried to returned a list bigger\n 947:\t\t\t than XATTR_LIST_MAX bytes. Not possible. */\n 948:\t\t\terror = -E2BIG;\n 949:\t\t}\n 950:\t\n 951:\t\tkvfree(klist);\n 952:\t\n 953:\t\treturn error;\n 954:\t}\n"
} |
| 41/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21149 output: 20 thoughts: 585 Thoughts: **Analyzing the io_uring xattr Implementation** Okay, so I'm looking at how the `io_uring` subsystem is handling extended attributes (xattrs) now. I already know that we have existing functions within the xattr framework: `file_removexattr` and `file_listxattr`. These are the core workhorses that the older syscalls like `flistxattr` (which calls `path_listxattrat`) used, eventually leading down to a call to the appropriate file system's implementation. Now, io_uring is adding two new opcodes, `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`. These are the io_uring versions of remove and list. My immediate interest is in the preparation functions, so let's check `io_fremovexattr_prep` and `io_flistxattr_prep` in `io_uring/xattr.c`. Specifically, I'm focusing on `io_fremovexattr_prep` first: Looking at the code for `io_fremovexattr_prep`, it seems pretty straightforward. It's initializing a `struct io_xattr` and then validating some of the `sqe`'s parameters. Any of the parameters are not set to 0, which would indicate a problem with the SQE. It retrieves the xattr name from user space (`sqe->addr`). There's an allocation for `ix->ctx.kname` and a call to `import_xattr_name`. This is where it gets interesting! I'm definitely going to need to look at how `import_xattr_name` works, as it seems crucial for safely handling the xattr name from user space. I need to understand how it's handled to ensure it's not vulnerable to any kind of attack or memory corruption. I need to be sure that the string is handled securely. I'm especially interested in how it validates the user-provided string. Time to dive into `import_xattr_name`! |
| 42/3 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "import_xattr_name"
}Results: {
"Output": "fs/internal.h=299=int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);\nfs/internal.h:300:int import_xattr_name(struct xattr_name *kname, const char __user *name);\nfs/internal.h-301-ssize_t file_listxattr(struct file *f, char __user *list, size_t size);\n--\nfs/xattr.c=613=EXPORT_SYMBOL_GPL(vfs_removexattr);\nfs/xattr.c-614-\nfs/xattr.c:615:int import_xattr_name(struct xattr_name *kname, const char __user *name)\nfs/xattr.c-616-{\n--\nfs/xattr.c=630=int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx)\n--\nfs/xattr.c-636-\nfs/xattr.c:637:\terror = import_xattr_name(ctx-\u003ekname, name);\nfs/xattr.c-638-\tif (error)\n--\nfs/xattr.c=846=static ssize_t path_getxattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-861-\nfs/xattr.c:862:\terror = import_xattr_name(\u0026kname, name);\nfs/xattr.c-863-\tif (error)\n--\nfs/xattr.c=1074=static int path_removexattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-1083-\nfs/xattr.c:1084:\terror = import_xattr_name(\u0026kname, name);\nfs/xattr.c-1085-\tif (error)\n--\nio_uring/xattr.c=42=static int __io_getxattr_prep(struct io_kiocb *req,\n--\nio_uring/xattr.c-62-\nio_uring/xattr.c:63:\tret = import_xattr_name(ix-\u003ectx.kname, name);\nio_uring/xattr.c-64-\tif (ret) {\n--\nio_uring/xattr.c=199=int io_fremovexattr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/xattr.c-220-\nio_uring/xattr.c:221:\tret = import_xattr_name(ix-\u003ectx.kname, name);\nio_uring/xattr.c-222-\tif (ret) {\n"
} |
| 43/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22910 output: 34 thoughts: 24 Thoughts: Here's a first-person summary, keeping in mind the audience is an expert: **Diving into `import_xattr_name`** Alright, let's get into the nitty-gritty of how this attribute name import function, `import_xattr_name`, is implemented within `fs/xattr.c`. I need to see how they're handling the transition, specifically, how it's dealing with the namespace and name mapping during the import. I'm expecting to see the usual checks for size limits, any potential buffer overflows or truncation risks, and how they’re ensuring the name adheres to the expected format for extended attributes. I'm also curious if there's any clever trickery or optimizations happening here, something that might deviate from the straightforward approach. I need to understand how the process interacts with the underlying filesystem's attribute handling. I'm particularly interested in if it utilizes any helper functions or wrappers for common tasks such as name validation. My goal is to grasp the core logic and potential weaknesses or nuances in the design. Any clever uses of the kernel's memory management I'd be looking for, too. So, let's see what's actually going on. |
| 44/3 | 2026/09/20 12:17 | tool | read-file |
0mArgs:{
"File": "fs/xattr.c",
"FirstLine": 613,
"LineCount": 25
}Results: {
"Contents": " 613:\tEXPORT_SYMBOL_GPL(vfs_removexattr);\n 614:\t\n 615:\tint import_xattr_name(struct xattr_name *kname, const char __user *name)\n 616:\t{\n 617:\t\tint error = strncpy_from_user(kname-\u003ename, name,\n 618:\t\t\t\t\t\tsizeof(kname-\u003ename));\n 619:\t\tif (error == 0 || error == sizeof(kname-\u003ename))\n 620:\t\t\treturn -ERANGE;\n 621:\t\tif (error \u003c 0)\n 622:\t\t\treturn error;\n 623:\t\treturn 0;\n 624:\t}\n 625:\t\n 626:\t/*\n 627:\t * Extended attribute SET operations\n 628:\t */\n 629:\t\n 630:\tint setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx)\n 631:\t{\n 632:\t\tint error;\n 633:\t\n 634:\t\tif (ctx-\u003eflags \u0026 ~(XATTR_CREATE|XATTR_REPLACE))\n 635:\t\t\treturn -EINVAL;\n 636:\t\n 637:\t\terror = import_xattr_name(ctx-\u003ekname, name);\n"
} |
| 45/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23586 output: 19 thoughts: 66 Thoughts: **Examining the Implementation of `strncpy_from_user`** Okay, so I'm looking at how this `strncpy_from_user` function handles copying a name from user space. I see that it copies the name and, crucially, it null-terminates the string on success. That's good practice. But then I'm thinking about the return value, and it seems a little odd, since `strncpy_from_user` returns the length *without* including the null terminator. I see that if there's an error and the returned error value is the same size as `name` that it means a -ERANGE error. Makes sense. But I'm suddenly realizing, I'm not entirely clear on the context here. What exactly *is* this `struct xattr_name`? I should probably check that definition to make sure I understand the data structure this function is operating on. Gotta get the details right! |
| 46/3 | 2026/09/20 12:17 | tool | grepper |
0mArgs:{
"Expression": "struct xattr_name"
}Results: {
"Output": "fs/internal.h=268=ssize_t splice_file_to_pipe(struct file *in,\n--\nfs/internal.h-275- */\nfs/internal.h:276:struct xattr_name {\nfs/internal.h-277-\tchar name[XATTR_NAME_MAX + 1];\n--\nfs/internal.h=280=struct kernel_xattr_ctx {\n--\nfs/internal.h-288-\t/* Attribute name */\nfs/internal.h:289:\tstruct xattr_name *kname;\nfs/internal.h-290-\tunsigned int flags;\n--\nfs/internal.h=299=int setxattr_copy(const char __user *name, struct kernel_xattr_ctx *ctx);\nfs/internal.h:300:int import_xattr_name(struct xattr_name *kname, const char __user *name);\nfs/internal.h-301-ssize_t file_listxattr(struct file *f, char __user *list, size_t size);\nfs/internal.h:302:int file_removexattr(struct file *f, struct xattr_name *kname);\nfs/internal.h-303-\n--\nfs/xattr.c=613=EXPORT_SYMBOL_GPL(vfs_removexattr);\nfs/xattr.c-614-\nfs/xattr.c:615:int import_xattr_name(struct xattr_name *kname, const char __user *name)\nfs/xattr.c-616-{\n--\nfs/xattr.c=701=static int path_setxattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-704-{\nfs/xattr.c:705:\tstruct xattr_name kname;\nfs/xattr.c-706-\tstruct kernel_xattr_ctx ctx = {\n--\nfs/xattr.c=846=static ssize_t path_getxattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-849-{\nfs/xattr.c:850:\tstruct xattr_name kname;\nfs/xattr.c-851-\tstruct kernel_xattr_ctx ctx = {\n--\nfs/xattr.c=1031=removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n--\nfs/xattr.c-1037-\nfs/xattr.c:1038:int file_removexattr(struct file *f, struct xattr_name *kname)\nfs/xattr.c-1039-{\n--\nfs/xattr.c=1051=static int filename_removexattr(int dfd, struct filename *filename,\nfs/xattr.c:1052:\t\t\t\tunsigned int lookup_flags, struct xattr_name *kname)\nfs/xattr.c-1053-{\n--\nfs/xattr.c=1074=static int path_removexattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-1076-{\nfs/xattr.c:1077:\tstruct xattr_name kname;\nfs/xattr.c-1078-\tunsigned int lookup_flags;\n"
} |
| 47/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24735 output: 31 thoughts: 1589 Thoughts: **Analyzing io_uring xattr Implementation** Okay, let's break this down. My initial concern was about potential issues with `kmalloc_obj` and how the xattr names are handled in the `io_fremovexattr_prep` function. I saw `ix->ctx.kname` being allocated using `kmalloc_obj`, then populated with `import_xattr_name`, and then used by `removexattr`. This looked very similar to how it's handled in `__io_getxattr_prep`, where the same process occurs. Specifically, I wanted to confirm whether or not there was any possibility of reading beyond a null terminator when the `kname->name` is passed as a `const char *` to `removexattr`. Checking the code I see that `import_xattr_name` uses `strncpy_from_user` to ensure a null-terminated string, and since `removexattr` itself is calling `vfs_removexattr` with this name passed as a `const char *`, it's not a concern. The `vfs_removexattr` function treats this as a standard C string, so it will stop at the null byte. Now, let's shift focus to `io_flistxattr`. This is less concerning from a data corruption standpoint because the filename isn't being directly used. The critical part here is the call to `file_listxattr`, which in turn calls `listxattr` on the file's dentry, and this does all the work. It takes a userspace buffer `list` and size from the sqe and checks the size of the xattr list. The key observation is that `file_listxattr` and `file_removexattr` are simply made non-static so io_uring can call them. This is a crucial detail. The existing `listxattr` (called by `listxattr`, `llistxattr`, and `flistxattr` syscalls) handles the actual fetching and copying of xattr data. This design pattern reuses existing functionality in the kernel. The patch just exposes them for io_uring use. The final piece is how io_uring signals completion. `io_xattr_finish` is called. This function calls `io_req_set_res`, which sets the `cqe.res` and `cqe.flags` fields. This sets the result of the io_uring request. This means that after `file_listxattr` or `file_removexattr` returns, that return value is correctly propagated back to userspace, and no data is being lost. |
| 48/3 | 2026/09/20 12:17 | tool | grepper |
0mError:no matches Args: {
"Expression": "void io_req_set_res",
"PathPrefix": "io_uring"
}Results: {
"error": "no matches"
} |
| 49/3 | 2026/09/20 12:17 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26935 output: 30 thoughts: 13 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Hunting Down `io_req_set_res`** Okay, so I need to track down the implementation of `io_req_set_res`. Immediately, I'm thinking about the context. Is this a user-space library call, a kernel function, or something in between? Given the name, I'd *guess* this deals with I/O request management and result setting. The suffix 'res' certainly points in that direction. My first approach would be to fire up my code search tool (probably `grep`, `ack`, or `ripgrep`, depending on the project and preference – I might even reach for a more sophisticated IDE-integrated search if I'm working in a larger codebase). I'll start with a straightforward search for the exact name, `io_req_set_res`. I'll also try a few variations, considering potential naming conventions within the project, such as `__io_req_set_res`, `_io_req_set_res`, or even something entirely different if there is namespace mangling. From there, I'll need to identify the relevant header files, especially if I can figure out the context of what it may be within. I want to see how this function is *declared* first. The declaration will tell me about its arguments, likely indicating the data structures it operates on. That will guide my search further. I'm going to make sure to check for potential conditional compilation (#ifdefs) that could hide the implementation based on platform or build configurations. If the initial search is too broad, I'll refine it by searching within specific directories. For example, if it's kernel-related, I'll focus on the kernel source tree, or maybe specific driver areas if I have a hunch about what it might manage. If it’s user space, I might be looking at libraries like libaio, or potentially something within the POSIX I/O layer. The key is to narrow the scope by using clues from the name itself and the surrounding project structure. Ultimately, I expect to locate the definition, understand its purpose, and grasp how it interacts with the broader I/O subsystem. This will allow me to understand the context of what I'm looking at. Let's get to it! |
| 50/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "io_req_set_res",
"PathPrefix": "io_uring"
}Results: {
"Output": "io_uring/advise.c=51=int io_madvise(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/advise.c-59-\tret = do_madvise(current-\u003emm, ma-\u003eaddr, ma-\u003elen, ma-\u003eadvice);\nio_uring/advise.c:60:\tio_req_set_res(req, ret, 0);\nio_uring/advise.c-61-\treturn IOU_COMPLETE;\n--\nio_uring/advise.c=96=int io_fadvise(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/advise.c-105-\t\treq_set_fail(req);\nio_uring/advise.c:106:\tio_req_set_res(req, ret, 0);\nio_uring/advise.c-107-\treturn IOU_COMPLETE;\n--\nio_uring/cancel.c=210=int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/cancel.c-242-\t\treq_set_fail(req);\nio_uring/cancel.c:243:\tio_req_set_res(req, ret, 0);\nio_uring/cancel.c-244-\treturn IOU_COMPLETE;\n--\nio_uring/epoll.c=51=int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/epoll.c-73-\t\treq_set_fail(req);\nio_uring/epoll.c:74:\tio_req_set_res(req, ret, 0);\nio_uring/epoll.c-75-\treturn IOU_COMPLETE;\n--\nio_uring/epoll.c=90=int io_epoll_wait(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/epoll.c-100-\nio_uring/epoll.c:101:\tio_req_set_res(req, ret, 0);\nio_uring/epoll.c-102-\treturn IOU_COMPLETE;\n--\nio_uring/fs.c=82=int io_renameat(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/fs.c-94-\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\nio_uring/fs.c:95:\tio_req_set_res(req, ret, 0);\nio_uring/fs.c-96-\treturn IOU_COMPLETE;\n--\nio_uring/fs.c=135=int io_unlinkat(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/fs.c-148-\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\nio_uring/fs.c:149:\tio_req_set_res(req, ret, 0);\nio_uring/fs.c-150-\treturn IOU_COMPLETE;\n--\nio_uring/fs.c=184=int io_mkdirat(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/fs.c-194-\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\nio_uring/fs.c:195:\tio_req_set_res(req, ret, 0);\nio_uring/fs.c-196-\treturn IOU_COMPLETE;\n--\nio_uring/fs.c=236=int io_symlinkat(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/fs.c-247-\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\nio_uring/fs.c:248:\tio_req_set_res(req, ret, 0);\nio_uring/fs.c-249-\treturn IOU_COMPLETE;\n--\nio_uring/fs.c=284=int io_linkat(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/fs.c-295-\treq-\u003eflags \u0026= ~REQ_F_NEED_CLEANUP;\nio_uring/fs.c:296:\tio_req_set_res(req, ret, 0);\nio_uring/fs.c-297-\treturn IOU_COMPLETE;\n--\nio_uring/futex.c=65=static void io_futexv_complete(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/futex.c-77-\t\tif (res != -1)\nio_uring/futex.c:78:\t\t\tio_req_set_res(req, res, 0);\nio_uring/futex.c-79-\t}\n--\nio_uring/futex.c=92=static bool __io_futex_cancel(struct io_kiocb *req)\n--\nio_uring/futex.c-109-\thlist_del_init(\u0026req-\u003ehash_node);\nio_uring/futex.c:110:\tio_req_set_res(req, -ECANCELED, 0);\nio_uring/futex.c-111-\tio_req_task_work_add(req);\n--\nio_uring/futex.c=170=static void io_futex_wakev_fn(struct wake_q_head *wake_q, struct futex_q *q)\n--\nio_uring/futex.c-181-\nio_uring/futex.c:182:\tio_req_set_res(req, 0, 0);\nio_uring/futex.c-183-\treq-\u003eio_task_work.func = io_futexv_complete;\n--\nio_uring/futex.c=230=static void io_futex_wake_fn(struct wake_q_head *wake_q, struct futex_q *q)\n--\nio_uring/futex.c-237-\nio_uring/futex.c:238:\tio_req_set_res(req, 0, 0);\nio_uring/futex.c-239-\treq-\u003eio_task_work.func = io_futex_complete;\n--\nio_uring/futex.c=243=int io_futexv_wait(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/futex.c-259-\t\treq_set_fail(req);\nio_uring/futex.c:260:\t\tio_req_set_res(req, ret, 0);\nio_uring/futex.c-261-\t\tio_req_async_data_free(req);\n--\nio_uring/futex.c-288-\t\tif (woken != -1)\nio_uring/futex.c:289:\t\t\tio_req_set_res(req, woken, 0);\nio_uring/futex.c-290-\t}\n--\nio_uring/futex.c=296=int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/futex.c-335-\t\treq_set_fail(req);\nio_uring/futex.c:336:\tio_req_set_res(req, ret, 0);\nio_uring/futex.c-337-\tio_req_async_data_free(req);\n--\nio_uring/futex.c=341=int io_futex_wake(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/futex.c-353-\t\treq_set_fail(req);\nio_uring/futex.c:354:\tio_req_set_res(req, ret, 0);\nio_uring/futex.c-355-\treturn IOU_COMPLETE;\n--\nio_uring/io_uring.c=174=static inline void req_fail_link_node(struct io_kiocb *req, int res)\n--\nio_uring/io_uring.c-176-\treq_set_fail(req);\nio_uring/io_uring.c:177:\tio_req_set_res(req, res, 0);\nio_uring/io_uring.c-178-}\n--\nio_uring/io_uring.c=968=void io_req_defer_failed(struct io_kiocb *req, s32 res)\n--\nio_uring/io_uring.c-975-\treq_set_fail(req);\nio_uring/io_uring.c:976:\tio_req_set_res(req, res, io_put_kbuf(req, res, NULL));\nio_uring/io_uring.c-977-\tif (def-\u003efail)\n--\nio_uring/io_uring.c=1070=void io_req_task_queue_fail(struct io_kiocb *req, int ret)\nio_uring/io_uring.c-1071-{\nio_uring/io_uring.c:1072:\tio_req_set_res(req, ret, 0);\nio_uring/io_uring.c-1073-\treq-\u003eio_task_work.func = io_req_task_cancel;\n--\nio_uring/io_uring.h=513=static inline void io_req_queue_tw_complete(struct io_kiocb *req, s32 res)\nio_uring/io_uring.h-514-{\nio_uring/io_uring.h:515:\tio_req_set_res(req, res, 0);\nio_uring/io_uring.h-516-\treq-\u003eio_task_work.func = io_req_task_complete;\n--\nio_uring/kbuf.c=612=int io_manage_buffers_legacy(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/kbuf.c-625-\t\treq_set_fail(req);\nio_uring/kbuf.c:626:\tio_req_set_res(req, ret, 0);\nio_uring/kbuf.c-627-\treturn IOU_COMPLETE;\n--\nio_uring/msg_ring.c=83=static void io_msg_remote_post(struct io_ring_ctx *ctx, struct io_kiocb *req,\n--\nio_uring/msg_ring.c-87-\treq-\u003ecqe.user_data = user_data;\nio_uring/msg_ring.c:88:\tio_req_set_res(req, res, cflags);\nio_uring/msg_ring.c-89-\tpercpu_ref_get(\u0026ctx-\u003erefs);\n--\nio_uring/msg_ring.c=304=int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-330-\t}\nio_uring/msg_ring.c:331:\tio_req_set_res(req, ret, 0);\nio_uring/msg_ring.c-332-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=137=int io_shutdown(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-149-\tret = __sys_shutdown_sock(sock, shutdown-\u003ehow);\nio_uring/net.c:150:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-151-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=491=static inline bool io_send_finish(struct io_kiocb *req,\n--\nio_uring/net.c-523-finish:\nio_uring/net.c:524:\tio_req_set_res(req, sel-\u003eval, cflags);\nio_uring/net.c-525-\tsel-\u003eval = IOU_COMPLETE;\n--\nio_uring/net.c=529=int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-573-\t\tret = sr-\u003edone_io;\nio_uring/net.c:574:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-575-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=853=static inline bool io_recv_finish(struct io_kiocb *req,\n--\nio_uring/net.c-929-finish:\nio_uring/net.c:930:\tio_req_set_res(req, sel-\u003eval, cflags);\nio_uring/net.c-931-\tsel-\u003eval = IOU_COMPLETE;\n--\nio_uring/net.c=1322=int io_recvzc(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1339-\tif (len \u0026\u0026 zc-\u003elen == 0) {\nio_uring/net.c:1340:\t\tio_req_set_res(req, 0, 0);\nio_uring/net.c-1341-\n--\nio_uring/net.c-1350-\t\treq_set_fail(req);\nio_uring/net.c:1351:\t\tio_req_set_res(req, ret, 0);\nio_uring/net.c-1352-\t\treturn IOU_COMPLETE;\n--\nio_uring/net.c=1527=int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1593-\t}\nio_uring/net.c:1594:\tio_req_set_res(req, ret, IORING_CQE_F_MORE);\nio_uring/net.c-1595-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=1647=int io_accept(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1701-\nio_uring/net.c:1702:\tio_req_set_res(req, ret, cflags);\nio_uring/net.c-1703-\tif (ret \u003c 0)\n--\nio_uring/net.c=1778=int io_socket(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1806-\t}\nio_uring/net.c:1807:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-1808-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=1830=int io_connect(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1875-\t\treq_set_fail(req);\nio_uring/net.c:1876:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-1877-\treturn IOU_COMPLETE;\n--\nio_uring/net.c=1922=int io_bind(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1935-\t\treq_set_fail(req);\nio_uring/net.c:1936:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-1937-\treturn 0;\n--\nio_uring/net.c=1951=int io_listen(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/net.c-1963-\t\treq_set_fail(req);\nio_uring/net.c:1964:\tio_req_set_res(req, ret, 0);\nio_uring/net.c-1965-\treturn 0;\n--\nio_uring/nop.c=58=int io_nop(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/nop.c-80-\tif (nop-\u003eflags \u0026 IORING_NOP_CQE32)\nio_uring/nop.c:81:\t\tio_req_set_res32(req, ret, 0, nop-\u003eextra1, nop-\u003eextra2);\nio_uring/nop.c-82-\telse\nio_uring/nop.c:83:\t\tio_req_set_res(req, ret, 0);\nio_uring/nop.c-84-\tif (nop-\u003eflags \u0026 IORING_NOP_TW) {\n--\nio_uring/openclose.c=123=int io_openat2(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-183-\t\treq_set_fail(req);\nio_uring/openclose.c:184:\tio_req_set_res(req, ret, 0);\nio_uring/openclose.c-185-\treturn IOU_COMPLETE;\n--\nio_uring/openclose.c=236=int io_close(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-270-\t\treq_set_fail(req);\nio_uring/openclose.c:271:\tio_req_set_res(req, ret, 0);\nio_uring/openclose.c-272-\treturn IOU_COMPLETE;\n--\nio_uring/openclose.c=305=int io_install_fixed_fd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-313-\t\treq_set_fail(req);\nio_uring/openclose.c:314:\tio_req_set_res(req, ret, 0);\nio_uring/openclose.c-315-\treturn IOU_COMPLETE;\n--\nio_uring/openclose.c=423=int io_pipe(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-437-\nio_uring/openclose.c:438:\tio_req_set_res(req, ret, 0);\nio_uring/openclose.c-439-\tif (!ret)\n--\nio_uring/poll.c=211=static void __io_poll_execute(struct io_kiocb *req, int mask, unsigned tw_flags)\n--\nio_uring/poll.c-214-\nio_uring/poll.c:215:\tio_req_set_res(req, mask, 0);\nio_uring/poll.c-216-\treq-\u003eio_task_work.func = io_poll_task_func;\n--\nio_uring/poll.c=242=static int io_poll_check_events(struct io_kiocb *req, io_tw_token_t tw)\n--\nio_uring/poll.c-306-\t\t\tif (!io_req_post_cqe(req, mask, IORING_CQE_F_MORE)) {\nio_uring/poll.c:307:\t\t\t\tio_req_set_res(req, mask, 0);\nio_uring/poll.c-308-\t\t\t\treturn IOU_POLL_REMOVE_POLL_USE_RES;\n--\nio_uring/poll.c=339=void io_poll_task_func(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/poll.c-368-\nio_uring/poll.c:369:\t\tio_req_set_res(req, req-\u003ecqe.res, 0);\nio_uring/poll.c-370-\t\tio_req_task_complete(tw_req, tw);\n--\nio_uring/poll.c=901=int io_poll_add(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/poll.c-910-\tif (ret \u003e 0) {\nio_uring/poll.c:911:\t\tio_req_set_res(req, ipt.result_mask, 0);\nio_uring/poll.c-912-\t\treturn IOU_COMPLETE;\n--\nio_uring/poll.c=917=int io_poll_remove(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/poll.c-957-\nio_uring/poll.c:958:\tio_req_set_res(preq, -ECANCELED, 0);\nio_uring/poll.c-959-complete:\n--\nio_uring/poll.c-970-\t/* complete update request, we're done with it */\nio_uring/poll.c:971:\tio_req_set_res(req, ret, 0);\nio_uring/poll.c-972-\treturn IOU_COMPLETE;\n--\nio_uring/rsrc.c=557=int io_files_update(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/rsrc.c-581-\t\treq_set_fail(req);\nio_uring/rsrc.c:582:\tio_req_set_res(req, ret, 0);\nio_uring/rsrc.c-583-\treturn IOU_COMPLETE;\n--\nio_uring/rw.c=581=static void io_complete_rw(struct kiocb *kiocb, long res)\n--\nio_uring/rw.c-590-\t__io_complete_rw_common(req, res);\nio_uring/rw.c:591:\tio_req_set_res(req, io_fixup_rw_res(req, res), 0);\nio_uring/rw.c-592-\treq-\u003eio_task_work.func = io_req_rw_complete;\n--\nio_uring/rw.c=650=static int kiocb_done(struct io_kiocb *req, ssize_t ret,\n--\nio_uring/rw.c-668-\t\t\tcflags = io_put_kbuf(req, ret, sel-\u003ebuf_list);\nio_uring/rw.c:669:\t\tio_req_set_res(req, final_ret, cflags);\nio_uring/rw.c-670-\t\tio_req_rw_cleanup(req, issue_flags);\n--\nio_uring/rw.c=1043=int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/rw.c-1106-\t */\nio_uring/rw.c:1107:\tio_req_set_res(req, ret, cflags);\nio_uring/rw.c-1108-\tio_req_rw_cleanup(req, issue_flags);\n--\nio_uring/rw.c=1249=void io_rw_fail(struct io_kiocb *req)\n--\nio_uring/rw.c-1253-\tres = io_fixup_rw_res(req, req-\u003ecqe.res);\nio_uring/rw.c:1254:\tio_req_set_res(req, res, req-\u003ecqe.flags);\nio_uring/rw.c-1255-}\n--\nio_uring/splice.c=82=int io_tee(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/splice.c-105-\t\treq_set_fail(req);\nio_uring/splice.c:106:\tio_req_set_res(req, ret, 0);\nio_uring/splice.c-107-\treturn IOU_COMPLETE;\n--\nio_uring/splice.c=119=int io_splice(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/splice.c-146-\t\treq_set_fail(req);\nio_uring/splice.c:147:\tio_req_set_res(req, ret, 0);\nio_uring/splice.c-148-\treturn IOU_COMPLETE;\n--\nio_uring/statx.c=50=int io_statx(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/statx.c-58-\tret = do_statx(sx-\u003edfd, name, sx-\u003eflags, sx-\u003emask, sx-\u003ebuffer);\nio_uring/statx.c:59:\tio_req_set_res(req, ret, 0);\nio_uring/statx.c-60-\treturn IOU_COMPLETE;\n--\nio_uring/sync.c=40=int io_sync_file_range(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/sync.c-48-\tret = sync_file_range(req-\u003efile, sync-\u003eoff, sync-\u003elen, sync-\u003eflags);\nio_uring/sync.c:49:\tio_req_set_res(req, ret, 0);\nio_uring/sync.c-50-\treturn IOU_COMPLETE;\n--\nio_uring/sync.c=72=int io_fsync(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/sync.c-82-\t\t\t\tsync-\u003eflags \u0026 IORING_FSYNC_DATASYNC);\nio_uring/sync.c:83:\tio_req_set_res(req, ret, 0);\nio_uring/sync.c-84-\treturn IOU_COMPLETE;\n--\nio_uring/sync.c=101=int io_fallocate(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/sync.c-111-\t\tfsnotify_modify(req-\u003efile);\nio_uring/sync.c:112:\tio_req_set_res(req, ret, 0);\nio_uring/sync.c-113-\treturn IOU_COMPLETE;\n--\nio_uring/timeout.c=200=static void io_req_tw_fail_links(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/timeout.c-211-\t\tlink-\u003elink = NULL;\nio_uring/timeout.c:212:\t\tio_req_set_res(link, res, 0);\nio_uring/timeout.c-213-\t\tio_req_task_complete((struct io_tw_req){link}, tw);\n--\nio_uring/timeout.c=300=static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)\n--\nio_uring/timeout.c-317-\nio_uring/timeout.c:318:\tio_req_set_res(req, -ETIME, 0);\nio_uring/timeout.c-319-\treq-\u003eio_task_work.func = io_timeout_complete;\n--\nio_uring/timeout.c=366=static void io_req_task_link_timeout(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/timeout.c-391-\t\t}\nio_uring/timeout.c:392:\t\tio_req_set_res(req, ret ?: -ETIME, 0);\nio_uring/timeout.c-393-\t\tio_req_task_complete(tw_req, tw);\n--\nio_uring/timeout.c-395-\t} else {\nio_uring/timeout.c:396:\t\tio_req_set_res(req, -ETIME, 0);\nio_uring/timeout.c-397-\t\tio_req_task_complete(tw_req, tw);\n--\nio_uring/timeout.c=532=int io_timeout_remove(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/timeout.c-556-\t\treq_set_fail(req);\nio_uring/timeout.c:557:\tio_req_set_res(req, ret, 0);\nio_uring/timeout.c-558-\treturn IOU_COMPLETE;\n--\nio_uring/truncate.c=37=int io_ftruncate(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/truncate.c-45-\nio_uring/truncate.c:46:\tio_req_set_res(req, ret, 0);\nio_uring/truncate.c-47-\treturn IOU_COMPLETE;\n--\nio_uring/uring_cmd.c=226=int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/uring_cmd.c-267-\tio_req_uring_cleanup(req, issue_flags);\nio_uring/uring_cmd.c:268:\tio_req_set_res(req, ret, 0);\nio_uring/uring_cmd.c-269-\treturn IOU_COMPLETE;\n--\nio_uring/uring_cmd.c=370=bool io_uring_mshot_cmd_post_cqe(struct io_uring_cmd *ioucmd,\n--\nio_uring/uring_cmd.c-387-\t\treq_set_fail(req);\nio_uring/uring_cmd.c:388:\tio_req_set_res(req, sel-\u003eval, cflags);\nio_uring/uring_cmd.c-389-\treturn true;\n--\nio_uring/waitid.c=128=static void io_waitid_complete(struct io_kiocb *req, int ret, bool copy_si)\n--\nio_uring/waitid.c-145-\t\treq_set_fail(req);\nio_uring/waitid.c:146:\tio_req_set_res(req, ret, 0);\nio_uring/waitid.c-147-}\n--\nio_uring/waitid.c=301=int io_waitid(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/waitid.c-365-\t\treq_set_fail(req);\nio_uring/waitid.c:366:\tio_req_set_res(req, ret, 0);\nio_uring/waitid.c-367-\treturn IOU_COMPLETE;\n--\nio_uring/xattr.c=34=static void io_xattr_finish(struct io_kiocb *req, int ret)\n--\nio_uring/xattr.c-38-\tio_xattr_cleanup(req);\nio_uring/xattr.c:39:\tio_req_set_res(req, ret, 0);\nio_uring/xattr.c-40-}\n"
} |
| 51/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35480 output: 31 thoughts: 2796 Thoughts: **io_uring xattr Operations Analysis: A Deep Dive** Okay, so I've been tracing through these new `io_uring` additions for extended attribute operations, specifically `FREMOVEXATTR` and `FLISTXATTR`. The initial observation is that `io_xattr_finish` is now utilized across a broader spectrum, encompassing these new operations in addition to `FGETXATTR` and `FSETXATTR`. That is expected, but worth noting. I then had a bit of a moment regarding a large diff in `tools/include/uapi/linux/io_uring.h`, but I quickly realized it was just a sync with the upstream kernel headers, which makes sense. The real changes are focused, as I see, solely on the addition of the enum entries for `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`. Now, digging into the `io_fremovexattr_prep` function, I initially had a question about complete `ix->ctx` initialization. After examining the structure `kernel_xattr_ctx`, the prep function seems sound. The fields, `kname` and `kvalue`, are initialized correctly, with `kname` allocated and populated based on the user-supplied name. Crucially, the code handles potential errors during name import, freeing `kname` and setting it to `NULL` to prevent double-frees. The `ix->ctx.kvalue` is initialized to NULL. The cleanup function is critical to verify, and does appear correct, ensuring resources are freed appropriately, and that no memory is leaked or double-freed. Moving on to `io_fremovexattr`, all it does is call `file_removexattr` with the prepared kernel data. This looks straightforward; `file_removexattr` itself is standard VFS operation and appears to only use `kname->name`, which is fine, and that is what `removexattr` needs. The real interesting point came with `io_flistxattr_prep` and `io_flistxattr`. This new function simply exposes the existing `file_listxattr` to the `io_uring` infrastructure. The important thing is that `file_listxattr` calls `listxattr`, and `listxattr` does an allocation of a kernel buffer via `kvmalloc`, which is then copied to user space. It is a good thing that the patch _didn't_ change `listxattr` as that is very low risk. It's an existing and tested path for `flistxattr`. The check and allocation for the list is already handled and is safe. The key is that the kernel handles the allocation and the copying, which is correct. Finally, I checked `io_issue_defs` and `io_cold_defs` in `io_uring/opdef.c` for `FREMOVEXATTR` and `FLISTXATTR` and those appear correct; linking the correct preparation, issue, and cleanup functions. I confirmed that these structures are consistent with the other xattr operations in `io_uring`. So, from a preliminary assessment, everything appears sound and no major red flags were raised. The existing xattr code paths seem to be correctly leveraged within the new `io_uring` context. |
| 52/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "FGETXATTR|SETXATTR",
"PathPrefix": "io_uring"
}Results: {
"Output": "io_uring/opdef.c=54=const struct io_issue_def io_issue_defs[] = {\n--\nio_uring/opdef.c-387-\t},\nio_uring/opdef.c:388:\t[IORING_OP_FSETXATTR] = {\nio_uring/opdef.c-389-\t\t.needs_file = 1,\n--\nio_uring/opdef.c-392-\t},\nio_uring/opdef.c:393:\t[IORING_OP_SETXATTR] = {\nio_uring/opdef.c-394-\t\t.prep\t\t\t= io_setxattr_prep,\n--\nio_uring/opdef.c-396-\t},\nio_uring/opdef.c:397:\t[IORING_OP_FGETXATTR] = {\nio_uring/opdef.c-398-\t\t.needs_file = 1,\n--\nio_uring/opdef.c=606=const struct io_cold_def io_cold_defs[] = {\n--\nio_uring/opdef.c-768-\t},\nio_uring/opdef.c:769:\t[IORING_OP_FSETXATTR] = {\nio_uring/opdef.c:770:\t\t.name\t\t\t= \"FSETXATTR\",\nio_uring/opdef.c-771-\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-772-\t},\nio_uring/opdef.c:773:\t[IORING_OP_SETXATTR] = {\nio_uring/opdef.c:774:\t\t.name\t\t\t= \"SETXATTR\",\nio_uring/opdef.c-775-\t\t.cleanup\t\t= io_xattr_cleanup,\nio_uring/opdef.c-776-\t},\nio_uring/opdef.c:777:\t[IORING_OP_FGETXATTR] = {\nio_uring/opdef.c:778:\t\t.name\t\t\t= \"FGETXATTR\",\nio_uring/opdef.c-779-\t\t.cleanup\t\t= io_xattr_cleanup,\n"
} |
| 53/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 39579 output: 36 thoughts: 28 Thoughts: Here's my take on the thought process, as if it were my own: **Analyzing io\_issue\_def for FGETXATTR and FSETXATTR** Okay, so I need to quickly refresh my memory on the data structures. I'm focusing specifically on how `io_issue_def` is set up for handling the `FGETXATTR` and `FSETXATTR` operations. I want to understand the typical flow here, especially the structure's layout and how it's used to pass the relevant attributes to the underlying filesystem calls. I know the general principles, but the specific details are critical when you're debugging or optimizing. I need to ensure there are no obvious inconsistencies or potential bottlenecks in the data structures that could be contributing to performance issues or unexpected behavior. Right, let's dive into the code and see exactly how those structures are initialized and used in those two functions. Gotta make sure everything lines up right; any mismatch can cause a cascade of problems down the line. |
| 54/3 | 2026/09/20 12:18 | tool | read-file |
0mArgs:{
"File": "io_uring/opdef.c",
"FirstLine": 385,
"LineCount": 30
}Results: {
"Contents": " 385:\t\t\t.prep\t\t\t= io_msg_ring_prep,\n 386:\t\t\t.issue\t\t\t= io_msg_ring,\n 387:\t\t},\n 388:\t\t[IORING_OP_FSETXATTR] = {\n 389:\t\t\t.needs_file = 1,\n 390:\t\t\t.prep\t\t\t= io_fsetxattr_prep,\n 391:\t\t\t.issue\t\t\t= io_fsetxattr,\n 392:\t\t},\n 393:\t\t[IORING_OP_SETXATTR] = {\n 394:\t\t\t.prep\t\t\t= io_setxattr_prep,\n 395:\t\t\t.issue\t\t\t= io_setxattr,\n 396:\t\t},\n 397:\t\t[IORING_OP_FGETXATTR] = {\n 398:\t\t\t.needs_file = 1,\n 399:\t\t\t.prep\t\t\t= io_fgetxattr_prep,\n 400:\t\t\t.issue\t\t\t= io_fgetxattr,\n 401:\t\t},\n 402:\t\t[IORING_OP_GETXATTR] = {\n 403:\t\t\t.prep\t\t\t= io_getxattr_prep,\n 404:\t\t\t.issue\t\t\t= io_getxattr,\n 405:\t\t},\n 406:\t\t[IORING_OP_SOCKET] = {\n 407:\t\t\t.audit_skip\t\t= 1,\n 408:\t#if defined(CONFIG_NET)\n 409:\t\t\t.filter_pdu_size\t= sizeof_field(struct io_uring_bpf_ctx, socket),\n 410:\t\t\t.prep\t\t\t= io_socket_prep,\n 411:\t\t\t.issue\t\t\t= io_socket,\n 412:\t\t\t.filter_populate\t= io_socket_bpf_populate,\n 413:\t#else\n 414:\t\t\t.prep\t\t\t= io_eopnotsupp_prep,\n"
} |
| 55/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40363 output: 32 thoughts: 92 Thoughts: Okay, let's break this down. **Investigating Potential Memory Safety Concerns in Xattr Handling** Right, so I'm digging into potential vulnerabilities, specifically related to extended attributes (xattrs) in the I/O subsystem. My immediate concern is whether either `io_fremovexattr_prep` or `io_flistxattr_prep` *might* be using uninitialized memory. This is a common pitfall and a potential source of information leaks or, worse, exploitable flaws. To figure this out, the next logical step is to analyze the data flow. My gut says to look at how the `io_xattr` struct is used, and in particular how it's being populated. So, let's trace it back. The key function to look at here is `io_kiocb_to_cmd(req, struct io_xattr)`. This function is likely the linchpin, translating the generic I/O control block (`io_kiocb`) into the specific xattr context. Therefore, I need to know precisely *how* `io_kiocb_to_cmd` handles the `io_xattr` struct. Let's start with a focused search on the function `io_kiocb_to_cmd` to see what information gets passed along and how it is used. I'll need to review the code path to understand how xattr buffers are managed and whether any of the relevant data structures could be accidentally used before they are initialized. |
| 56/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "io_kiocb_to_cmd",
"PathPrefix": "io_uring"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 989 lines.\nUse more precise expression if possible.\n\nio_uring/advise.c=31=int io_madvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/advise.c-33-#if defined(CONFIG_ADVISE_SYSCALLS) \u0026\u0026 defined(CONFIG_MMU)\nio_uring/advise.c:34:\tstruct io_madvise *ma = io_kiocb_to_cmd(req, struct io_madvise);\nio_uring/advise.c-35-\n--\nio_uring/advise.c=51=int io_madvise(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/advise.c-53-#if defined(CONFIG_ADVISE_SYSCALLS) \u0026\u0026 defined(CONFIG_MMU)\nio_uring/advise.c:54:\tstruct io_madvise *ma = io_kiocb_to_cmd(req, struct io_madvise);\nio_uring/advise.c-55-\tint ret;\n--\nio_uring/advise.c=79=int io_fadvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/advise.c-80-{\nio_uring/advise.c:81:\tstruct io_fadvise *fa = io_kiocb_to_cmd(req, struct io_fadvise);\nio_uring/advise.c-82-\n--\nio_uring/advise.c=96=int io_fadvise(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/advise.c-97-{\nio_uring/advise.c:98:\tstruct io_fadvise *fa = io_kiocb_to_cmd(req, struct io_fadvise);\nio_uring/advise.c-99-\tint ret;\n--\nio_uring/cancel.c=140=int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/cancel.c-141-{\nio_uring/cancel.c:142:\tstruct io_cancel *cancel = io_kiocb_to_cmd(req, struct io_cancel);\nio_uring/cancel.c-143-\n--\nio_uring/cancel.c=210=int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/cancel.c-211-{\nio_uring/cancel.c:212:\tstruct io_cancel *cancel = io_kiocb_to_cmd(req, struct io_cancel);\nio_uring/cancel.c-213-\tstruct io_cancel_data cd = {\n--\nio_uring/epoll.c=29=int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/epoll.c-30-{\nio_uring/epoll.c:31:\tstruct io_epoll *epoll = io_kiocb_to_cmd(req, struct io_epoll);\nio_uring/epoll.c-32-\n--\nio_uring/epoll.c=51=int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/epoll.c-52-{\nio_uring/epoll.c:53:\tstruct io_epoll *ie = io_kiocb_to_cmd(req, struct io_epoll);\nio_uring/epoll.c-54-\tbool force_nonblock = issue_flags \u0026 IO_URING_F_NONBLOCK;\n--\nio_uring/epoll.c=78=int io_epoll_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/epoll.c-79-{\nio_uring/epoll.c:80:\tstruct io_epoll_wait *iew = io_kiocb_to_cmd(req, struct io_epoll_wait);\nio_uring/epoll.c-81-\n--\nio_uring/epoll.c=90=int io_epoll_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/epoll.c-91-{\nio_uring/epoll.c:92:\tstruct io_epoll_wait *iew = io_kiocb_to_cmd(req, struct io_epoll_wait);\nio_uring/epoll.c-93-\tint ret;\n--\nio_uring/fs.c=50=int io_renameat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-51-{\nio_uring/fs.c:52:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-53-\tconst char __user *oldf, *newf;\n--\nio_uring/fs.c=82=int io_renameat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-83-{\nio_uring/fs.c:84:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-85-\tCLASS(filename_complete_delayed, old)(\u0026ren-\u003eoldpath);\n--\nio_uring/fs.c=99=void io_renameat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-100-{\nio_uring/fs.c:101:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-102-\n--\nio_uring/fs.c=107=int io_unlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-108-{\nio_uring/fs.c:109:\tstruct io_unlink *un = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-110-\tconst char __user *fname;\n--\nio_uring/fs.c=135=int io_unlinkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-136-{\nio_uring/fs.c:137:\tstruct io_unlink *un = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-138-\tCLASS(filename_complete_delayed, name)(\u0026un-\u003efilename);\n--\nio_uring/fs.c=153=void io_unlinkat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-154-{\nio_uring/fs.c:155:\tstruct io_unlink *ul = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-156-\n--\nio_uring/fs.c=160=int io_mkdirat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-161-{\nio_uring/fs.c:162:\tstruct io_mkdir *mkd = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-163-\tconst char __user *fname;\n--\nio_uring/fs.c=184=int io_mkdirat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-185-{\nio_uring/fs.c:186:\tstruct io_mkdir *mkd = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-187-\tCLASS(filename_complete_delayed, name)(\u0026mkd-\u003efilename);\n--\nio_uring/fs.c=199=void io_mkdirat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-200-{\nio_uring/fs.c:201:\tstruct io_mkdir *md = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-202-\n--\nio_uring/fs.c=206=int io_symlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-207-{\nio_uring/fs.c:208:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-209-\tconst char __user *oldpath, *newpath;\n--\nio_uring/fs.c=236=int io_symlinkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-237-{\nio_uring/fs.c:238:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-239-\tCLASS(filename_complete_delayed, old)(\u0026sl-\u003eoldpath);\n--\nio_uring/fs.c=252=int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-253-{\nio_uring/fs.c:254:\tstruct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-255-\tconst char __user *oldf, *newf;\n--\nio_uring/fs.c=284=int io_linkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-285-{\nio_uring/fs.c:286:\tstruct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-287-\tCLASS(filename_complete_delayed, old)(\u0026lnk-\u003eoldpath);\n--\nio_uring/fs.c=300=void io_link_cleanup(struct io_kiocb *req)\nio_uring/fs.c-301-{\nio_uring/fs.c:302:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-303-\n--\nio_uring/futex.c=65=static void io_futexv_complete(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/futex.c-67-\tstruct io_kiocb *req = tw_req.req;\nio_uring/futex.c:68:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-69-\tstruct io_futexv_data *ifd = req-\u003easync_data;\n--\nio_uring/futex.c=127=int io_futex_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-128-{\nio_uring/futex.c:129:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-130-\tu32 flags;\n--\nio_uring/futex.c=155=int io_futex_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-156-{\nio_uring/futex.c:157:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-158-\tint ret;\n--\nio_uring/futex.c=187=int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-188-{\nio_uring/futex.c:189:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-190-\tstruct io_futexv_data *ifd;\n--\nio_uring/futex.c=243=int io_futexv_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-244-{\nio_uring/futex.c:245:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-246-\tstruct io_futexv_data *ifd = req-\u003easync_data;\n--\nio_uring/futex.c=296=int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-297-{\nio_uring/futex.c:298:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-299-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/futex.c=341=int io_futex_wake(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-342-{\nio_uring/futex.c:343:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-344-\tint ret;\n--\nio_uring/kbuf.c=494=int io_remove_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/kbuf.c-495-{\nio_uring/kbuf.c:496:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-497-\tu64 tmp;\n--\nio_uring/kbuf.c=513=int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/kbuf.c-515-\tunsigned long size, tmp_check;\nio_uring/kbuf.c:516:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-517-\tu64 tmp;\n--\nio_uring/kbuf.c=584=static int __io_manage_buffers_legacy(struct io_kiocb *req,\n--\nio_uring/kbuf.c-586-{\nio_uring/kbuf.c:587:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-588-\tint ret;\n--\nio_uring/kbuf.c=612=int io_manage_buffers_legacy(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/kbuf.c-613-{\nio_uring/kbuf.c:614:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-615-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=57=void io_msg_ring_cleanup(struct io_kiocb *req)\nio_uring/msg_ring.c-58-{\nio_uring/msg_ring.c:59:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-60-\n--\nio_uring/msg_ring.c=168=static int io_msg_ring_data(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-170-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:171:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-172-\n--\nio_uring/msg_ring.c=176=static int io_msg_grab_file(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/msg_ring.c-177-{\nio_uring/msg_ring.c:178:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-179-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=196=static int io_msg_install_complete(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-198-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:199:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-200-\tstruct file *src_file = msg-\u003esrc_file;\n--\nio_uring/msg_ring.c=241=static int io_msg_fd_remote(struct io_kiocb *req)\n--\nio_uring/msg_ring.c-243-\tstruct io_ring_ctx *ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:244:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-245-\tstruct task_struct *task = ctx-\u003esubmitter_task;\n--\nio_uring/msg_ring.c=254=static int io_msg_send_fd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-256-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:257:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-258-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=299=int io_msg_ring_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/msg_ring.c-300-{\nio_uring/msg_ring.c:301:\treturn __io_msg_ring_prep(io_kiocb_to_cmd(req, struct io_msg), sqe);\nio_uring/msg_ring.c-302-}\n--\nio_uring/msg_ring.c=304=int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/msg_ring.c-305-{\nio_uring/msg_ring.c:306:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-307-\tint ret;\n--\nio_uring/net.c=124=int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-125-{\nio_uring/net.c:126:\tstruct io_shutdown *shutdown = io_kiocb_to_cmd(req, struct io_shutdown);\nio_uring/net.c-127-\n--\nio_uring/net.c=137=int io_shutdown(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-138-{\nio_uring/net.c:139:\tstruct io_shutdown *shutdown = io_kiocb_to_cmd(req, struct io_shutdown);\nio_uring/net.c-140-\tstruct socket *sock;\n--\nio_uring/net.c=201=static inline void io_mshot_prep_retry(struct io_kiocb *req,\n--\nio_uring/net.c-203-{\nio_uring/net.c:204:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-205-\n--\nio_uring/net.c=257=static int io_msg_copy_hdr(struct io_kiocb *req, struct io_async_msghdr *iomsg,\n--\nio_uring/net.c-260-{\nio_uring/net.c:261:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-262-\tint ret;\n--\nio_uring/net.c=319=static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-320-{\nio_uring/net.c:321:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-322-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=365=static int io_sendmsg_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-366-{\nio_uring/net.c:367:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-368-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=393=int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-394-{\nio_uring/net.c:395:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-396-\n--\nio_uring/net.c=491=static inline bool io_send_finish(struct io_kiocb *req,\n--\nio_uring/net.c-494-{\nio_uring/net.c:495:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-496-\tbool bundle_finished = sel-\u003eval \u003c= 0;\n--\nio_uring/net.c=529=int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-530-{\nio_uring/net.c:531:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-532-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=578=static int io_send_select_buffer(struct io_kiocb *req, unsigned int issue_flags,\n--\nio_uring/net.c-580-{\nio_uring/net.c:581:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-582-\tstruct buf_sel_arg arg = {\n--\nio_uring/net.c=626=int io_send(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-627-{\nio_uring/net.c:628:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-629-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=747=static int io_recvmsg_prep_setup(struct io_kiocb *req)\nio_uring/net.c-748-{\nio_uring/net.c:749:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-750-\tstruct io_async_msghdr *kmsg;\n--\nio_uring/net.c=781=int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-782-{\nio_uring/net.c:783:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-784-\n--\nio_uring/net.c=853=static inline bool io_recv_finish(struct io_kiocb *req,\n--\nio_uring/net.c-857-{\nio_uring/net.c:858:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-859-\tunsigned int cflags = 0;\n--\nio_uring/net.c=1020=int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1021-{\nio_uring/net.c:1022:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1023-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1118=static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg,\n--\nio_uring/net.c-1120-{\nio_uring/net.c:1121:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1122-\tsize_t len;\n--\nio_uring/net.c=1192=int io_recv(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1193-{\nio_uring/net.c:1194:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1195-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1294=int io_recvzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1295-{\nio_uring/net.c:1296:\tstruct io_recvzc *zc = io_kiocb_to_cmd(req, struct io_recvzc);\nio_uring/net.c-1297-\tunsigned ifq_idx;\n--\nio_uring/net.c=1322=int io_recvzc(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1323-{\nio_uring/net.c:1324:\tstruct io_recvzc *zc = io_kiocb_to_cmd(req, struct io_recvzc);\nio_uring/net.c-1325-\tstruct socket *sock;\n--\nio_uring/net.c=1357=void io_send_zc_cleanup(struct io_kiocb *req)\nio_uring/net.c-1358-{\nio_uring/net.c:1359:\tstruct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1360-\tstruct io_async_msghdr *io = req-\u003easync_data;\n--\nio_uring/net.c=1374=int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1375-{\nio_uring/net.c:1376:\tstruct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1377-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/net.c=1497=static int io_send_zc_import(struct io_kiocb *req,\n--\nio_uring/net.c-1500-{\nio_uring/net.c:1501:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1502-\tstruct io_kiocb *notif = sr-\u003enotif;\n--\nio_uring/net.c=1527=int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1528-{\nio_uring/net.c:1529:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1530-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1598=void io_sendrecv_fail(struct io_kiocb *req)\nio_uring/net.c-1599-{\nio_uring/net.c:1600:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1601-\n--\nio_uring/net.c=1613=int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1614-{\nio_uring/net.c:1615:\tstruct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);\nio_uring/net.c-1616-\n--\nio_uring/net.c=1647=int io_accept(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1648-{\nio_uring/net.c:1649:\tstruct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);\nio_uring/net.c-1650-\tbool force_nonblock = issue_flags \u0026 IO_URING_F_NONBLOCK;\n--\nio_uring/net.c=1708=void io_socket_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/net.c-1709-{\nio_uring/net.c:1710:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1711-\n--\nio_uring/net.c=1717=void io_connect_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/net.c-1718-{\nio_uring/net.c:1719:\tstruct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1720-\tstruct sockaddr_storage *ss = req-\u003easync_data;\n--\nio_uring/net.c=1757=int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1758-{\nio_uring/net.c:1759:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1760-\n--\nio_uring/net.c=1778=int io_socket(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1779-{\nio_uring/net.c:1780:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1781-\tbool fixed = !!sock-\u003efile_slot;\n--\nio_uring/net.c=1811=int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1812-{\nio_uring/net.c:1813:\tstruct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1814-\tstruct sockaddr_storage *addr;\n--\nio_uring/net.c=1830=int io_connect(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1831-{\nio_uring/net.c:1832:\tstruct io_connect *connect = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1833-\tstruct sockaddr_storage *addr = req-\u003easync_data;\n--\nio_uring/net.c=1897=int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1898-{\nio_uring/net.c:1899:\tstruct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);\nio_uring/net.c-1900-\tstruct sockaddr __user *uaddr;\n--\nio_uring/net.c=1922=int io_bind(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1923-{\nio_uring/net.c:1924:\tstruct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);\nio_uring/net.c-1925-\tstruct sockaddr_storage *addr = req-\u003easync_data;\n--\nio_uring/net.c=1940=int io_listen_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1941-{\nio_uring/net.c:1942:\tstruct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);\nio_uring/net.c-1943-\n--\nio_uring/net.c=1951=int io_listen(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1952-{\nio_uring/net.c:1953:\tstruct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);\nio_uring/net.c-1954-\tstruct socket *sock;\n--\nio_uring/nop.c=27=int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/nop.c-28-{\nio_uring/nop.c:29:\tstruct io_nop *nop = io_kiocb_to_cmd(req, struct io_nop);\nio_uring/nop.c-30-\n--\nio_uring/nop.c=58=int io_nop(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/nop.c-59-{\nio_uring/nop.c:60:\tstruct io_nop *nop = io_kiocb_to_cmd(req, struct io_nop);\nio_uring/nop.c-61-\tint ret = nop-\u003eresult;\n--\nio_uring/notif.h=30=static inline struct io_notif_data *io_notif_to_data(struct io_kiocb *notif)\nio_uring/notif.h-31-{\nio_uring/notif.h:32:\treturn io_kiocb_to_cmd(notif, struct io_notif_data);\nio_uring/notif.h-33-}\n--\nio_uring/openclose.c=53=static int __io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-54-{\nio_uring/openclose.c:55:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-56-\tconst char __user *fname;\n--\nio_uring/openclose.c=85=void io_openat_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/openclose.c-86-{\nio_uring/openclose.c:87:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-88-\n--\nio_uring/openclose.c=94=int io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-95-{\nio_uring/openclose.c:96:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-97-\tu64 mode = READ_ONCE(sqe-\u003elen);\n--\nio_uring/openclose.c=104=int io_openat2_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-105-{\nio_uring/openclose.c:106:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-107-\tstruct open_how __user *how;\n--\nio_uring/openclose.c=123=int io_openat2(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/openclose.c-124-{\nio_uring/openclose.c:125:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-126-\tstruct open_flags op;\n--\nio_uring/openclose.c=193=void io_open_cleanup(struct io_kiocb *req)\nio_uring/openclose.c-194-{\nio_uring/openclose.c:195:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-196-\n--\nio_uring/openclose.c=212=static inline int io_close_fixed(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/openclose.c-213-{\nio_uring/openclose.c:214:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-215-\n--\nio_uring/openclose.c=219=int io_close_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-220-{\nio_uring/openclose.c:221:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-222-\n--\nio_uring/openclose.c=236=int io_close(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-238-\tstruct files_struct *files = current-\u003efiles;\nio_uring/openclose.c:239:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-240-\tstruct file *file;\n--\nio_uring/openclose.c=275=int io_install_fixed_fd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/openclose.c-296-\t/* default to O_CLOEXEC, disable if IORING_FIXED_FD_NO_CLOEXEC is set */\nio_uring/openclose.c:297:\tifi = io_kiocb_to_cmd(req, struct io_fixed_install);\nio_uring/openclose.c-298-\tifi-\u003eo_flags = O_CLOEXEC;\n--\nio_uring/openclose.c=305=int io_install_fixed_fd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-309-\nio_uring/openclose.c:310:\tifi = io_kiocb_to_cmd(req, struct io_fixed_install);\nio_uring/openclose.c-311-\tret = receive_fd(req-\u003efile, NULL, ifi-\u003eo_flags);\n--\nio_uring/openclose.c=326=int io_pipe_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-327-{\nio_uring/openclose.c:328:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-329-\n--\nio_uring/openclose.c=343=static int io_pipe_fixed(struct io_kiocb *req, struct file **files,\n--\nio_uring/openclose.c-345-{\nio_uring/openclose.c:346:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-347-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/openclose.c=394=static int io_pipe_fd(struct io_kiocb *req, struct file **files)\nio_uring/openclose.c-395-{\nio_uring/openclose.c:396:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-397-\tint ret, fds[2] = { -1, -1 };\n--\n\n"
} |
| 57/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 52223 output: 34 thoughts: 56 Thoughts: Here's my summary, as though I'm thinking through this myself: **Diving into the `io_kiocb_to_cmd` Macro** Okay, so I'm looking at this `io_kiocb_to_cmd(req, struct io_xattr)` function call. From the context, I understand it's responsible for retrieving the per-request inline command area. Specifically, it's supposed to give me access to `req->cmd.data`. Right, that's where the command-specific data for this particular request is stored. Now, I need to see *how* it does that. Let's dig into the definition of `io_kiocb_to_cmd` and see what's actually happening under the hood. I suspect it's likely a simple pointer cast or a struct member access, but let's confirm it. I want to understand the exact mechanics of how this inline command data is accessed. |
| 58/3 | 2026/09/20 12:18 | tool | grepper |
0mError:no matches Args: {
"Expression": "#define io_kiocb_to_cmd",
"PathPrefix": "io_uring"
}Results: {
"error": "no matches"
} |
| 59/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 52533 output: 33 thoughts: 18 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Investigating `io_kiocb_to_cmd`** Alright, let's dive into this `io_kiocb_to_cmd` thing. My initial instinct is that this is likely a kernel-level function, given the naming convention. The "io" prefix strongly suggests it's related to I/O operations, and "kiocb" points towards the kernel asynchronous I/O context block, or `kiocb`. The "cmd" likely refers to the underlying command structure. I'm going to start by pulling up the relevant kernel header files and searching the source to pinpoint its exact definition and, crucially, understand its purpose. I suspect it's responsible for extracting the command data structure (e.g., `struct request` in the block layer, or something similar in other I/O subsystems) from the `kiocb`, likely for command submission, completion handling, or perhaps even for tracking the lifecycle of an asynchronous I/O operation. I'm especially interested in how it handles error conditions and memory management, given the potential for race conditions in asynchronous I/O. Knowing exactly *where* it's defined and *how* it's used is going to be key to determining its role in the I/O stack. Let's get to the source code and find out. |
| 60/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "io_kiocb_to_cmd\\(",
"PathPrefix": "io_uring"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 989 lines.\nUse more precise expression if possible.\n\nio_uring/advise.c=31=int io_madvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/advise.c-33-#if defined(CONFIG_ADVISE_SYSCALLS) \u0026\u0026 defined(CONFIG_MMU)\nio_uring/advise.c:34:\tstruct io_madvise *ma = io_kiocb_to_cmd(req, struct io_madvise);\nio_uring/advise.c-35-\n--\nio_uring/advise.c=51=int io_madvise(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/advise.c-53-#if defined(CONFIG_ADVISE_SYSCALLS) \u0026\u0026 defined(CONFIG_MMU)\nio_uring/advise.c:54:\tstruct io_madvise *ma = io_kiocb_to_cmd(req, struct io_madvise);\nio_uring/advise.c-55-\tint ret;\n--\nio_uring/advise.c=79=int io_fadvise_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/advise.c-80-{\nio_uring/advise.c:81:\tstruct io_fadvise *fa = io_kiocb_to_cmd(req, struct io_fadvise);\nio_uring/advise.c-82-\n--\nio_uring/advise.c=96=int io_fadvise(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/advise.c-97-{\nio_uring/advise.c:98:\tstruct io_fadvise *fa = io_kiocb_to_cmd(req, struct io_fadvise);\nio_uring/advise.c-99-\tint ret;\n--\nio_uring/cancel.c=140=int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/cancel.c-141-{\nio_uring/cancel.c:142:\tstruct io_cancel *cancel = io_kiocb_to_cmd(req, struct io_cancel);\nio_uring/cancel.c-143-\n--\nio_uring/cancel.c=210=int io_async_cancel(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/cancel.c-211-{\nio_uring/cancel.c:212:\tstruct io_cancel *cancel = io_kiocb_to_cmd(req, struct io_cancel);\nio_uring/cancel.c-213-\tstruct io_cancel_data cd = {\n--\nio_uring/epoll.c=29=int io_epoll_ctl_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/epoll.c-30-{\nio_uring/epoll.c:31:\tstruct io_epoll *epoll = io_kiocb_to_cmd(req, struct io_epoll);\nio_uring/epoll.c-32-\n--\nio_uring/epoll.c=51=int io_epoll_ctl(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/epoll.c-52-{\nio_uring/epoll.c:53:\tstruct io_epoll *ie = io_kiocb_to_cmd(req, struct io_epoll);\nio_uring/epoll.c-54-\tbool force_nonblock = issue_flags \u0026 IO_URING_F_NONBLOCK;\n--\nio_uring/epoll.c=78=int io_epoll_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/epoll.c-79-{\nio_uring/epoll.c:80:\tstruct io_epoll_wait *iew = io_kiocb_to_cmd(req, struct io_epoll_wait);\nio_uring/epoll.c-81-\n--\nio_uring/epoll.c=90=int io_epoll_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/epoll.c-91-{\nio_uring/epoll.c:92:\tstruct io_epoll_wait *iew = io_kiocb_to_cmd(req, struct io_epoll_wait);\nio_uring/epoll.c-93-\tint ret;\n--\nio_uring/fs.c=50=int io_renameat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-51-{\nio_uring/fs.c:52:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-53-\tconst char __user *oldf, *newf;\n--\nio_uring/fs.c=82=int io_renameat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-83-{\nio_uring/fs.c:84:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-85-\tCLASS(filename_complete_delayed, old)(\u0026ren-\u003eoldpath);\n--\nio_uring/fs.c=99=void io_renameat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-100-{\nio_uring/fs.c:101:\tstruct io_rename *ren = io_kiocb_to_cmd(req, struct io_rename);\nio_uring/fs.c-102-\n--\nio_uring/fs.c=107=int io_unlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-108-{\nio_uring/fs.c:109:\tstruct io_unlink *un = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-110-\tconst char __user *fname;\n--\nio_uring/fs.c=135=int io_unlinkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-136-{\nio_uring/fs.c:137:\tstruct io_unlink *un = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-138-\tCLASS(filename_complete_delayed, name)(\u0026un-\u003efilename);\n--\nio_uring/fs.c=153=void io_unlinkat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-154-{\nio_uring/fs.c:155:\tstruct io_unlink *ul = io_kiocb_to_cmd(req, struct io_unlink);\nio_uring/fs.c-156-\n--\nio_uring/fs.c=160=int io_mkdirat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-161-{\nio_uring/fs.c:162:\tstruct io_mkdir *mkd = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-163-\tconst char __user *fname;\n--\nio_uring/fs.c=184=int io_mkdirat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-185-{\nio_uring/fs.c:186:\tstruct io_mkdir *mkd = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-187-\tCLASS(filename_complete_delayed, name)(\u0026mkd-\u003efilename);\n--\nio_uring/fs.c=199=void io_mkdirat_cleanup(struct io_kiocb *req)\nio_uring/fs.c-200-{\nio_uring/fs.c:201:\tstruct io_mkdir *md = io_kiocb_to_cmd(req, struct io_mkdir);\nio_uring/fs.c-202-\n--\nio_uring/fs.c=206=int io_symlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-207-{\nio_uring/fs.c:208:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-209-\tconst char __user *oldpath, *newpath;\n--\nio_uring/fs.c=236=int io_symlinkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-237-{\nio_uring/fs.c:238:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-239-\tCLASS(filename_complete_delayed, old)(\u0026sl-\u003eoldpath);\n--\nio_uring/fs.c=252=int io_linkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/fs.c-253-{\nio_uring/fs.c:254:\tstruct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-255-\tconst char __user *oldf, *newf;\n--\nio_uring/fs.c=284=int io_linkat(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/fs.c-285-{\nio_uring/fs.c:286:\tstruct io_link *lnk = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-287-\tCLASS(filename_complete_delayed, old)(\u0026lnk-\u003eoldpath);\n--\nio_uring/fs.c=300=void io_link_cleanup(struct io_kiocb *req)\nio_uring/fs.c-301-{\nio_uring/fs.c:302:\tstruct io_link *sl = io_kiocb_to_cmd(req, struct io_link);\nio_uring/fs.c-303-\n--\nio_uring/futex.c=65=static void io_futexv_complete(struct io_tw_req tw_req, io_tw_token_t tw)\n--\nio_uring/futex.c-67-\tstruct io_kiocb *req = tw_req.req;\nio_uring/futex.c:68:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-69-\tstruct io_futexv_data *ifd = req-\u003easync_data;\n--\nio_uring/futex.c=127=int io_futex_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-128-{\nio_uring/futex.c:129:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-130-\tu32 flags;\n--\nio_uring/futex.c=155=int io_futex_wait_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-156-{\nio_uring/futex.c:157:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-158-\tint ret;\n--\nio_uring/futex.c=187=int io_futexv_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/futex.c-188-{\nio_uring/futex.c:189:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-190-\tstruct io_futexv_data *ifd;\n--\nio_uring/futex.c=243=int io_futexv_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-244-{\nio_uring/futex.c:245:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-246-\tstruct io_futexv_data *ifd = req-\u003easync_data;\n--\nio_uring/futex.c=296=int io_futex_wait(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-297-{\nio_uring/futex.c:298:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-299-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/futex.c=341=int io_futex_wake(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/futex.c-342-{\nio_uring/futex.c:343:\tstruct io_futex *iof = io_kiocb_to_cmd(req, struct io_futex);\nio_uring/futex.c-344-\tint ret;\n--\nio_uring/kbuf.c=494=int io_remove_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/kbuf.c-495-{\nio_uring/kbuf.c:496:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-497-\tu64 tmp;\n--\nio_uring/kbuf.c=513=int io_provide_buffers_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/kbuf.c-515-\tunsigned long size, tmp_check;\nio_uring/kbuf.c:516:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-517-\tu64 tmp;\n--\nio_uring/kbuf.c=584=static int __io_manage_buffers_legacy(struct io_kiocb *req,\n--\nio_uring/kbuf.c-586-{\nio_uring/kbuf.c:587:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-588-\tint ret;\n--\nio_uring/kbuf.c=612=int io_manage_buffers_legacy(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/kbuf.c-613-{\nio_uring/kbuf.c:614:\tstruct io_provide_buf *p = io_kiocb_to_cmd(req, struct io_provide_buf);\nio_uring/kbuf.c-615-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=57=void io_msg_ring_cleanup(struct io_kiocb *req)\nio_uring/msg_ring.c-58-{\nio_uring/msg_ring.c:59:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-60-\n--\nio_uring/msg_ring.c=168=static int io_msg_ring_data(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-170-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:171:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-172-\n--\nio_uring/msg_ring.c=176=static int io_msg_grab_file(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/msg_ring.c-177-{\nio_uring/msg_ring.c:178:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-179-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=196=static int io_msg_install_complete(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-198-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:199:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-200-\tstruct file *src_file = msg-\u003esrc_file;\n--\nio_uring/msg_ring.c=241=static int io_msg_fd_remote(struct io_kiocb *req)\n--\nio_uring/msg_ring.c-243-\tstruct io_ring_ctx *ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:244:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-245-\tstruct task_struct *task = ctx-\u003esubmitter_task;\n--\nio_uring/msg_ring.c=254=static int io_msg_send_fd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/msg_ring.c-256-\tstruct io_ring_ctx *target_ctx = req-\u003efile-\u003eprivate_data;\nio_uring/msg_ring.c:257:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-258-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/msg_ring.c=299=int io_msg_ring_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/msg_ring.c-300-{\nio_uring/msg_ring.c:301:\treturn __io_msg_ring_prep(io_kiocb_to_cmd(req, struct io_msg), sqe);\nio_uring/msg_ring.c-302-}\n--\nio_uring/msg_ring.c=304=int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/msg_ring.c-305-{\nio_uring/msg_ring.c:306:\tstruct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);\nio_uring/msg_ring.c-307-\tint ret;\n--\nio_uring/net.c=124=int io_shutdown_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-125-{\nio_uring/net.c:126:\tstruct io_shutdown *shutdown = io_kiocb_to_cmd(req, struct io_shutdown);\nio_uring/net.c-127-\n--\nio_uring/net.c=137=int io_shutdown(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-138-{\nio_uring/net.c:139:\tstruct io_shutdown *shutdown = io_kiocb_to_cmd(req, struct io_shutdown);\nio_uring/net.c-140-\tstruct socket *sock;\n--\nio_uring/net.c=201=static inline void io_mshot_prep_retry(struct io_kiocb *req,\n--\nio_uring/net.c-203-{\nio_uring/net.c:204:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-205-\n--\nio_uring/net.c=257=static int io_msg_copy_hdr(struct io_kiocb *req, struct io_async_msghdr *iomsg,\n--\nio_uring/net.c-260-{\nio_uring/net.c:261:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-262-\tint ret;\n--\nio_uring/net.c=319=static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-320-{\nio_uring/net.c:321:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-322-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=365=static int io_sendmsg_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-366-{\nio_uring/net.c:367:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-368-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=393=int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-394-{\nio_uring/net.c:395:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-396-\n--\nio_uring/net.c=491=static inline bool io_send_finish(struct io_kiocb *req,\n--\nio_uring/net.c-494-{\nio_uring/net.c:495:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-496-\tbool bundle_finished = sel-\u003eval \u003c= 0;\n--\nio_uring/net.c=529=int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-530-{\nio_uring/net.c:531:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-532-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=578=static int io_send_select_buffer(struct io_kiocb *req, unsigned int issue_flags,\n--\nio_uring/net.c-580-{\nio_uring/net.c:581:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-582-\tstruct buf_sel_arg arg = {\n--\nio_uring/net.c=626=int io_send(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-627-{\nio_uring/net.c:628:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-629-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=747=static int io_recvmsg_prep_setup(struct io_kiocb *req)\nio_uring/net.c-748-{\nio_uring/net.c:749:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-750-\tstruct io_async_msghdr *kmsg;\n--\nio_uring/net.c=781=int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-782-{\nio_uring/net.c:783:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-784-\n--\nio_uring/net.c=853=static inline bool io_recv_finish(struct io_kiocb *req,\n--\nio_uring/net.c-857-{\nio_uring/net.c:858:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-859-\tunsigned int cflags = 0;\n--\nio_uring/net.c=1020=int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1021-{\nio_uring/net.c:1022:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1023-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1118=static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg,\n--\nio_uring/net.c-1120-{\nio_uring/net.c:1121:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1122-\tsize_t len;\n--\nio_uring/net.c=1192=int io_recv(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1193-{\nio_uring/net.c:1194:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1195-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1294=int io_recvzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1295-{\nio_uring/net.c:1296:\tstruct io_recvzc *zc = io_kiocb_to_cmd(req, struct io_recvzc);\nio_uring/net.c-1297-\tunsigned ifq_idx;\n--\nio_uring/net.c=1322=int io_recvzc(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1323-{\nio_uring/net.c:1324:\tstruct io_recvzc *zc = io_kiocb_to_cmd(req, struct io_recvzc);\nio_uring/net.c-1325-\tstruct socket *sock;\n--\nio_uring/net.c=1357=void io_send_zc_cleanup(struct io_kiocb *req)\nio_uring/net.c-1358-{\nio_uring/net.c:1359:\tstruct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1360-\tstruct io_async_msghdr *io = req-\u003easync_data;\n--\nio_uring/net.c=1374=int io_send_zc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1375-{\nio_uring/net.c:1376:\tstruct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1377-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/net.c=1497=static int io_send_zc_import(struct io_kiocb *req,\n--\nio_uring/net.c-1500-{\nio_uring/net.c:1501:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1502-\tstruct io_kiocb *notif = sr-\u003enotif;\n--\nio_uring/net.c=1527=int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1528-{\nio_uring/net.c:1529:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1530-\tstruct io_async_msghdr *kmsg = req-\u003easync_data;\n--\nio_uring/net.c=1598=void io_sendrecv_fail(struct io_kiocb *req)\nio_uring/net.c-1599-{\nio_uring/net.c:1600:\tstruct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg);\nio_uring/net.c-1601-\n--\nio_uring/net.c=1613=int io_accept_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1614-{\nio_uring/net.c:1615:\tstruct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);\nio_uring/net.c-1616-\n--\nio_uring/net.c=1647=int io_accept(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1648-{\nio_uring/net.c:1649:\tstruct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept);\nio_uring/net.c-1650-\tbool force_nonblock = issue_flags \u0026 IO_URING_F_NONBLOCK;\n--\nio_uring/net.c=1708=void io_socket_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/net.c-1709-{\nio_uring/net.c:1710:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1711-\n--\nio_uring/net.c=1717=void io_connect_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/net.c-1718-{\nio_uring/net.c:1719:\tstruct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1720-\tstruct sockaddr_storage *ss = req-\u003easync_data;\n--\nio_uring/net.c=1757=int io_socket_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1758-{\nio_uring/net.c:1759:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1760-\n--\nio_uring/net.c=1778=int io_socket(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1779-{\nio_uring/net.c:1780:\tstruct io_socket *sock = io_kiocb_to_cmd(req, struct io_socket);\nio_uring/net.c-1781-\tbool fixed = !!sock-\u003efile_slot;\n--\nio_uring/net.c=1811=int io_connect_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1812-{\nio_uring/net.c:1813:\tstruct io_connect *conn = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1814-\tstruct sockaddr_storage *addr;\n--\nio_uring/net.c=1830=int io_connect(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1831-{\nio_uring/net.c:1832:\tstruct io_connect *connect = io_kiocb_to_cmd(req, struct io_connect);\nio_uring/net.c-1833-\tstruct sockaddr_storage *addr = req-\u003easync_data;\n--\nio_uring/net.c=1897=int io_bind_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1898-{\nio_uring/net.c:1899:\tstruct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);\nio_uring/net.c-1900-\tstruct sockaddr __user *uaddr;\n--\nio_uring/net.c=1922=int io_bind(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1923-{\nio_uring/net.c:1924:\tstruct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);\nio_uring/net.c-1925-\tstruct sockaddr_storage *addr = req-\u003easync_data;\n--\nio_uring/net.c=1940=int io_listen_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/net.c-1941-{\nio_uring/net.c:1942:\tstruct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);\nio_uring/net.c-1943-\n--\nio_uring/net.c=1951=int io_listen(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/net.c-1952-{\nio_uring/net.c:1953:\tstruct io_listen *listen = io_kiocb_to_cmd(req, struct io_listen);\nio_uring/net.c-1954-\tstruct socket *sock;\n--\nio_uring/nop.c=27=int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/nop.c-28-{\nio_uring/nop.c:29:\tstruct io_nop *nop = io_kiocb_to_cmd(req, struct io_nop);\nio_uring/nop.c-30-\n--\nio_uring/nop.c=58=int io_nop(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/nop.c-59-{\nio_uring/nop.c:60:\tstruct io_nop *nop = io_kiocb_to_cmd(req, struct io_nop);\nio_uring/nop.c-61-\tint ret = nop-\u003eresult;\n--\nio_uring/notif.h=30=static inline struct io_notif_data *io_notif_to_data(struct io_kiocb *notif)\nio_uring/notif.h-31-{\nio_uring/notif.h:32:\treturn io_kiocb_to_cmd(notif, struct io_notif_data);\nio_uring/notif.h-33-}\n--\nio_uring/openclose.c=53=static int __io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-54-{\nio_uring/openclose.c:55:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-56-\tconst char __user *fname;\n--\nio_uring/openclose.c=85=void io_openat_bpf_populate(struct io_uring_bpf_ctx *bctx, struct io_kiocb *req)\nio_uring/openclose.c-86-{\nio_uring/openclose.c:87:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-88-\n--\nio_uring/openclose.c=94=int io_openat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-95-{\nio_uring/openclose.c:96:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-97-\tu64 mode = READ_ONCE(sqe-\u003elen);\n--\nio_uring/openclose.c=104=int io_openat2_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-105-{\nio_uring/openclose.c:106:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-107-\tstruct open_how __user *how;\n--\nio_uring/openclose.c=123=int io_openat2(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/openclose.c-124-{\nio_uring/openclose.c:125:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-126-\tstruct open_flags op;\n--\nio_uring/openclose.c=193=void io_open_cleanup(struct io_kiocb *req)\nio_uring/openclose.c-194-{\nio_uring/openclose.c:195:\tstruct io_open *open = io_kiocb_to_cmd(req, struct io_open);\nio_uring/openclose.c-196-\n--\nio_uring/openclose.c=212=static inline int io_close_fixed(struct io_kiocb *req, unsigned int issue_flags)\nio_uring/openclose.c-213-{\nio_uring/openclose.c:214:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-215-\n--\nio_uring/openclose.c=219=int io_close_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-220-{\nio_uring/openclose.c:221:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-222-\n--\nio_uring/openclose.c=236=int io_close(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-238-\tstruct files_struct *files = current-\u003efiles;\nio_uring/openclose.c:239:\tstruct io_close *close = io_kiocb_to_cmd(req, struct io_close);\nio_uring/openclose.c-240-\tstruct file *file;\n--\nio_uring/openclose.c=275=int io_install_fixed_fd_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\n--\nio_uring/openclose.c-296-\t/* default to O_CLOEXEC, disable if IORING_FIXED_FD_NO_CLOEXEC is set */\nio_uring/openclose.c:297:\tifi = io_kiocb_to_cmd(req, struct io_fixed_install);\nio_uring/openclose.c-298-\tifi-\u003eo_flags = O_CLOEXEC;\n--\nio_uring/openclose.c=305=int io_install_fixed_fd(struct io_kiocb *req, unsigned int issue_flags)\n--\nio_uring/openclose.c-309-\nio_uring/openclose.c:310:\tifi = io_kiocb_to_cmd(req, struct io_fixed_install);\nio_uring/openclose.c-311-\tret = receive_fd(req-\u003efile, NULL, ifi-\u003eo_flags);\n--\nio_uring/openclose.c=326=int io_pipe_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)\nio_uring/openclose.c-327-{\nio_uring/openclose.c:328:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-329-\n--\nio_uring/openclose.c=343=static int io_pipe_fixed(struct io_kiocb *req, struct file **files,\n--\nio_uring/openclose.c-345-{\nio_uring/openclose.c:346:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-347-\tstruct io_ring_ctx *ctx = req-\u003ectx;\n--\nio_uring/openclose.c=394=static int io_pipe_fd(struct io_kiocb *req, struct file **files)\nio_uring/openclose.c-395-{\nio_uring/openclose.c:396:\tstruct io_pipe *p = io_kiocb_to_cmd(req, struct io_pipe);\nio_uring/openclose.c-397-\tint ret, fds[2] = { -1, -1 };\n--\n\n"
} |
| 61/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 64294 output: 38 thoughts: 46 Thoughts: Here's my take on those thoughts: **Peering into the io_uring Depths** Okay, so I'm looking at `io_kiocb_to_cmd`. It seems like I need to figure out where that's defined. Right, let's go straight to the source. The header file to check would be `io_uring/io_uring.h`. That's the logical place to start digging. Time to open that up and see what we can find. |
| 62/3 | 2026/09/20 12:18 | tool | grepper |
0mError:no matches Args: {
"Expression": "io_kiocb_to_cmd",
"PathPrefix": "io_uring/io_uring.h"
}Results: {
"error": "no matches"
} |
| 63/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 64499 output: 26 thoughts: 22 Thoughts: Here's my thought process, as it stands: **Locating the Definition of `io_kiocb_to_cmd`** Okay, so I need to track down the precise definition of `io_kiocb_to_cmd`. It's a key function (or macro, potentially) and I need to understand its role and implementation within the codebase. This is a pretty standard debugging or auditing task, so let's get down to it. Given the name, I'd wager it's related to the I/O completion interface, but the specifics are what I need to see. I’ll start by using my preferred search tools – probably a `grep` across the source directory, perhaps combined with a code search in my IDE to speed things up. I’ll be looking for where it's declared and defined. I'll need to pay close attention to the include files as well because that is often where the functions are declared. I expect it is likely a macro since it's common practice to use macros for these types of fast access functions in kernel code. Depending on the size of the codebase, I may need to narrow down the search by checking what specific I/O subsystem the code is related to. |
| 64/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "io_kiocb_to_cmd\\(.*type"
}Results: {
"Output": "include/linux/io_uring_types.h=741=static inline void io_kiocb_cmd_sz_check(size_t cmd_sz)\n--\ninclude/linux/io_uring_types.h-744-}\ninclude/linux/io_uring_types.h:745:#define io_kiocb_to_cmd(req, cmd_type) ( \\\ninclude/linux/io_uring_types.h-746-\tio_kiocb_cmd_sz_check(sizeof(cmd_type)) , \\\n"
} |
| 65/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 64950 output: 39 thoughts: 28 Thoughts: Here's my summary, as though I'm processing the code: **Diving into io_uring_types.h: A Closer Look at the CQE** Okay, time to get my hands dirty. Let's head over to `include/linux/io_uring_types.h` and focus specifically on lines 740 through 760. I know this section is going to define the core of how we handle completion events. I suspect we're looking at the structure for the Completion Queue Entry (CQE), which is *crucial* for understanding how io_uring signals completion back to user-space. I'm expecting to see fields related to the request's ID, the result code (success or error), the number of bytes transferred, potentially flags about the completion state, and maybe even a pointer or reference to user-provided data. This is where the magic happens; where we bridge the kernel and user-space and signal when an asynchronous operation is finally done. I'm keen to see if they've used any clever tricks for efficiently packing these fields to minimize memory overhead, and how they handle potential alignment issues. I'm also watching out for any potential race conditions that might arise with how the kernel writes the CQE. Let's see what's what. |
| 66/3 | 2026/09/20 12:18 | tool | read-file |
0mArgs:{
"File": "include/linux/io_uring_types.h",
"FirstLine": 740,
"LineCount": 20
}Results: {
"Contents": " 740:\t\n 741:\tstatic inline void io_kiocb_cmd_sz_check(size_t cmd_sz)\n 742:\t{\n 743:\t\tBUILD_BUG_ON(cmd_sz \u003e sizeof(struct io_cmd_data));\n 744:\t}\n 745:\t#define io_kiocb_to_cmd(req, cmd_type) ( \\\n 746:\t\tio_kiocb_cmd_sz_check(sizeof(cmd_type)) , \\\n 747:\t\t((cmd_type *)\u0026(req)-\u003ecmd) \\\n 748:\t)\n 749:\t\n 750:\tstatic inline struct io_kiocb *cmd_to_io_kiocb(void *ptr)\n 751:\t{\n 752:\t\treturn ptr;\n 753:\t}\n 754:\t\n 755:\tstruct io_kiocb {\n 756:\t\tunion {\n 757:\t\t\t/*\n 758:\t\t\t * NOTE! Each of the io_kiocb union members has the file pointer\n 759:\t\t\t * as the first entry in their struct definition. So you can\n"
} |
| 67/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 65608 output: 27 thoughts: 1718 Thoughts: **Analyzing the xattr Implementation in io_uring** Okay, so I'm diving into this `io_uring` code, specifically focusing on the extended attribute (xattr) functionality. The `io_kiocb_to_cmd(req, type)` macro is crucial here; it's the foundation for type casting the request structure. I need to understand how the `io_xattr` struct is used. It looks like it holds all the relevant data: the file pointer, an `kernel_xattr_ctx` for context, and a `delayed_filename` which I can probably ignore for now. Let's look at that `kernel_xattr_ctx`: it contains the attribute value (a user pointer, `cvalue` or `value`), a kernel-side value (`kvalue`), the size, the attribute name (`kname`), and flags. Now, let's trace through the `io_flistxattr_prep` function. I see that it initializes the `io_xattr` struct, zeroes out pointers and then checks for any invalid sqe parameters, which is a good sanity check. It reads the user-space address, size, and flags from the `sqe`, stores them in the `io_xattr` context. This prepares the request and marks it for cleanup, making sure to force async behavior. The code is setting the `value`, `size` and `flags` fields in `io_flistxattr_prep`. Next, `io_flistxattr` gets called. It essentially calls `file_listxattr` with the prepared data. `file_listxattr` calls `listxattr` on the file's dentry, which is the standard system call path. This appears to be the same path as a regular `flistxattr` syscall! The key is that we have the user space pointer, and size. I'm now looking at the `io_fremovexattr_prep` function for removal. This mirrors the pattern of the listxattr. It initializes, checks for any invalid sqe parameters, and then reads the attribute name from user space. It then allocates a kernel structure `kname` and imports the user-provided attribute name into it. The `io_fremovexattr` function then gets called, it simply calls `file_removexattr` with the file pointer and kernel-allocated attribute name. I am noticing this looks like the standard removexattr path. Now, it's worth double-checking that `file_removexattr` matches the standard path. Yep, after the audit and wanting write permissions, it calls `removexattr`. It looks identical to what the syscall does. But, hang on, wasn't `file_removexattr` previously `static`? Ah, I see that the patch changed `file_removexattr` to non-static, so the `io_uring` code can call it! Now I need to re-examine all calls to that `file_removexattr` function to be sure nothing else has broken. |
| 68/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "file_removexattr",
"PathPrefix": "fs/"
}Results: {
"Output": "fs/internal.h=301=ssize_t file_listxattr(struct file *f, char __user *list, size_t size);\nfs/internal.h:302:int file_removexattr(struct file *f, struct xattr_name *kname);\nfs/internal.h-303-\n--\nfs/xattr.c=1031=removexattr(struct mnt_idmap *idmap, struct dentry *d, const char *name)\n--\nfs/xattr.c-1037-\nfs/xattr.c:1038:int file_removexattr(struct file *f, struct xattr_name *kname)\nfs/xattr.c-1039-{\n--\nfs/xattr.c=1074=static int path_removexattrat(int dfd, const char __user *pathname,\n--\nfs/xattr.c-1092-\t\t\treturn -EBADF;\nfs/xattr.c:1093:\t\treturn file_removexattr(fd_file(f), \u0026kname);\nfs/xattr.c-1094-\t}\n"
} |
| 69/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 68314 output: 36 thoughts: 63 Thoughts: Here's my summary, as the expert: **Tracing the XAttr Removal** Okay, so `file_removexattr` is being invoked. Interesting. Looks like it's being called from `path_removexattrat` with a null filename, using `AT_EMPTY_PATH`, and a provided name. Right, so this is definitely the implementation of `fremovexattr`. Let me check the `fremovexattr` syscall definition. I'll need to jump over to `fs/xattr.c` to see how this particular system call is handled and trace its execution flow. This seems like it should be a pretty straightforward operation, but I want to make sure I understand the full context. Let's see what's happening. |
| 70/3 | 2026/09/20 12:18 | tool | grepper |
0mArgs:{
"Expression": "SYSCALL_DEFINE.*fremovexattr",
"PathPrefix": "fs/xattr.c"
}Results: {
"Output": "fs/xattr.c=1111=SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,\n--\nfs/xattr.c-1116-\nfs/xattr.c:1117:SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)\nfs/xattr.c-1118-{\n"
} |
| 71/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 68682 output: 35 thoughts: 26 Thoughts: Here's a summary of my thought process, as requested: **Diving into `fs/xattr.c`** Okay, I need to get a handle on how extended attributes are handled in the kernel, specifically around the 1070 to 1125 line range within `fs/xattr.c`. Let's assume there's some issue I'm chasing or a particular implementation detail I'm trying to understand. This specific section likely deals with a particular function call, data structure or part of the larger xattr framework and I'm guessing that the comment structure gives me a clue on the logic. I'm going in with a very specific purpose. I'm going to look for any clues about the interaction between the filesystem and the xattr subsystem, or maybe look at where the metadata resides. Time to dig in and see what's going on in that particular segment of the code. |
| 72/3 | 2026/09/20 12:18 | tool | read-file |
0mArgs:{
"File": "fs/xattr.c",
"FirstLine": 1070,
"LineCount": 55
}Results: {
"Contents": "1070:\t\t}\n1071:\t\treturn error;\n1072:\t}\n1073:\t\n1074:\tstatic int path_removexattrat(int dfd, const char __user *pathname,\n1075:\t\t\t\t unsigned int at_flags, const char __user *name)\n1076:\t{\n1077:\t\tstruct xattr_name kname;\n1078:\t\tunsigned int lookup_flags;\n1079:\t\tint error;\n1080:\t\n1081:\t\tif ((at_flags \u0026 ~(AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH)) != 0)\n1082:\t\t\treturn -EINVAL;\n1083:\t\n1084:\t\terror = import_xattr_name(\u0026kname, name);\n1085:\t\tif (error)\n1086:\t\t\treturn error;\n1087:\t\n1088:\t\tCLASS(filename_maybe_null, filename)(pathname, at_flags);\n1089:\t\tif (!filename) {\n1090:\t\t\tCLASS(fd, f)(dfd);\n1091:\t\t\tif (fd_empty(f))\n1092:\t\t\t\treturn -EBADF;\n1093:\t\t\treturn file_removexattr(fd_file(f), \u0026kname);\n1094:\t\t}\n1095:\t\tlookup_flags = (at_flags \u0026 AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;\n1096:\t\treturn filename_removexattr(dfd, filename, lookup_flags, \u0026kname);\n1097:\t}\n1098:\t\n1099:\tSYSCALL_DEFINE4(removexattrat, int, dfd, const char __user *, pathname,\n1100:\t\t\tunsigned int, at_flags, const char __user *, name)\n1101:\t{\n1102:\t\treturn path_removexattrat(dfd, pathname, at_flags, name);\n1103:\t}\n1104:\t\n1105:\tSYSCALL_DEFINE2(removexattr, const char __user *, pathname,\n1106:\t\t\tconst char __user *, name)\n1107:\t{\n1108:\t\treturn path_removexattrat(AT_FDCWD, pathname, 0, name);\n1109:\t}\n1110:\t\n1111:\tSYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,\n1112:\t\t\tconst char __user *, name)\n1113:\t{\n1114:\t\treturn path_removexattrat(AT_FDCWD, pathname, AT_SYMLINK_NOFOLLOW, name);\n1115:\t}\n1116:\t\n1117:\tSYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)\n1118:\t{\n1119:\t\treturn path_removexattrat(fd, NULL, AT_EMPTY_PATH, name);\n1120:\t}\n1121:\t\n1122:\tint xattr_list_one(char **buffer, ssize_t *remaining_size, const char *name)\n1123:\t{\n1124:\t\tsize_t len;\n"
} |
| 73/3 | 2026/09/20 12:18 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 69793 output: 20 thoughts: 200 Thoughts: **Investigating Potential Xattr Removal Issues** Okay, let's dive into this. I'm looking at the `path_removexattrat` function, and my initial scan seems straightforward: we create an `xattr_name` struct, import the name, and then call `file_removexattr`. Nothing immediately jumps out there. Then I check `io_fremovexattr_prep`, where things get a bit more interesting. We're doing a `kmalloc_obj` of `*ix->ctx.kname`, and then calling `import_xattr_name` on that. And then `io_fremovexattr` itself calls `file_removexattr` with this. Hang on a second… `kmalloc_obj(*ix->ctx.kname)`... That looks like a `kmalloc` without `__GFP_ZERO` being specified. That could be a problem! A potentially uninitialized value is being allocated. I need to be sure about this... what even *is* `kmalloc_obj`? I need to check the definition of that function immediately. This could be a critical oversight. |
| 74/3 | 2026/09/20 12:19 | tool | grepper |
0mArgs:{
"Expression": "#define kmalloc_obj"
}Results: {
"Output": "include/linux/slab.h=1073=void *kmalloc_nolock(size_t size, gfp_t gfp_flags, int node);\n--\ninclude/linux/slab.h-1123- */\ninclude/linux/slab.h:1124:#define kmalloc_obj(VAR_OR_TYPE, ...) \\\ninclude/linux/slab.h-1125-\t__alloc_objs(kmalloc, default_gfp(__VA_ARGS__), typeof(VAR_OR_TYPE), 1)\n--\ninclude/linux/slab.h-1135- */\ninclude/linux/slab.h:1136:#define kmalloc_objs(VAR_OR_TYPE, COUNT, ...) \\\ninclude/linux/slab.h-1137-\t__alloc_objs(kmalloc, default_gfp(__VA_ARGS__), typeof(VAR_OR_TYPE), COUNT)\n--\nlib/decompress_unxz.c-163-#undef vfree\nlib/decompress_unxz.c:164:#define kmalloc_obj(type) malloc(sizeof(type))\nlib/decompress_unxz.c-165-#define kfree(ptr) free(ptr)\n--\ntools/virtio/linux/kernel.h=63=static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp)\n--\ntools/virtio/linux/kernel.h-67-\ntools/virtio/linux/kernel.h:68:#define kmalloc_obj(VAR_OR_TYPE, ...) \\\ntools/virtio/linux/kernel.h-69-\t((typeof(VAR_OR_TYPE) *)kmalloc(sizeof(typeof(VAR_OR_TYPE)), 0))\ntools/virtio/linux/kernel.h-70-\ntools/virtio/linux/kernel.h:71:#define kmalloc_objs(VAR_OR_TYPE, COUNT, ...) \\\ntools/virtio/linux/kernel.h-72-\t((typeof(VAR_OR_TYPE) *)kmalloc(sizeof(typeof(VAR_OR_TYPE)) * (COUNT), 0))\n"
} |
| 75/3 | 2026/09/20 12:19 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 70781 output: 388 thoughts: 3823 Thoughts: **KMSAN Assessment: NeedsKMSAN = false** Okay, after carefully reviewing the patch and the potential for uninitialized memory usage, I've concluded that KMSAN is *not* necessary here. The primary reason is that this patch introduces new io_uring operations, `IORING_OP_FREMOVEXATTR` and `IORING_OP_FLISTXATTR`, which effectively wrap and expose existing VFS functionality for extended attribute management, namely `file_removexattr` and `file_listxattr`, respectively. The critical point is that no new pathways for uninitialized memory reads or kernel-to-user information leaks are introduced. I've meticulously examined the code and the data structures involved, specifically `struct io_xattr`. All fields in `io_xattr` that are utilized by the new operations, including `filename`, `kname`, `kvalue`, `value`, `size`, and `flags`, are explicitly initialized within the corresponding preparation functions (`io_fremovexattr_prep` and `io_flistxattr_prep`). Furthermore, the dynamically allocated `kname` memory, allocated using `kmalloc_obj`, is populated by `import_xattr_name`, which relies on `strncpy_from_user` to safely copy a null-terminated string from userspace. Importantly, the existing `file_removexattr` and the VFS layer functions (`vfs_removexattr`) only read up to the null terminator of this string. This completely avoids potential issues with uninitialized memory. The `IORING_OP_FLISTXATTR` operation leverages the existing `file_listxattr` function, which in turn calls into `listxattr` within VFS. This is the exact same path taken by the standard `flistxattr(2)` syscall. This ensures that the copy operation is correctly bounded to the initialized memory. Ultimately, any potential bugs introduced by this patch, such as reference counting errors, memory leaks, request lifecycle issues (cancellation handling), or locking issues related to the use of `mnt_want_write_file` are thoroughly covered by the existing and well-established KASAN and LOCKDEP sanitizers. Therefore, a KMSAN fuzzing session is not warranted, as these risks do not exclusively pertain to uninitialized memory access. |
| 76/3 | 2026/09/20 12:19 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch series introduces support for two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes existing VFS helpers (file_removexattr and file_listxattr) by making them non-static and wraps them in io_uring handlers.\n\nKMSAN vs KASAN Applicability:\n- No uninitialized memory risks or kernel-to-user info-leaks are introduced.\n- In both `io_fremovexattr_prep` and `io_flistxattr_prep`, all fields of the per-command `io_xattr` context are explicitly initialized prior to use (`filename` initialized via `INIT_DELAYED_FILENAME`, pointers `kname` and `kvalue` explicitly set to NULL, and value/size/flags populated from the SQE).\n- The allocated memory for `ix-\u003ectx.kname` is filled via `import_xattr_name` (using `strncpy_from_user`), and `file_removexattr` treats it strictly as a null-terminated C string.\n- `io_flistxattr` directly delegates to the existing `file_listxattr` helper (which calls `listxattr`, identical to the `flistxattr(2)` syscall), with no changes to user-space copying or buffer management.\n- Any bugs likely to arise from this patch relate to file reference handling, async cancellation lifecycles, memory freeing on error paths, or mount write locks (`mnt_want_write_file`), which are comprehensively covered by KASAN and LOCKDEP.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch series introduces support for two new io_uring opcodes: IORING_OP_FREMOVEXATTR and IORING_OP_FLISTXATTR. It exposes existing VFS helpers (file_removexattr and file_listxattr) by making them non-static and wraps them in io_uring handlers.\n\nKMSAN vs KASAN Applicability:\n- No uninitialized memory risks or kernel-to-user info-leaks are introduced.\n- In both `io_fremovexattr_prep` and `io_flistxattr_prep`, all fields of the per-command `io_xattr` context are explicitly initialized prior to use (`filename` initialized via `INIT_DELAYED_FILENAME`, pointers `kname` and `kvalue` explicitly set to NULL, and value/size/flags populated from the SQE).\n- The allocated memory for `ix-\u003ectx.kname` is filled via `import_xattr_name` (using `strncpy_from_user`), and `file_removexattr` treats it strictly as a null-terminated C string.\n- `io_flistxattr` directly delegates to the existing `file_listxattr` helper (which calls `listxattr`, identical to the `flistxattr(2)` syscall), with no changes to user-space copying or buffer management.\n- Any bugs likely to arise from this patch relate to file reference handling, async cancellation lifecycles, memory freeing on error paths, or mount write locks (`mnt_want_write_file`), which are comprehensively covered by KASAN and LOCKDEP.\n\nTherefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|