diff --git a/0001-io_uring-rename-pad-field-of-io_uring_buf_reg-to-fla.patch b/0001-io_uring-rename-pad-field-of-io_uring_buf_reg-to-fla.patch new file mode 100644 index 0000000000000000000000000000000000000000..cea1e73d9ced5f6fc7e0e500eeff333bc3df02ad --- /dev/null +++ b/0001-io_uring-rename-pad-field-of-io_uring_buf_reg-to-fla.patch @@ -0,0 +1,84 @@ +From c915bf597b6a22e8c5ca25839b04130ed941f69a Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Fri, 28 Apr 2023 08:00:00 +0000 +Subject: [PATCH] io_uring: rename pad field of io_uring_buf_reg to flags + +* bundled/linux/include/uapi/linux/io_uring.h (struct io_uring_buf_reg): +Rename pad to flags following the change introduced by Linux kernel +commit v6.3-rc5-6-g81cf17cd3ab3. +* src/io_uring.c (print_io_uring_buf_reg): Likewise. +* tests/io_uring_register.c (main): Likewise. +--- + bundled/linux/include/uapi/linux/io_uring.h | 2 +- + src/io_uring.c | 8 +++----- + tests/io_uring_register.c | 6 +++--- + 3 files changed, 7 insertions(+), 9 deletions(-) + +diff --git a/bundled/linux/include/uapi/linux/io_uring.h b/bundled/linux/include/uapi/linux/io_uring.h +index 0ad3da2..60338e8 100644 +--- a/bundled/linux/include/uapi/linux/io_uring.h ++++ b/bundled/linux/include/uapi/linux/io_uring.h +@@ -525,7 +525,7 @@ struct io_uring_buf_reg { + __u64 ring_addr; + __u32 ring_entries; + __u16 bgid; +- __u16 pad; ++ __u16 flags; + __u64 resv[3]; + }; + +diff --git a/src/io_uring.c b/src/io_uring.c +index 1f3c6bb..0882ee7 100644 +--- a/src/io_uring.c ++++ b/src/io_uring.c +@@ -565,7 +565,7 @@ print_io_uring_buf_reg(struct tcb *tcp, const kernel_ulong_t addr) + { + struct io_uring_buf_reg arg; + CHECK_TYPE_SIZE(arg, 40); +- CHECK_TYPE_SIZE(arg.pad, sizeof(uint16_t)); ++ CHECK_TYPE_SIZE(arg.flags, sizeof(uint16_t)); + CHECK_TYPE_SIZE(arg.resv, sizeof(uint64_t) * 3); + + if (umove_or_printaddr(tcp, addr, &arg)) +@@ -580,10 +580,8 @@ print_io_uring_buf_reg(struct tcb *tcp, const kernel_ulong_t addr) + tprint_struct_next(); + PRINT_FIELD_U(arg, bgid); + +- if (arg.pad) { +- tprint_struct_next(); +- PRINT_FIELD_X(arg, pad); +- } ++ tprint_struct_next(); ++ PRINT_FIELD_X(arg, flags); + + if (!IS_ARRAY_ZERO(arg.resv)) { + tprint_struct_next(); +diff --git a/tests/io_uring_register.c b/tests/io_uring_register.c +index 3b7879a..8f49eae 100644 +--- a/tests/io_uring_register.c ++++ b/tests/io_uring_register.c +@@ -1102,7 +1102,7 @@ main(void) + buf_reg->ring_addr = j & 2 ? (uintptr_t) buf_reg : 0; + buf_reg->ring_entries = j & 4 ? 3141592653 : 0; + buf_reg->bgid = j & 8 ? 42069 : 0; +- buf_reg->pad = j & 16 ? 31337 : 0; ++ buf_reg->flags = j & 16 ? 31337 : 0; + buf_reg->resv[0] = j & 32 ? 0xbadc0deddeadfaceULL : 0; + buf_reg->resv[1] = j & 64 ? 0xdecaffedbeefdeadULL : 0; + buf_reg->resv[2] = j & 128 ? 0xbadc0dedfacefeedULL : 0; +@@ -1117,10 +1117,10 @@ main(void) + printf("%p", buf_reg); + else + printf("NULL"); +- printf(", ring_entries=%s, bgid=%s%s", ++ printf(", ring_entries=%s, bgid=%s, flags=%s", + j & 4 ? "3141592653" : "0", + j & 8 ? "42069" : "0", +- j & 16 ? ", pad=0x7a69" : ""); ++ j & 16 ? "0x7a69" : "0"); + if (j & 0xe0) { + printf(", resv=[%s, %s, %s]", + j & 32 ? "0xbadc0deddeadface" : "0", +-- +2.33.0 + diff --git a/strace.spec b/strace.spec index 628113be2353a3d32cde164ee4f41c248202bb41..44c8067267c28243e8636c77c5eb4528023d6257 100644 --- a/strace.spec +++ b/strace.spec @@ -1,7 +1,7 @@ Summary: Tracks and displays system calls associated with a running process Name: strace Version: 6.1 -Release: 3 +Release: 4 # The test suite is GPLv2+, all the rest is LGPLv2.1+. License: LGPL-2.1+ and GPL-2.0+ # Some distros require Group tag to be present, @@ -42,6 +42,8 @@ BuildRequires: pkgconfig(bluez) %{?!make_build: %global make_build %__make %{?_smp_mflags}} %{?!make_install: %global make_install %__make install DESTDIR="%{?buildroot}"} +Patch0001: 0001-io_uring-rename-pad-field-of-io_uring_buf_reg-to-fla.patch + %description The strace program intercepts and records the system calls called and received by a running process. Strace can print a record of each @@ -53,7 +55,7 @@ Install strace if you need a tool to track the system calls made and received by a process. %prep -%setup -q +%autosetup -p1 -n %{name}-%{version} echo -n %version-%release > .tarball-version echo -n 2022 > .year echo -n 2022-10-16 > doc/.strace.1.in.date @@ -112,6 +114,9 @@ wait %{_mandir}/man1/* %changelog +* Tue Aug 8 2023 suweifeng - 6.1-4 +- Fix compile error with kernel 6.4 + * Mon Jul 10 2023 zhujin - 6.1-3 - Fixed obs build error