From dd6b70f5d4db14b432f424071d262e87fa944c96 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 28 Jun 2020 08:00:00 +0000 Subject: [PATCH 115/115] xlat: update IORING_* constants * xlat/uring_ops.in (IORING_OP_TEE): New constant introduced by Linux kernel commit v5.8-rc1~190^2~14. * tests/io_uring_register.c: Update expected output. --- tests/io_uring_register.c | 12 ++++++------ xlat/uring_ops.in | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) Index: strace-5.7/tests/io_uring_register.c =================================================================== --- strace-5.7.orig/tests/io_uring_register.c 2020-11-09 04:44:38.311057254 +0100 +++ strace-5.7/tests/io_uring_register.c 2020-11-09 04:44:40.445038991 +0100 @@ -225,12 +225,12 @@ probe->ops[0].flags = 0; probe->ops[0].resv2 = 0xbeefface; - probe->ops[1].op = 32; + probe->ops[1].op = 33; probe->ops[1].resv = 0; probe->ops[1].flags = IO_URING_OP_SUPPORTED; probe->ops[1].resv2 = 0xdeadc0de; - probe->ops[2].op = 33; + probe->ops[2].op = 34; probe->ops[2].resv = 0xaf; probe->ops[2].flags = 0xbeef; probe->ops[2].resv2 = 0; @@ -245,22 +245,22 @@ ", {last_op=IORING_OP_EPOLL_CTL, ops_len=%hhu" ", resv2=[0, %#x, 0], ops=[" "{op=IORING_OP_NOP, resv=0xde, flags=0, resv2=0xbeefface}, " - "{op=IORING_OP_REMOVE_BUFFERS, flags=IO_URING_OP_SUPPORTED" + "{op=IORING_OP_TEE, flags=IO_URING_OP_SUPPORTED" ", resv2=0xdeadc0de}, " - "{op=33 /* IORING_OP_??? */, resv=0xaf" + "{op=34 /* IORING_OP_??? */, resv=0xaf" ", flags=IO_URING_OP_SUPPORTED|0xbeee}, " "{op=254 /* IORING_OP_??? */" ", flags=0xc0de /* IO_URING_OP_??? */}]}, 4) = %s\n", fd_null, path_null, probe->ops_len, probe->resv2[1], errstr); - probe->last_op = 33; + probe->last_op = 34; probe->resv2[1] = 0; fill_memory_ex(probe->ops, sizeof(probe->ops[0]) * (DEFAULT_STRLEN + 1), 0x40, 0x80); sys_io_uring_register(fd_null, IORING_REGISTER_PROBE, probe, DEFAULT_STRLEN + 1); printf("io_uring_register(%u<%s>, IORING_REGISTER_PROBE" - ", {last_op=33 /* IORING_OP_??? */, ops_len=%hhu, ops=[", + ", {last_op=34 /* IORING_OP_??? */, ops_len=%hhu, ops=[", fd_null, path_null, probe->ops_len); for (size_t i = 0; i < DEFAULT_STRLEN; i++) { printf("%s{op=%u /* IORING_OP_??? */, resv=%#hhx" Index: strace-5.7/xlat/uring_ops.in =================================================================== --- strace-5.7.orig/xlat/uring_ops.in 2020-11-09 04:44:38.311057254 +0100 +++ strace-5.7/xlat/uring_ops.in 2020-11-09 04:44:40.445038991 +0100 @@ -32,3 +32,4 @@ IORING_OP_SPLICE 30 IORING_OP_PROVIDE_BUFFERS 31 IORING_OP_REMOVE_BUFFERS 32 +IORING_OP_TEE 33 Index: strace-5.7/tests-m32/io_uring_register.c =================================================================== --- strace-5.7.orig/tests-m32/io_uring_register.c 2020-11-09 04:44:38.312057246 +0100 +++ strace-5.7/tests-m32/io_uring_register.c 2020-11-09 04:44:40.445038991 +0100 @@ -225,12 +225,12 @@ probe->ops[0].flags = 0; probe->ops[0].resv2 = 0xbeefface; - probe->ops[1].op = 32; + probe->ops[1].op = 33; probe->ops[1].resv = 0; probe->ops[1].flags = IO_URING_OP_SUPPORTED; probe->ops[1].resv2 = 0xdeadc0de; - probe->ops[2].op = 33; + probe->ops[2].op = 34; probe->ops[2].resv = 0xaf; probe->ops[2].flags = 0xbeef; probe->ops[2].resv2 = 0; @@ -245,22 +245,22 @@ ", {last_op=IORING_OP_EPOLL_CTL, ops_len=%hhu" ", resv2=[0, %#x, 0], ops=[" "{op=IORING_OP_NOP, resv=0xde, flags=0, resv2=0xbeefface}, " - "{op=IORING_OP_REMOVE_BUFFERS, flags=IO_URING_OP_SUPPORTED" + "{op=IORING_OP_TEE, flags=IO_URING_OP_SUPPORTED" ", resv2=0xdeadc0de}, " - "{op=33 /* IORING_OP_??? */, resv=0xaf" + "{op=34 /* IORING_OP_??? */, resv=0xaf" ", flags=IO_URING_OP_SUPPORTED|0xbeee}, " "{op=254 /* IORING_OP_??? */" ", flags=0xc0de /* IO_URING_OP_??? */}]}, 4) = %s\n", fd_null, path_null, probe->ops_len, probe->resv2[1], errstr); - probe->last_op = 33; + probe->last_op = 34; probe->resv2[1] = 0; fill_memory_ex(probe->ops, sizeof(probe->ops[0]) * (DEFAULT_STRLEN + 1), 0x40, 0x80); sys_io_uring_register(fd_null, IORING_REGISTER_PROBE, probe, DEFAULT_STRLEN + 1); printf("io_uring_register(%u<%s>, IORING_REGISTER_PROBE" - ", {last_op=33 /* IORING_OP_??? */, ops_len=%hhu, ops=[", + ", {last_op=34 /* IORING_OP_??? */, ops_len=%hhu, ops=[", fd_null, path_null, probe->ops_len); for (size_t i = 0; i < DEFAULT_STRLEN; i++) { printf("%s{op=%u /* IORING_OP_??? */, resv=%#hhx" Index: strace-5.7/tests-mx32/io_uring_register.c =================================================================== --- strace-5.7.orig/tests-mx32/io_uring_register.c 2020-11-09 04:44:38.312057246 +0100 +++ strace-5.7/tests-mx32/io_uring_register.c 2020-11-09 04:44:40.446038982 +0100 @@ -225,12 +225,12 @@ probe->ops[0].flags = 0; probe->ops[0].resv2 = 0xbeefface; - probe->ops[1].op = 32; + probe->ops[1].op = 33; probe->ops[1].resv = 0; probe->ops[1].flags = IO_URING_OP_SUPPORTED; probe->ops[1].resv2 = 0xdeadc0de; - probe->ops[2].op = 33; + probe->ops[2].op = 34; probe->ops[2].resv = 0xaf; probe->ops[2].flags = 0xbeef; probe->ops[2].resv2 = 0; @@ -245,22 +245,22 @@ ", {last_op=IORING_OP_EPOLL_CTL, ops_len=%hhu" ", resv2=[0, %#x, 0], ops=[" "{op=IORING_OP_NOP, resv=0xde, flags=0, resv2=0xbeefface}, " - "{op=IORING_OP_REMOVE_BUFFERS, flags=IO_URING_OP_SUPPORTED" + "{op=IORING_OP_TEE, flags=IO_URING_OP_SUPPORTED" ", resv2=0xdeadc0de}, " - "{op=33 /* IORING_OP_??? */, resv=0xaf" + "{op=34 /* IORING_OP_??? */, resv=0xaf" ", flags=IO_URING_OP_SUPPORTED|0xbeee}, " "{op=254 /* IORING_OP_??? */" ", flags=0xc0de /* IO_URING_OP_??? */}]}, 4) = %s\n", fd_null, path_null, probe->ops_len, probe->resv2[1], errstr); - probe->last_op = 33; + probe->last_op = 34; probe->resv2[1] = 0; fill_memory_ex(probe->ops, sizeof(probe->ops[0]) * (DEFAULT_STRLEN + 1), 0x40, 0x80); sys_io_uring_register(fd_null, IORING_REGISTER_PROBE, probe, DEFAULT_STRLEN + 1); printf("io_uring_register(%u<%s>, IORING_REGISTER_PROBE" - ", {last_op=33 /* IORING_OP_??? */, ops_len=%hhu, ops=[", + ", {last_op=34 /* IORING_OP_??? */, ops_len=%hhu, ops=[", fd_null, path_null, probe->ops_len); for (size_t i = 0; i < DEFAULT_STRLEN; i++) { printf("%s{op=%u /* IORING_OP_??? */, resv=%#hhx" Index: strace-5.7/xlat/uring_ops.h =================================================================== --- strace-5.7.orig/xlat/uring_ops.h 2020-11-09 04:44:38.313057237 +0100 +++ strace-5.7/xlat/uring_ops.h 2020-11-09 04:47:01.835829135 +0100 @@ -234,6 +234,13 @@ #else # define IORING_OP_REMOVE_BUFFERS 32 #endif +#if defined(IORING_OP_TEE) || (defined(HAVE_DECL_IORING_OP_TEE) && HAVE_DECL_IORING_OP_TEE) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((IORING_OP_TEE) == (33), "IORING_OP_TEE != 33"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define IORING_OP_TEE 33 +#endif #ifndef XLAT_MACROS_ONLY @@ -343,6 +350,9 @@ [IORING_OP_REMOVE_BUFFERS] = XLAT(IORING_OP_REMOVE_BUFFERS), #define XLAT_VAL_32 ((unsigned) (IORING_OP_REMOVE_BUFFERS)) #define XLAT_STR_32 STRINGIFY(IORING_OP_REMOVE_BUFFERS) + [IORING_OP_TEE] = XLAT(IORING_OP_TEE), + #define XLAT_VAL_33 ((unsigned) (IORING_OP_TEE)) + #define XLAT_STR_33 STRINGIFY(IORING_OP_TEE) }; static const struct xlat uring_ops[1] = { { @@ -449,6 +459,9 @@ # ifdef XLAT_VAL_32 | XLAT_VAL_32 # endif +# ifdef XLAT_VAL_33 + | XLAT_VAL_33 +# endif , .flags_strsz = 0 # ifdef XLAT_STR_0 @@ -550,6 +563,9 @@ # ifdef XLAT_STR_32 + sizeof(XLAT_STR_32) # endif +# ifdef XLAT_STR_33 + + sizeof(XLAT_STR_33) +# endif , } }; @@ -619,6 +635,8 @@ # undef XLAT_VAL_31 # undef XLAT_STR_32 # undef XLAT_VAL_32 +# undef XLAT_STR_33 +# undef XLAT_VAL_33 # endif /* !IN_MPERS */ #endif /* !XLAT_MACROS_ONLY */