summaryrefslogtreecommitdiff
path: root/pkg/strace/patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/strace/patch')
-rw-r--r--pkg/strace/patch/0001-Don-t-return-expression-in-void-function.patch8
-rw-r--r--pkg/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch38
-rw-r--r--pkg/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch8
-rw-r--r--pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch20
-rw-r--r--pkg/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch20
-rw-r--r--pkg/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch16
-rw-r--r--pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch16
-rw-r--r--pkg/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch36
-rw-r--r--pkg/strace/patch/0011-Avoid-index-ranges.patch8
9 files changed, 73 insertions, 97 deletions
diff --git a/pkg/strace/patch/0001-Don-t-return-expression-in-void-function.patch b/pkg/strace/patch/0001-Don-t-return-expression-in-void-function.patch
index 00c56f2a..0e28dad4 100644
--- a/pkg/strace/patch/0001-Don-t-return-expression-in-void-function.patch
+++ b/pkg/strace/patch/0001-Don-t-return-expression-in-void-function.patch
@@ -1,4 +1,4 @@
-From 5df1446d7d0c88d93e063b17b6ec9b872d13f1f8 Mon Sep 17 00:00:00 2001
+From 2d644a73ecf46c454a40a78c1db0ab4ec76760bf Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Fri, 5 Jul 2019 20:52:24 -0700
Subject: [PATCH] Don't return expression in void function
@@ -8,10 +8,10 @@ Subject: [PATCH] Don't return expression in void function
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/defs.h b/src/defs.h
-index 3475d36a2..518e57346 100644
+index 5c369eceb..bbc8aa38f 100644
--- a/src/defs.h
+++ b/src/defs.h
-@@ -722,7 +722,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *);
+@@ -726,7 +726,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *);
static inline void
pathtrace_select(const char *path)
{
@@ -21,5 +21,5 @@ index 3475d36a2..518e57346 100644
static inline bool
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch b/pkg/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch
index 2a054efd..2c4f8965 100644
--- a/pkg/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch
+++ b/pkg/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch
@@ -1,4 +1,4 @@
-From 62a54ba2c7356ade3e2eb7f66647410daafc5718 Mon Sep 17 00:00:00 2001
+From eeb1e797fc52a2a7fc470420ddd57344362c2c2e Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 6 Jul 2019 01:33:01 -0700
Subject: [PATCH] Use __typeof__ spelling of typeof
@@ -18,7 +18,7 @@ Subject: [PATCH] Use __typeof__ spelling of typeof
11 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/src/btrfs.c b/src/btrfs.c
-index eb6f7e02b..819fcf084 100644
+index df2b35a7f..2c49dcc67 100644
--- a/src/btrfs.c
+++ b/src/btrfs.c
@@ -214,7 +214,7 @@ btrfs_print_logical_ino_container(struct tcb *tcp,
@@ -48,7 +48,7 @@ index eb6f7e02b..819fcf084 100644
inherit.num_qgroups, &record, sizeof(record),
tfetch_mem, print_uint64_array_member, 0);
}
-@@ -1137,7 +1137,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
+@@ -1149,7 +1149,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
PRINT_FIELD_OBJ_PTR(args, key,
print_btrfs_ioctl_search_key,
entering(tcp), !abbrev(tcp));
@@ -57,7 +57,7 @@ index eb6f7e02b..819fcf084 100644
sizeof(args.buf), args.key.nr_items);
tprint_struct_end();
if (entering(tcp))
-@@ -1173,7 +1173,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
+@@ -1185,7 +1185,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
entering(tcp), !abbrev(tcp));
tprint_struct_next();
PRINT_FIELD_U(args, buf_size);
@@ -66,7 +66,7 @@ index eb6f7e02b..819fcf084 100644
args.buf_size, args.key.nr_items);
tprint_struct_end();
if (entering(tcp))
-@@ -1250,7 +1250,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
+@@ -1263,7 +1263,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
struct btrfs_ioctl_space_info info;
tprint_struct_next();
tprints_field_name("spaces");
@@ -76,10 +76,10 @@ index eb6f7e02b..819fcf084 100644
&info, sizeof(info), tfetch_mem,
print_btrfs_ioctl_space_info, 0);
diff --git a/src/defs.h b/src/defs.h
-index 518e57346..00a36249e 100644
+index bbc8aa38f..d8f84b32b 100644
--- a/src/defs.h
+++ b/src/defs.h
-@@ -1039,7 +1039,7 @@ print_local_array_ex(struct tcb *tcp,
+@@ -1047,7 +1047,7 @@ print_local_array_ex(struct tcb *tcp,
# define print_local_array_upto(tcp_, start_addr_, upto_, print_func_) \
print_local_array_ex((tcp_), (start_addr_), \
CLAMP((upto_), 0, \
@@ -88,7 +88,7 @@ index 518e57346..00a36249e 100644
sizeof((start_addr_)[0]), (print_func_), \
NULL, 0, NULL, NULL)
-@@ -1805,8 +1805,8 @@ scno_is_valid(kernel_ulong_t scno)
+@@ -1793,8 +1793,8 @@ scno_is_valid(kernel_ulong_t scno)
# define ILOG2_ITER_(val_, ret_, bit_) \
do { \
@@ -100,10 +100,10 @@ index 518e57346..00a36249e 100644
(val_) >>= shift_; \
(ret_) |= shift_; \
diff --git a/src/fs_0x94_ioctl.c b/src/fs_0x94_ioctl.c
-index f42ec2f0c..65381ec1b 100644
+index 7aa170af0..b908ea1fb 100644
--- a/src/fs_0x94_ioctl.c
+++ b/src/fs_0x94_ioctl.c
-@@ -95,7 +95,7 @@ decode_file_dedupe_range(struct tcb *const tcp, const kernel_ulong_t arg)
+@@ -94,7 +94,7 @@ decode_file_dedupe_range(struct tcb *const tcp, const kernel_ulong_t arg)
if (abbrev(tcp) && range.dest_count > count)
limit = &count;
@@ -113,7 +113,7 @@ index f42ec2f0c..65381ec1b 100644
tfetch_mem,
print_file_dedupe_range_info, limit);
diff --git a/src/fs_f_ioctl.c b/src/fs_f_ioctl.c
-index 4509f3d58..f763cad8d 100644
+index 7b51bc9f9..ee9a42754 100644
--- a/src/fs_f_ioctl.c
+++ b/src/fs_f_ioctl.c
@@ -72,7 +72,7 @@ decode_fiemap(struct tcb *const tcp, const kernel_ulong_t arg)
@@ -194,10 +194,10 @@ index 467f5d042..be54782bf 100644
# ifndef offsetofend
# define offsetofend(type_, member_) \
diff --git a/src/net.c b/src/net.c
-index 9942df21a..dc62e59cb 100644
+index b23911a97..9790943be 100644
--- a/src/net.c
+++ b/src/net.c
-@@ -459,7 +459,7 @@ SYS_FUNC(socketpair)
+@@ -528,7 +528,7 @@ SYS_FUNC(socketpair)
#define MAYBE_PRINT_FIELD_LEN(print_prefix_, where_, field_, \
len_, print_func_, ...) \
do { \
@@ -207,10 +207,10 @@ index 9942df21a..dc62e59cb 100644
if (len_ > start) { \
print_prefix_; \
diff --git a/src/ubi.c b/src/ubi.c
-index 93cec79c4..9047df640 100644
+index bd2d2811e..ff9f88cd0 100644
--- a/src/ubi.c
+++ b/src/ubi.c
-@@ -84,7 +84,7 @@ static bool
+@@ -76,7 +76,7 @@ static bool
print_ubi_rnvol_req_ent_array_member(struct tcb *tcp, void *elem_buf,
size_t elem_size, void *data)
{
@@ -233,18 +233,18 @@ index fd240259c..6d98c0b9c 100644
printf(", ");
printf("{transid=%" PRI__u64 ", objectid=",
diff --git a/tests/fcntl-common.c b/tests/fcntl-common.c
-index 155166617..ebc2e07aa 100644
+index 878a23c7c..0cfa23174 100644
--- a/tests/fcntl-common.c
+++ b/tests/fcntl-common.c
@@ -22,7 +22,7 @@
#define TEST_FLOCK64_EINVAL(cmd) test_flock64_einval(cmd, #cmd)
#ifdef HAVE_TYPEOF
--# define TYPEOF_FLOCK_OFF_T typeof(((struct_kernel_flock *) NULL)->l_len)
-+# define TYPEOF_FLOCK_OFF_T __typeof__(((struct_kernel_flock *) NULL)->l_len)
+-# define TYPEOF_FLOCK_OFF_T typeof(((struct flock *) NULL)->l_len)
++# define TYPEOF_FLOCK_OFF_T __typeof__(((struct flock *) NULL)->l_len)
#else
# define TYPEOF_FLOCK_OFF_T off_t
#endif
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch b/pkg/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch
index 5e4ede7f..ab5b54e7 100644
--- a/pkg/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch
+++ b/pkg/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch
@@ -1,4 +1,4 @@
-From b1d79a14c7df4f1698ac2243873a3b09b22cf8bb Mon Sep 17 00:00:00 2001
+From 21e7b497ab2009b9905566d3846c5aeb4d6db795 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 6 Jul 2019 01:40:36 -0700
Subject: [PATCH] Make tcp_sysent a static inline function
@@ -10,10 +10,10 @@ operator without evaluating the macro argument multiple times.
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/defs.h b/src/defs.h
-index 00a36249e..2768fcd46 100644
+index d8f84b32b..728e1fede 100644
--- a/src/defs.h
+++ b/src/defs.h
-@@ -386,8 +386,12 @@ struct tcb {
+@@ -390,8 +390,12 @@ struct tcb {
# define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL)
# define has_seccomp_filter(tcp) ((tcp)->flags & TCB_SECCOMP_FILTER)
@@ -29,5 +29,5 @@ index 00a36249e..2768fcd46 100644
# include "xlat.h"
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch b/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch
index 50119f13..5dba04d2 100644
--- a/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch
+++ b/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch
@@ -1,4 +1,4 @@
-From d98579a234b81512a4def2bc740457fcd0637ac2 Mon Sep 17 00:00:00 2001
+From d34216667b2ae3823893e80e98e5b7cc0a37c166 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sat, 6 Jul 2019 01:54:05 -0700
Subject: [PATCH] Avoid empty initializer lists
@@ -20,7 +20,7 @@ Subject: [PATCH] Avoid empty initializer lists
13 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/bpf.c b/src/bpf.c
-index 7d2f4b85d..4e8bbe09a 100644
+index 3d25a8b90..b53dd98a2 100644
--- a/src/bpf.c
+++ b/src/bpf.c
@@ -42,7 +42,7 @@ bpf_cmd_decoder(struct tcb *const tcp, \
@@ -32,7 +32,7 @@ index 7d2f4b85d..4e8bbe09a 100644
const size_t attr_size = bpf_cmd ## _struct_size; \
const unsigned int len = MIN(size, attr_size); \
memcpy(&attr, data, len); \
-@@ -153,7 +153,7 @@ print_ebpf_prog(struct tcb *const tcp, const uint64_t addr, const uint32_t len)
+@@ -154,7 +154,7 @@ print_ebpf_prog(struct tcb *const tcp, const uint64_t addr, const uint32_t len)
if (abbrev(tcp)) {
printaddr(addr);
} else {
@@ -42,10 +42,10 @@ index 7d2f4b85d..4e8bbe09a 100644
print_array(tcp, addr, len, &insn, sizeof(insn),
diff --git a/src/net.c b/src/net.c
-index dc62e59cb..c80958500 100644
+index 9790943be..ea2b71df8 100644
--- a/src/net.c
+++ b/src/net.c
-@@ -681,7 +681,7 @@ print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr,
+@@ -752,7 +752,7 @@ print_tpacket_stats(struct tcb *const tcp, const kernel_ulong_t addr,
static void
print_icmp_filter(struct tcb *const tcp, const kernel_ulong_t addr, int len)
{
@@ -55,10 +55,10 @@ index dc62e59cb..c80958500 100644
if (len > (int) sizeof(filter))
len = sizeof(filter);
diff --git a/src/sched.c b/src/sched.c
-index a9bbe64ff..661077e2f 100644
+index acd4d32cf..d7de19ada 100644
--- a/src/sched.c
+++ b/src/sched.c
-@@ -97,7 +97,7 @@ static void
+@@ -111,7 +111,7 @@ static void
print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr,
unsigned int usize)
{
@@ -81,10 +81,10 @@ index 5fc0789c3..cdea7f5b8 100644
return;
tprints(sprintsigmask_n("", mask, len));
diff --git a/src/strace.c b/src/strace.c
-index ab82a9908..24180a15f 100644
+index 61a598cb1..e67121d9a 100644
--- a/src/strace.c
+++ b/src/strace.c
-@@ -3387,7 +3387,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig)
+@@ -3436,7 +3436,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig)
syscall_entering_finish(tcp, res);
return res;
} else {
@@ -225,5 +225,5 @@ index a14899530..b08881ae7 100644
assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0);
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch b/pkg/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch
index d22c28cf..8078bd93 100644
--- a/pkg/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch
+++ b/pkg/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch
@@ -1,4 +1,4 @@
-From 39bde60243deec54676cd119f08192a1c8f7b06b Mon Sep 17 00:00:00 2001
+From 3e8180da79247998e838a028112e8b86a43e8172 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 7 Jul 2019 21:25:13 -0700
Subject: [PATCH] Avoid pointer arithmetic on `void *`
@@ -33,33 +33,33 @@ index 7d2872dc9..fd6c276cb 100644
smc_states, "SMC_???");
tprint_struct_next();
diff --git a/src/print_timespec.h b/src/print_timespec.h
-index feb6599f1..3351755cb 100644
+index 9603a6bb6..f5f747c42 100644
--- a/src/print_timespec.h
+++ b/src/print_timespec.h
-@@ -67,6 +67,8 @@ bool
+@@ -66,6 +66,8 @@ bool
PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb,
const size_t size)
{
+ const char *ts = arg;
+
if (nmemb > size / sizeof(TIMESPEC_T)) {
- tprints("?");
+ tprint_unavailable();
return false;
-@@ -74,10 +76,10 @@ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb,
+@@ -73,10 +75,10 @@ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb,
- tprints("[");
+ tprint_array_begin();
- for (unsigned int i = 0; i < nmemb; i++, arg += sizeof(TIMESPEC_T)) {
+ for (unsigned int i = 0; i < nmemb; i++, ts += sizeof(TIMESPEC_T)) {
if (i)
- tprints(", ");
+ tprint_array_next();
- print_unaligned_timespec_t(arg);
+ print_unaligned_timespec_t(ts);
}
- tprints("]");
+ tprint_array_end();
diff --git a/src/sockaddr.c b/src/sockaddr.c
-index ca8c86ce8..1f2ee0122 100644
+index 3da702153..9487741d6 100644
--- a/src/sockaddr.c
+++ b/src/sockaddr.c
@@ -497,7 +497,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf,
@@ -116,5 +116,5 @@ index 6cebb8e26..e8ca2ad5d 100644
}
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch b/pkg/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch
index be14ec82..051f6926 100644
--- a/pkg/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch
+++ b/pkg/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch
@@ -1,4 +1,4 @@
-From 2aafc896306daf6fc8a470993ffd6d300d2e410c Mon Sep 17 00:00:00 2001
+From bf1b06786d4a813efd06e179ce0db5a991312400 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 7 Jul 2019 21:53:16 -0700
Subject: [PATCH] Don't omit second operand to '?' operator
@@ -10,7 +10,7 @@ Subject: [PATCH] Don't omit second operand to '?' operator
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/open.c b/src/open.c
-index 4af4320b0..8191470ed 100644
+index 1dd79e9dc..9aaff9ec9 100644
--- a/src/open.c
+++ b/src/open.c
@@ -63,8 +63,9 @@ sprint_open_modes64(uint64_t flags)
@@ -26,10 +26,10 @@ index 4af4320b0..8191470ed 100644
const char *
diff --git a/src/prctl.c b/src/prctl.c
-index 58b644946..6147082eb 100644
+index 62e79510e..cb4379e57 100644
--- a/src/prctl.c
+++ b/src/prctl.c
-@@ -76,7 +76,7 @@ sprint_sve_val(kernel_ulong_t arg)
+@@ -67,7 +67,7 @@ sprint_sve_val(kernel_ulong_t arg)
const char *flags_str = sprintflags("", pr_sve_vl_flags, flags);
xsprintf(out, "%s%s%#" PRI_klx,
@@ -39,10 +39,10 @@ index 58b644946..6147082eb 100644
return out;
}
diff --git a/src/strace.c b/src/strace.c
-index 24180a15f..a71860e55 100644
+index e67121d9a..6e9425272 100644
--- a/src/strace.c
+++ b/src/strace.c
-@@ -2257,7 +2257,7 @@ init(int argc, char *argv[])
+@@ -2290,7 +2290,7 @@ init(int argc, char *argv[])
break;
case GETOPT_TS:
tflag_long_set = true;
@@ -51,7 +51,7 @@ index 24180a15f..a71860e55 100644
error_opt_arg(c, lopt, optarg);
break;
case 'T':
-@@ -2357,10 +2357,10 @@ init(int argc, char *argv[])
+@@ -2401,10 +2401,10 @@ init(int argc, char *argv[])
qualify_kvm(optarg);
break;
case GETOPT_QUAL_QUIET:
@@ -65,5 +65,5 @@ index 24180a15f..a71860e55 100644
default:
error_msg_and_help(NULL);
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch b/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch
index 643eee94..ddf92ab3 100644
--- a/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch
+++ b/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch
@@ -1,4 +1,4 @@
-From ac6d6953ee3bbb0a2717bb814c78f5671a993407 Mon Sep 17 00:00:00 2001
+From 6fcedfbc61c7f5b8896635407f0d6f4da1fea06b Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Sun, 7 Jul 2019 21:58:46 -0700
Subject: [PATCH] Avoid unnecessary VLAs
@@ -25,7 +25,7 @@ index afd4b3758..c1ed46588 100644
const size_t c = columns[i];
diff --git a/src/nlattr.c b/src/nlattr.c
-index 8ac034031..648181ac8 100644
+index c007cc8b5..bc8287c1c 100644
--- a/src/nlattr.c
+++ b/src/nlattr.c
@@ -344,7 +344,7 @@ decode_nla_hwaddr(struct tcb *const tcp,
@@ -60,10 +60,10 @@ index 40a8c1991..1482787ff 100644
if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst,
dst_buf, text_size))
diff --git a/src/syscall.c b/src/syscall.c
-index 52f2f29f6..cbb51fff4 100644
+index ebe5dd9b6..dc5997a94 100644
--- a/src/syscall.c
+++ b/src/syscall.c
-@@ -303,7 +303,7 @@ decode_socket_subcall(struct tcb *tcp)
+@@ -304,7 +304,7 @@ decode_socket_subcall(struct tcb *tcp)
const kernel_ulong_t scno = SYS_socket_subcall + call;
const unsigned int nargs = sysent[scno].nargs;
@@ -73,10 +73,10 @@ index 52f2f29f6..cbb51fff4 100644
if (umoven(tcp, tcp->u_arg[1], nargs * current_wordsize, buf) < 0)
return;
diff --git a/src/util.c b/src/util.c
-index 31b3876a3..8e12df0f1 100644
+index e87ac94b0..063db0382 100644
--- a/src/util.c
+++ b/src/util.c
-@@ -493,8 +493,7 @@ enum sock_proto
+@@ -508,8 +508,7 @@ enum sock_proto
getfdproto(struct tcb *tcp, int fd)
{
#ifdef HAVE_SYS_XATTR_H
@@ -86,7 +86,7 @@ index 31b3876a3..8e12df0f1 100644
ssize_t r;
char path[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3];
-@@ -502,7 +501,7 @@ getfdproto(struct tcb *tcp, int fd)
+@@ -517,7 +516,7 @@ getfdproto(struct tcb *tcp, int fd)
return SOCK_PROTO_UNKNOWN;
xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp), fd);
@@ -96,5 +96,5 @@ index 31b3876a3..8e12df0f1 100644
return SOCK_PROTO_UNKNOWN;
else {
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch b/pkg/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch
index 6764e026..8ad06b05 100644
--- a/pkg/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch
+++ b/pkg/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch
@@ -1,17 +1,17 @@
-From 4a468614678d3ae7b58e95428352268c975d1812 Mon Sep 17 00:00:00 2001
+From 1c1cc6c87f4388ef1e7259fee347a0c36fe11bac Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Thu, 30 Jan 2020 21:57:34 -0800
Subject: [PATCH] Use alloca when VLAs aren't available
---
- src/evdev.c | 14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
+ src/evdev.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/evdev.c b/src/evdev.c
-index 198d799f3..f74ab9a71 100644
+index 08d5d9034..01b87ca3e 100644
--- a/src/evdev.c
+++ b/src/evdev.c
-@@ -169,9 +169,13 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
+@@ -161,9 +161,13 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
return RVAL_IOCTL_DECODED;
}
@@ -26,30 +26,6 @@ index 198d799f3..f74ab9a71 100644
return RVAL_IOCTL_DECODED;
if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_RAW) {
-@@ -227,9 +231,13 @@ mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
- return RVAL_IOCTL_DECODED;
- }
-
-+#ifndef __STDC_NO_VLA__
- int buffer[size];
-+#else
-+ int *buffer = alloca(size * sizeof(int));
-+#endif
-
-- if (umove_or_printaddr(tcp, arg, &buffer))
-+ if (umoven_or_printaddr(tcp, arg, size * sizeof(int), buffer))
- return RVAL_IOCTL_DECODED;
-
- tprint_struct_begin();
-@@ -241,7 +249,7 @@ mtslots_ioctl(struct tcb *const tcp, const unsigned int code,
- tprints("[");
-
- unsigned int i;
-- for (i = 1; i < ARRAY_SIZE(buffer); i++)
-+ for (i = 1; i < size; i++)
- tprintf("%s%d", i > 1 ? ", " : "", buffer[i]);
-
- tprints("]");
--
-2.30.0
+2.31.1
diff --git a/pkg/strace/patch/0011-Avoid-index-ranges.patch b/pkg/strace/patch/0011-Avoid-index-ranges.patch
index 3575a551..9fb087c4 100644
--- a/pkg/strace/patch/0011-Avoid-index-ranges.patch
+++ b/pkg/strace/patch/0011-Avoid-index-ranges.patch
@@ -1,4 +1,4 @@
-From 81cd93d38da7a3e33d1e34f8272db1f262eda287 Mon Sep 17 00:00:00 2001
+From 499954f5529fb95ed5bc435ff79c320d7f3e8ee9 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Thu, 30 Jan 2020 22:32:50 -0800
Subject: [PATCH] Avoid index ranges
@@ -33,10 +33,10 @@ index c12a1eca3..dc3794787 100644
return sprint_mac_addr(hwaddr, MIN(size, sz));
diff --git a/src/util.c b/src/util.c
-index 8e12df0f1..6cbb0cd91 100644
+index 063db0382..05d160080 100644
--- a/src/util.c
+++ b/src/util.c
-@@ -1201,16 +1201,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr,
+@@ -1231,16 +1231,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr,
? 1 + ilog2_klong(len - 1) / HEX_BIT : DUMPSTR_OFFS_MIN_CHARS;
kernel_ulong_t i = 0;
const unsigned char *src;
@@ -58,5 +58,5 @@ index 8e12df0f1..6cbb0cd91 100644
/* Fetching data from tracee. */
--
-2.30.0
+2.31.1