From: Jens Axboe Date: Mon, 9 May 2022 12:35:28 +0000 (-0600) Subject: Merge branch 'for-5.19/io_uring-socket' into for-5.19/io_uring-passthrough X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b5ba65df47cabcba6fe7a03f8f57513e9f78f72f;p=linux.git Merge branch 'for-5.19/io_uring-socket' into for-5.19/io_uring-passthrough * for-5.19/io_uring-socket: io_uring: use the text representation of ops in trace io_uring: rename op -> opcode io_uring: add io_uring_get_opcode io_uring: add type to op enum io_uring: add socket(2) support net: add __sys_socket_file() io_uring: fix trace for reduced sqe padding io_uring: add fgetxattr and getxattr support io_uring: add fsetxattr and setxattr support fs: split off do_getxattr from getxattr fs: split off setxattr_copy and do_setxattr function from setxattr --- b5ba65df47cabcba6fe7a03f8f57513e9f78f72f diff --cc fs/io_uring.c index 9f340f44827b6,dfebbf3a272a3..53e54fc054880 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@@ -1244,8 -1229,18 +1263,19 @@@ static const struct io_op_def io_op_def [IORING_OP_LINKAT] = {}, [IORING_OP_MSG_RING] = { .needs_file = 1, + .iopoll = 1, }, + [IORING_OP_FSETXATTR] = { + .needs_file = 1 + }, + [IORING_OP_SETXATTR] = {}, + [IORING_OP_FGETXATTR] = { + .needs_file = 1 + }, + [IORING_OP_GETXATTR] = {}, + [IORING_OP_SOCKET] = { + .audit_skip = 1, + }, }; /* requests with any of those set should undergo io_disarm_next() */ diff --cc include/uapi/linux/io_uring.h index 06621a278cb67,49d1f3994f8d6..31e719f38615f --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@@ -102,22 -104,8 +104,22 @@@ enum #define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */ #define IORING_SETUP_R_DISABLED (1U << 6) /* start with ring disabled */ #define IORING_SETUP_SUBMIT_ALL (1U << 7) /* continue submit on error */ +/* + * Cooperative task running. When requests complete, they often require + * forcing the submitter to transition to the kernel to complete. If this + * flag is set, work will be done when the task transitions anyway, rather + * than force an inter-processor interrupt reschedule. This avoids interrupting + * a task running in userspace, and saves an IPI. + */ +#define IORING_SETUP_COOP_TASKRUN (1U << 8) +/* + * 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. + */ +#define IORING_SETUP_TASKRUN_FLAG (1U << 9) - enum { + enum io_uring_op { IORING_OP_NOP, IORING_OP_READV, IORING_OP_WRITEV,