summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-12-07 14:06:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-08 20:22:11 +0000
commitc1c93b4ea4e76b48844ac88dfad738f55961a50e (patch)
tree868bcc66d0a5ea0d6a263f3553deb24bf7856af5 /meta/recipes-devtools/strace
parentd14eb9aadb8d6380242519eb9f2639b88a8f828d (diff)
downloadpoky-c1c93b4ea4e76b48844ac88dfad738f55961a50e.tar.gz
strace: update 5.14 -> 5.15
(From OE-Core rev: 5882ea00a3c9cf0b15958ea3677231a2a31d9a68) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/strace')
-rw-r--r--meta/recipes-devtools/strace/strace/0001-Avoid-relying-on-presence-of-ipx.h.patch151
-rw-r--r--meta/recipes-devtools/strace/strace_5.15.bb (renamed from meta/recipes-devtools/strace/strace_5.14.bb)3
2 files changed, 1 insertions, 153 deletions
diff --git a/meta/recipes-devtools/strace/strace/0001-Avoid-relying-on-presence-of-ipx.h.patch b/meta/recipes-devtools/strace/strace/0001-Avoid-relying-on-presence-of-ipx.h.patch
deleted file mode 100644
index e791b4130d..0000000000
--- a/meta/recipes-devtools/strace/strace/0001-Avoid-relying-on-presence-of-ipx.h.patch
+++ /dev/null
@@ -1,151 +0,0 @@
1From 197f712ea96c12dcabc9fe98889a425d61ad6a60 Mon Sep 17 00:00:00 2001
2From: Eugene Syromyatnikov <evgsyr@gmail.com>
3Date: Wed, 3 Nov 2021 00:48:59 +0100
4Subject: [PATCH] Avoid relying on presence of ipx.h
5
6After Linux has broken UAPI in commit v5.15-rc1~157^2~207, it is well
7possible that neither kernel nor libc (such as musl, for example)
8provide IPX-related header. Avoid relying on its presence
9in the strace's code and conditionalise the relevant checks in the tests.
10
11* configure.ac (AC_CHECK_HEADERS): Add linux/ipx.h.
12* src/net.c: Remove <netipx/ipx.h>/<linux/ipx.h> includes.
13* src/sockaddr.c: Likewise.
14(IPX_NODE_LEN): New macro constant.
15(struct sockaddr_ipx): New type definition.
16* src/xlat/sock_ipx_options.in (IPX_TYPE): Provide a fallback value.
17* tests/net-sockaddr.c [!HAVE_LINUX_IPX_H]: Do not include
18<linux/ipx.h>.
19[!HAVE_LINUX_IPX_H && HAVE_NETIPX_IPX_H]: Include <netipx/ipx.h>.
20[!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)]: Do not define
21check_ipx.
22[!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)] (main): Do not call
23check_ipx.
24
25Closes: https://github.com/strace/strace/issues/201
26
27Upstream-Status: Backport [commit cca828197c0e1 branch esyr/5.15]
28
29[bva: changed context to apply to a released strace 5.14 tarball]
30Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
31
32---
33 configure.ac | 1 +
34 src/net.c | 5 -----
35 src/sockaddr.c | 16 ++++++++++------
36 src/xlat/sock_ipx_options.in | 2 +-
37 tests/net-sockaddr.c | 10 +++++++++-
38 5 files changed, 21 insertions(+), 13 deletions(-)
39
40Index: strace-5.14/configure.ac
41===================================================================
42--- strace-5.14.orig/configure.ac
43+++ strace-5.14/configure.ac
44@@ -423,6 +423,7 @@
45 elf.h
46 gcov.h
47 iconv.h
48+ linux/ipx.h
49 mqueue.h
50 netinet/sctp.h
51 netipx/ipx.h
52Index: strace-5.14/src/net.c
53===================================================================
54--- strace-5.14.orig/src/net.c
55+++ strace-5.14/src/net.c
56@@ -28,11 +28,6 @@
57 #include <arpa/inet.h>
58 #include <net/if.h>
59 #include <asm/types.h>
60-#ifdef HAVE_NETIPX_IPX_H
61-# include <netipx/ipx.h>
62-#else
63-# include <linux/ipx.h>
64-#endif
65
66 #include <linux/ip_vs.h>
67 #include "netlink.h"
68Index: strace-5.14/src/sockaddr.c
69===================================================================
70--- strace-5.14.orig/src/sockaddr.c
71+++ strace-5.14/src/sockaddr.c
72@@ -24,12 +24,6 @@
73 #include <linux/if_ether.h>
74 #include <linux/x25.h>
75
76-#ifdef HAVE_NETIPX_IPX_H
77-# include <netipx/ipx.h>
78-#else
79-# include <linux/ipx.h>
80-#endif
81-
82 #include "xlat/addrfams.h"
83 #include "xlat/arp_hardware_types.h"
84 #include "xlat/ethernet_protocols.h"
85@@ -45,6 +39,16 @@
86 const size_t arp_hardware_types_size = ARRAY_SIZE(arp_hardware_types) - 1;
87 const size_t ethernet_protocols_size = ARRAY_SIZE(ethernet_protocols) - 1;
88
89+#define IPX_NODE_LEN 6
90+struct sockaddr_ipx {
91+ uint16_t sipx_family;
92+ uint16_t sipx_port;
93+ uint32_t sipx_network;
94+ unsigned char sipx_node[IPX_NODE_LEN];
95+ uint8_t sipx_type;
96+ unsigned char sipx_zero;
97+};
98+
99 static void
100 print_sockaddr_data_un(struct tcb *tcp, const void *const buf, const int addrlen)
101 {
102Index: strace-5.14/src/xlat/sock_ipx_options.in
103===================================================================
104--- strace-5.14.orig/src/xlat/sock_ipx_options.in
105+++ strace-5.14/src/xlat/sock_ipx_options.in
106@@ -1 +1 @@
107-IPX_TYPE
108+IPX_TYPE 1
109Index: strace-5.14/tests/net-sockaddr.c
110===================================================================
111--- strace-5.14.orig/tests/net-sockaddr.c
112+++ strace-5.14/tests/net-sockaddr.c
113@@ -24,7 +24,11 @@
114 #include <linux/if_ether.h>
115 #include <linux/if_packet.h>
116 #include <linux/x25.h>
117-#include <linux/ipx.h>
118+#if defined HAVE_LINUX_IPX_H
119+# include <linux/ipx.h>
120+#elif defined HAVE_NETIPX_IPX_H
121+# include <netipx/ipx.h>
122+#endif
123 #ifdef HAVE_BLUETOOTH_BLUETOOTH_H
124 # include <bluetooth/bluetooth.h>
125 # include <bluetooth/hci.h>
126@@ -269,6 +273,7 @@
127 printf("connect(-1, %p, %u) = %d EBADF (%m)\n", in6, len, ret);
128 }
129
130+#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H
131 static void
132 check_ipx(void)
133 {
134@@ -295,6 +300,7 @@
135 c_ipx.sipx_node[4], c_ipx.sipx_node[5],
136 c_ipx.sipx_type, len, ret);
137 }
138+#endif /* HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H */
139
140 /* for a bit more compact AX.25 address definitions */
141 #define AX25_ADDR(c_, s_) \
142@@ -773,7 +779,9 @@
143 check_un();
144 check_in();
145 check_in6();
146+#if defined HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H
147 check_ipx();
148+#endif
149 check_ax25();
150 check_x25();
151 check_nl();
diff --git a/meta/recipes-devtools/strace/strace_5.14.bb b/meta/recipes-devtools/strace/strace_5.15.bb
index 4fbff04137..716806d22f 100644
--- a/meta/recipes-devtools/strace/strace_5.14.bb
+++ b/meta/recipes-devtools/strace/strace_5.15.bb
@@ -13,9 +13,8 @@ SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
13 file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \ 13 file://0001-caps-abbrev.awk-fix-gawk-s-path.patch \
14 file://ptest-spacesave.patch \ 14 file://ptest-spacesave.patch \
15 file://0001-strace-fix-reproducibilty-issues.patch \ 15 file://0001-strace-fix-reproducibilty-issues.patch \
16 file://0001-Avoid-relying-on-presence-of-ipx.h.patch \
17 " 16 "
18SRC_URI[sha256sum] = "901bee6db5e17debad4530dd9ffb4dc9a96c4a656edbe1c3141b7cb307b11e73" 17SRC_URI[sha256sum] = "ebcac22f297335294dc654425cbc3ce013343bece6da2699e3aec86aee8d72dc"
19 18
20inherit autotools ptest 19inherit autotools ptest
21 20