!81 update to 6.6 to fix compile error with kernel 6.6
From: @SuperSix173 Reviewed-by: @yang_yanchao Signed-off-by: @yang_yanchao
This commit is contained in:
commit
d77a6dc0ed
@ -1,84 +0,0 @@
|
||||
From c915bf597b6a22e8c5ca25839b04130ed941f69a Mon Sep 17 00:00:00 2001
|
||||
From: "Dmitry V. Levin" <ldv@strace.io>
|
||||
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
|
||||
|
||||
Binary file not shown.
BIN
strace-6.6.tar.xz
Normal file
BIN
strace-6.6.tar.xz
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
Summary: Tracks and displays system calls associated with a running process
|
||||
Name: strace
|
||||
Version: 6.1
|
||||
Release: 4
|
||||
Version: 6.6
|
||||
Release: 1
|
||||
# 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,8 +42,6 @@ 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
|
||||
@ -114,6 +112,9 @@ wait
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 19 2024 liuchao <liuchao173@huawei.com> - 6.6-1
|
||||
- update to 6.6 to fix compile error with kernel 6.6
|
||||
|
||||
* Tue Aug 8 2023 suweifeng <suweifeng1@huawei.com> - 6.1-4
|
||||
- Fix compile error with kernel 6.4
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user