Blame SOURCES/0115-xlat-update-IORING_-constants.patch

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