diff options
| author | Michael Forney <mforney@mforney.org> | 2022-02-18 01:57:12 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2022-02-18 02:58:00 -0800 |
| commit | 131aab560632f3b8ce9fe1833050e6a31c9531fd (patch) | |
| tree | 9e175d33deb055cde049b83c0f750758d03573ab /pkg/strace/patch | |
| parent | b30c6df557bdc5340f22bb9af03df52b3bd3d27f (diff) | |
strace: Update to 5.16
Diffstat (limited to 'pkg/strace/patch')
12 files changed, 252 insertions, 211 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 0e28dad4..41d00421 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 2d644a73ecf46c454a40a78c1db0ab4ec76760bf Mon Sep 17 00:00:00 2001 +From ea3a66eaff044dcdbf29062d771f931e0777430e 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 5c369eceb..bbc8aa38f 100644 +index b95f6bdd3..fd11d60c3 100644 --- a/src/defs.h +++ b/src/defs.h -@@ -726,7 +726,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *); +@@ -784,7 +784,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *); static inline void pathtrace_select(const char *path) { @@ -21,5 +21,5 @@ index 5c369eceb..bbc8aa38f 100644 static inline bool -- -2.31.1 +2.34.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 2c4f8965..72e562b5 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 eeb1e797fc52a2a7fc470420ddd57344362c2c2e Mon Sep 17 00:00:00 2001 +From deb58e1542286779d0bd95482ae3e4e7e7ce7fb7 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 @@ -8,20 +8,21 @@ Subject: [PATCH] Use __typeof__ spelling of typeof src/defs.h | 6 +++--- src/fs_0x94_ioctl.c | 2 +- src/fs_f_ioctl.c | 2 +- - src/gcc_compat.h | 2 +- + src/landlock.c | 4 ++-- src/list.h | 10 +++++----- src/macros.h | 2 +- src/net.c | 2 +- + src/tee.c | 2 +- src/ubi.c | 2 +- tests/btrfs.c | 2 +- tests/fcntl-common.c | 2 +- - 11 files changed, 22 insertions(+), 22 deletions(-) + 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/btrfs.c b/src/btrfs.c -index df2b35a7f..2c49dcc67 100644 +index 349fee657..c641d2408 100644 --- a/src/btrfs.c +++ b/src/btrfs.c -@@ -214,7 +214,7 @@ btrfs_print_logical_ino_container(struct tcb *tcp, +@@ -216,7 +216,7 @@ btrfs_print_logical_ino_container(struct tcb *tcp, tprint_more_data_follows(); } else { const uint64_t val_addr = @@ -30,7 +31,7 @@ index df2b35a7f..2c49dcc67 100644 uint64_t record[3]; tprint_struct_next(); tprints_field_name("val"); -@@ -255,7 +255,7 @@ btrfs_print_ino_path_container(struct tcb *tcp, +@@ -257,7 +257,7 @@ btrfs_print_ino_path_container(struct tcb *tcp, tprint_more_data_follows(); } else { uint64_t val_addr = @@ -39,16 +40,16 @@ index df2b35a7f..2c49dcc67 100644 uint64_t offset; tprint_struct_next(); tprints_field_name("val"); -@@ -296,7 +296,7 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr) +@@ -298,7 +298,7 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr) uint64_t record; tprint_struct_next(); tprints_field_name("qgroups"); - print_array(tcp, qgi_addr + offsetof(typeof(inherit), qgroups), + print_array(tcp, qgi_addr + offsetof(__typeof__(inherit), qgroups), inherit.num_qgroups, &record, sizeof(record), - tfetch_mem, print_uint64_array_member, 0); + tfetch_mem, print_uint_array_member, 0); } -@@ -1149,7 +1149,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, +@@ -1169,7 +1169,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, PRINT_FIELD_OBJ_PTR(args, key, print_btrfs_ioctl_search_key, entering(tcp), !abbrev(tcp)); @@ -57,7 +58,7 @@ index df2b35a7f..2c49dcc67 100644 sizeof(args.buf), args.key.nr_items); tprint_struct_end(); if (entering(tcp)) -@@ -1185,7 +1185,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, +@@ -1205,7 +1205,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, entering(tcp), !abbrev(tcp)); tprint_struct_next(); PRINT_FIELD_U(args, buf_size); @@ -66,7 +67,7 @@ index df2b35a7f..2c49dcc67 100644 args.buf_size, args.key.nr_items); tprint_struct_end(); if (entering(tcp)) -@@ -1263,7 +1263,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, +@@ -1283,7 +1283,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, struct btrfs_ioctl_space_info info; tprint_struct_next(); tprints_field_name("spaces"); @@ -76,10 +77,10 @@ index df2b35a7f..2c49dcc67 100644 &info, sizeof(info), tfetch_mem, print_btrfs_ioctl_space_info, 0); diff --git a/src/defs.h b/src/defs.h -index bbc8aa38f..d8f84b32b 100644 +index fd11d60c3..71cec62b4 100644 --- a/src/defs.h +++ b/src/defs.h -@@ -1047,7 +1047,7 @@ print_local_array_ex(struct tcb *tcp, +@@ -1089,7 +1089,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 +89,7 @@ index bbc8aa38f..d8f84b32b 100644 sizeof((start_addr_)[0]), (print_func_), \ NULL, 0, NULL, NULL) -@@ -1793,8 +1793,8 @@ scno_is_valid(kernel_ulong_t scno) +@@ -1926,8 +1926,8 @@ scno_is_valid(kernel_ulong_t scno) # define ILOG2_ITER_(val_, ret_, bit_) \ do { \ @@ -125,19 +126,28 @@ index 7b51bc9f9..ee9a42754 100644 args.fm_mapped_extents, &fe, sizeof(fe), tfetch_mem, print_fiemap_extent, 0); } -diff --git a/src/gcc_compat.h b/src/gcc_compat.h -index 9b9bc9389..65f47f73f 100644 ---- a/src/gcc_compat.h -+++ b/src/gcc_compat.h -@@ -59,7 +59,7 @@ - # endif +diff --git a/src/landlock.c b/src/landlock.c +index d3ddb4edb..151bea7af 100644 +--- a/src/landlock.c ++++ b/src/landlock.c +@@ -19,7 +19,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr, + { + struct landlock_ruleset_attr attr; + +- if (size < offsetofend(typeof(attr), handled_access_fs)) { ++ if (size < offsetofend(__typeof__(attr), handled_access_fs)) { + printaddr(addr); + return; + } +@@ -31,7 +31,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr, + PRINT_FIELD_FLAGS(attr, handled_access_fs, landlock_ruleset_access_fs, + "LANDLOCK_ACCESS_FS_???"); - # if GNUC_PREREQ(3, 0) --# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y)) -+# define SAME_TYPE(x, y) __builtin_types_compatible_p(__typeof__(x), __typeof__(y)) - # define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0) - /* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */ - # define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0])) +- if (size > offsetofend(typeof(attr), handled_access_fs)) { ++ if (size > offsetofend(__typeof__(attr), handled_access_fs)) { + tprint_arg_next(); + tprint_more_data_follows(); + } diff --git a/src/list.h b/src/list.h index 4de4cb3be..f4ec11f0e 100644 --- a/src/list.h @@ -181,10 +191,10 @@ index 4de4cb3be..f4ec11f0e 100644 #endif /* !STRACE_LIST_H */ diff --git a/src/macros.h b/src/macros.h -index 467f5d042..be54782bf 100644 +index fc563ce2d..02f58d726 100644 --- a/src/macros.h +++ b/src/macros.h -@@ -39,7 +39,7 @@ +@@ -62,7 +62,7 @@ # define sizeof_field(type_, member_) (sizeof(((type_ *)0)->member_)) @@ -194,11 +204,11 @@ index 467f5d042..be54782bf 100644 # ifndef offsetofend # define offsetofend(type_, member_) \ diff --git a/src/net.c b/src/net.c -index b23911a97..9790943be 100644 +index 3ba2330fb..8d4458a70 100644 --- a/src/net.c +++ b/src/net.c -@@ -528,7 +528,7 @@ SYS_FUNC(socketpair) - #define MAYBE_PRINT_FIELD_LEN(print_prefix_, where_, field_, \ +@@ -524,7 +524,7 @@ SYS_FUNC(socketpair) + #define MAYBE_PRINT_FIELD_LEN(print_prefix_, where_, field_, \ len_, print_func_, ...) \ do { \ - unsigned int start = offsetof(typeof(where_), field_); \ @@ -206,6 +216,19 @@ index b23911a97..9790943be 100644 unsigned int end = start + sizeof(where_.field_); \ if (len_ > start) { \ print_prefix_; \ +diff --git a/src/tee.c b/src/tee.c +index d7e9b15d9..fc735e0da 100644 +--- a/src/tee.c ++++ b/src/tee.c +@@ -33,7 +33,7 @@ struct tee_ioctl_shm_register_fd_data { + + #define TEE_FETCH_BUF_DATA(buf_, arg_, params_) \ + tee_fetch_buf_data(tcp, arg, &buf_, sizeof(arg_), \ +- &arg_, offsetof(typeof(arg_), num_params), \ ++ &arg_, offsetof(__typeof__(arg_), num_params), \ + params_) + + /* session id is printed as 0x%x in libteec */ diff --git a/src/ubi.c b/src/ubi.c index bd2d2811e..ff9f88cd0 100644 --- a/src/ubi.c @@ -220,12 +243,12 @@ index bd2d2811e..ff9f88cd0 100644 tprint_struct_begin(); PRINT_FIELD_D(*p, vol_id); diff --git a/tests/btrfs.c b/tests/btrfs.c -index fd240259c..6d98c0b9c 100644 +index 867d93213..12ae01545 100644 --- a/tests/btrfs.c +++ b/tests/btrfs.c -@@ -849,7 +849,7 @@ btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, +@@ -876,7 +876,7 @@ btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, printf("buf=["); - for (i = 0; i < key->nr_items; i++) { + for (uint64_t i = 0; i < key->nr_items; ++i) { struct btrfs_ioctl_search_header *sh; - sh = (typeof(sh))(buf + off); + sh = (__typeof__(sh))(buf + off); @@ -233,11 +256,11 @@ index fd240259c..6d98c0b9c 100644 printf(", "); printf("{transid=%" PRI__u64 ", objectid=", diff --git a/tests/fcntl-common.c b/tests/fcntl-common.c -index 878a23c7c..0cfa23174 100644 +index 20f92dd1d..aa6ecc8f5 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) +@@ -28,7 +28,7 @@ + #endif #ifdef HAVE_TYPEOF -# define TYPEOF_FLOCK_OFF_T typeof(((struct flock *) NULL)->l_len) @@ -246,5 +269,5 @@ index 878a23c7c..0cfa23174 100644 # define TYPEOF_FLOCK_OFF_T off_t #endif -- -2.31.1 +2.34.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 ab5b54e7..df420382 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 21e7b497ab2009b9905566d3846c5aeb4d6db795 Mon Sep 17 00:00:00 2001 +From 42f2ce6f4e8cd2e6e1667088da58e237afc2cbb0 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 d8f84b32b..728e1fede 100644 +index 71cec62b4..56b2882b6 100644 --- a/src/defs.h +++ b/src/defs.h -@@ -390,8 +390,12 @@ struct tcb { +@@ -397,8 +397,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 d8f84b32b..728e1fede 100644 # include "xlat.h" -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch b/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch index 5dba04d2..f21f2f8e 100644 --- a/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch +++ b/pkg/strace/patch/0004-Avoid-empty-initializer-lists.patch @@ -1,11 +1,11 @@ -From d34216667b2ae3823893e80e98e5b7cc0a37c166 Mon Sep 17 00:00:00 2001 +From d24d8f3d9a658f2732c99d92376a675af58aee25 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 --- src/bpf.c | 4 ++-- - src/net.c | 2 +- + src/futex_waitv.c | 2 +- src/sched.c | 2 +- src/signal.c | 2 +- src/strace.c | 2 +- @@ -20,10 +20,10 @@ Subject: [PATCH] Avoid empty initializer lists 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bpf.c b/src/bpf.c -index 3d25a8b90..b53dd98a2 100644 +index 801968048..841bb33e3 100644 --- a/src/bpf.c +++ b/src/bpf.c -@@ -42,7 +42,7 @@ bpf_cmd_decoder(struct tcb *const tcp, \ +@@ -43,7 +43,7 @@ bpf_cmd_decoder(struct tcb *const tcp, \ #define BEGIN_BPF_CMD_DECODER(bpf_cmd) \ static DECL_BPF_CMD_DECODER(decode_ ## bpf_cmd) \ { \ @@ -41,19 +41,19 @@ index 3d25a8b90..b53dd98a2 100644 struct ebpf_insn insn; print_array(tcp, addr, len, &insn, sizeof(insn), -diff --git a/src/net.c b/src/net.c -index 9790943be..ea2b71df8 100644 ---- a/src/net.c -+++ b/src/net.c -@@ -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) +diff --git a/src/futex_waitv.c b/src/futex_waitv.c +index 512ee715d..340201aa3 100644 +--- a/src/futex_waitv.c ++++ b/src/futex_waitv.c +@@ -49,7 +49,7 @@ print_waiter_array(struct tcb * const tcp, const kernel_ulong_t waiters, + const unsigned int nr_futexes) { -- struct icmp_filter filter = {}; -+ struct icmp_filter filter = {0}; + struct futex_waitv buf; +- struct print_waiter_data data = {}; ++ struct print_waiter_data data = {0}; - if (len > (int) sizeof(filter)) - len = sizeof(filter); + print_array(tcp, waiters, nr_futexes, &buf, sizeof(buf), + tfetch_mem, print_waiter, &data); diff --git a/src/sched.c b/src/sched.c index acd4d32cf..d7de19ada 100644 --- a/src/sched.c @@ -68,10 +68,10 @@ index acd4d32cf..d7de19ada 100644 bool is_set = false; diff --git a/src/signal.c b/src/signal.c -index 5fc0789c3..cdea7f5b8 100644 +index fc13a6613..f7b6e6e49 100644 --- a/src/signal.c +++ b/src/signal.c -@@ -249,7 +249,7 @@ print_sigset_addr_len_limit(struct tcb *const tcp, const kernel_ulong_t addr, +@@ -257,7 +257,7 @@ print_sigset_addr_len_limit(struct tcb *const tcp, const kernel_ulong_t addr, printaddr(addr); return; } @@ -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 61a598cb1..e67121d9a 100644 +index 7370275e1..d12e1f34a 100644 --- a/src/strace.c +++ b/src/strace.c -@@ -3436,7 +3436,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig) +@@ -3532,7 +3532,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig) syscall_entering_finish(tcp, res); return res; } else { @@ -94,10 +94,10 @@ index 61a598cb1..e67121d9a 100644 if (res != 0) { res = syscall_exiting_trace(tcp, &ts, res); diff --git a/tests/btrfs.c b/tests/btrfs.c -index 6d98c0b9c..a0e587479 100644 +index 12ae01545..a821d8057 100644 --- a/tests/btrfs.c +++ b/tests/btrfs.c -@@ -279,7 +279,7 @@ btrfs_test_subvol_ioctls(void) +@@ -313,7 +313,7 @@ btrfs_test_subvol_ioctls(void) char *long_subvol_name; void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL; uint64_t u64val = 0xdeadbeefbadc0dedULL; @@ -106,7 +106,7 @@ index 6d98c0b9c..a0e587479 100644 struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { .fd = 2, .flags = max_flags_plus_one(2), -@@ -526,7 +526,7 @@ btrfs_test_balance_ioctls(void) +@@ -554,7 +554,7 @@ btrfs_test_balance_ioctls(void) .devid = 1, }, }; @@ -115,7 +115,7 @@ index 6d98c0b9c..a0e587479 100644 ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); printf("ioctl(-1, %s, %sBTRFS_BALANCE_CTL_PAUSE%s) = -1 EBADF (%m)\n", -@@ -736,7 +736,7 @@ btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args, +@@ -764,7 +764,7 @@ btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args, static void btrfs_test_defrag_ioctls(void) { @@ -124,7 +124,7 @@ index 6d98c0b9c..a0e587479 100644 struct btrfs_ioctl_defrag_range_args args = { .start = 0, .len = -1ULL, -@@ -1065,7 +1065,7 @@ btrfs_test_ino_lookup_ioctl(void) +@@ -1092,7 +1092,7 @@ btrfs_test_ino_lookup_ioctl(void) static void btrfs_test_space_info_ioctl(void) { @@ -186,10 +186,10 @@ index d4953f6f8..60d54fbd8 100644 continue; rlimit[0] = libc_rlim.rlim_cur; diff --git a/tests/timer_create.c b/tests/timer_create.c -index 1059a01d8..692eecf03 100644 +index af91da0d3..a0a79f1ad 100644 --- a/tests/timer_create.c +++ b/tests/timer_create.c -@@ -26,7 +26,7 @@ main(void) +@@ -24,7 +24,7 @@ main(void) printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", errno2name()); @@ -225,5 +225,5 @@ index a14899530..b08881ae7 100644 assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); -- -2.31.1 +2.34.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 8078bd93..afb64a88 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 3e8180da79247998e838a028112e8b86a43e8172 Mon Sep 17 00:00:00 2001 +From 4cd0019ddd66505ce71f0cffa3627a4a038640ef 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 *` @@ -6,15 +6,16 @@ Subject: [PATCH] Avoid pointer arithmetic on `void *` --- src/netlink_smc_diag.c | 4 ++-- src/print_timespec.h | 6 ++++-- - src/sockaddr.c | 2 +- - src/ucopy.c | 10 +++++----- - 4 files changed, 12 insertions(+), 10 deletions(-) + src/sockaddr.c | 4 ++-- + src/tee.c | 2 +- + src/ucopy.c | 12 ++++++------ + 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/netlink_smc_diag.c b/src/netlink_smc_diag.c -index 7d2872dc9..fd6c276cb 100644 +index f7ff06b6b..dbf5be980 100644 --- a/src/netlink_smc_diag.c +++ b/src/netlink_smc_diag.c -@@ -41,7 +41,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req) +@@ -42,7 +42,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req) if (len >= sizeof(req)) { if (!umoven_or_printaddr(tcp, addr + offset, sizeof(req) - offset, @@ -59,10 +60,10 @@ index 9603a6bb6..f5f747c42 100644 tprint_array_end(); diff --git a/src/sockaddr.c b/src/sockaddr.c -index 3da702153..9487741d6 100644 +index a6e698d4b..52c10eac4 100644 --- a/src/sockaddr.c +++ b/src/sockaddr.c -@@ -497,7 +497,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf, +@@ -580,7 +580,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf, static void print_sockaddr_data_raw(const void *const buf, const int addrlen) { @@ -71,8 +72,30 @@ index 3da702153..9487741d6 100644 const int datalen = addrlen - SIZEOF_SA_FAMILY; tprints_field_name("sa_data"); +@@ -777,7 +777,7 @@ print_sockaddr_data_rxrpc(struct tcb *tcp, const void *const buf, + tprints_field_name("transport"); + tprint_struct_begin(); + +- const void *const transport_buf = (void *) &sa->transport ++ const void *const transport_buf = (char *) &sa->transport + + sizeof(sa->transport.family); + const int transport_len = MIN(sa->transport_len, + len - offsetof(struct sockaddr_rxrpc, +diff --git a/src/tee.c b/src/tee.c +index fc735e0da..f705a7a94 100644 +--- a/src/tee.c ++++ b/src/tee.c +@@ -69,7 +69,7 @@ tee_fetch_buf_data(struct tcb *const tcp, + tee_print_buf(buf); + return RVAL_IOCTL_DECODED; + } +- uint32_t *num_params = (uint32_t *) (arg_struct + num_params_offs); ++ uint32_t *num_params = (uint32_t *) ((char *)arg_struct + num_params_offs); + if (entering(tcp) && + (arg_size + TEE_IOCTL_PARAM_SIZE(*num_params) != buf->buf_len)) { + /* diff --git a/src/ucopy.c b/src/ucopy.c -index 6cebb8e26..e8ca2ad5d 100644 +index c769a1916..ed401ae74 100644 --- a/src/ucopy.c +++ b/src/ucopy.c @@ -186,7 +186,7 @@ vm_read_mem(const pid_t pid, void *laddr, @@ -84,8 +107,8 @@ index 6cebb8e26..e8ca2ad5d 100644 page_start += page_size; taddr = page_start; } -@@ -278,7 +278,7 @@ umoven_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, - memcpy(laddr, &u.x[residue], m); +@@ -282,7 +282,7 @@ umoven_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, + memcpy(laddr, &u.data[residue], m); residue = 0; addr += sizeof(long); - laddr += m; @@ -93,10 +116,10 @@ index 6cebb8e26..e8ca2ad5d 100644 nread += m; len -= m; } -@@ -375,10 +375,10 @@ umovestr_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, - memcpy(laddr, &u.x[residue], m); +@@ -378,10 +378,10 @@ umovestr_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, + memcpy(laddr, &u.data[residue], m); while (residue < sizeof(long)) - if (u.x[residue++] == '\0') + if (u.data[residue++] == '\0') - return (laddr - orig_addr) + residue; + return nread + residue; residue = 0; @@ -106,7 +129,16 @@ index 6cebb8e26..e8ca2ad5d 100644 nread += m; len -= m; } -@@ -509,7 +509,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, +@@ -502,7 +502,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, + + addr += sizeof(long); + nwritten += npoke; +- our_addr += npoke; ++ our_addr = (char *)our_addr + npoke; + len -= npoke; + } + +@@ -515,7 +515,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, addr += sizeof(long); nwritten += sizeof(long); @@ -116,5 +148,5 @@ index 6cebb8e26..e8ca2ad5d 100644 } -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/0006-Avoid-empty-struct-definition.patch b/pkg/strace/patch/0006-Avoid-empty-struct-definition.patch index 61f895ab..ca4fc3ab 100644 --- a/pkg/strace/patch/0006-Avoid-empty-struct-definition.patch +++ b/pkg/strace/patch/0006-Avoid-empty-struct-definition.patch @@ -1,4 +1,4 @@ -From 4abe148a0e2dc930a5cdb8d92e88af203898368a Mon Sep 17 00:00:00 2001 +From f94d470d85911142bff6cb3821079f3ff321edfc Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 7 Jul 2019 21:50:31 -0700 Subject: [PATCH] Avoid empty struct definition @@ -34,5 +34,5 @@ index b5125d420..b45a48da5 100644 return false; -- -2.30.0 +2.34.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 051f6926..e737858a 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,19 +1,33 @@ -From bf1b06786d4a813efd06e179ce0db5a991312400 Mon Sep 17 00:00:00 2001 +From 91ba17ac11b0994dc28019a7b643d479a2f201c5 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 --- - src/open.c | 5 +++-- - src/prctl.c | 2 +- - src/strace.c | 6 +++--- - 3 files changed, 7 insertions(+), 6 deletions(-) + src/kd_ioctl.c | 2 +- + src/open.c | 5 +++-- + src/prctl.c | 2 +- + src/strace.c | 6 +++--- + 4 files changed, 8 insertions(+), 7 deletions(-) +diff --git a/src/kd_ioctl.c b/src/kd_ioctl.c +index eadc1a457..35a89ffed 100644 +--- a/src/kd_ioctl.c ++++ b/src/kd_ioctl.c +@@ -449,7 +449,7 @@ kd_kbd_str_entry(struct tcb *const tcp, const kernel_ulong_t arg, + + if (print_quoted_string((char *) val.kb_string, + MIN(max_strlen, +- (unsigned int) ret ?: sizeof(val.kb_string)), ++ ret ? (unsigned int) ret : sizeof(val.kb_string)), + QUOTE_OMIT_TRAILING_0)) + tprint_more_data_follows(); + diff --git a/src/open.c b/src/open.c -index 1dd79e9dc..9aaff9ec9 100644 +index d7654d7e8..6c5c4a2a5 100644 --- a/src/open.c +++ b/src/open.c -@@ -63,8 +63,9 @@ sprint_open_modes64(uint64_t flags) +@@ -88,8 +88,9 @@ sprint_open_modes64(uint64_t flags) } *p = '\0'; @@ -26,10 +40,10 @@ index 1dd79e9dc..9aaff9ec9 100644 const char * diff --git a/src/prctl.c b/src/prctl.c -index 62e79510e..cb4379e57 100644 +index 4275e5f70..a52b3348d 100644 --- a/src/prctl.c +++ b/src/prctl.c -@@ -67,7 +67,7 @@ sprint_sve_val(kernel_ulong_t arg) +@@ -80,7 +80,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 +53,10 @@ index 62e79510e..cb4379e57 100644 return out; } diff --git a/src/strace.c b/src/strace.c -index e67121d9a..6e9425272 100644 +index d12e1f34a..85c8568fe 100644 --- a/src/strace.c +++ b/src/strace.c -@@ -2290,7 +2290,7 @@ init(int argc, char *argv[]) +@@ -2380,7 +2380,7 @@ init(int argc, char *argv[]) break; case GETOPT_TS: tflag_long_set = true; @@ -51,7 +65,7 @@ index e67121d9a..6e9425272 100644 error_opt_arg(c, lopt, optarg); break; case 'T': -@@ -2401,10 +2401,10 @@ init(int argc, char *argv[]) +@@ -2488,10 +2488,10 @@ init(int argc, char *argv[]) qualify_kvm(optarg); break; case GETOPT_QUAL_QUIET: @@ -62,8 +76,8 @@ index e67121d9a..6e9425272 100644 - qualify_decode_fd(optarg ?: yflag_qual); + qualify_decode_fd(optarg ? optarg : yflag_qual); break; - default: - error_msg_and_help(NULL); + case GETOPT_QUAL_DECODE_PID: + qualify_decode_pid(optarg); -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch b/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch index ddf92ab3..753113a9 100644 --- a/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch +++ b/pkg/strace/patch/0008-Avoid-unnecessary-VLAs.patch @@ -1,4 +1,4 @@ -From 6fcedfbc61c7f5b8896635407f0d6f4da1fea06b Mon Sep 17 00:00:00 2001 +From fa5aa4ec41eafb8a65732dd599bd645a8650d0d1 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 @@ -12,7 +12,7 @@ Subject: [PATCH] Avoid unnecessary VLAs 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/count.c b/src/count.c -index afd4b3758..c1ed46588 100644 +index e4f362787..ad203748b 100644 --- a/src/count.c +++ b/src/count.c @@ -414,7 +414,7 @@ call_summary_pers(FILE *outf) @@ -25,10 +25,10 @@ index afd4b3758..c1ed46588 100644 const size_t c = columns[i]; diff --git a/src/nlattr.c b/src/nlattr.c -index c007cc8b5..bc8287c1c 100644 +index 9b4879a84..ffa8be53e 100644 --- a/src/nlattr.c +++ b/src/nlattr.c -@@ -344,7 +344,7 @@ decode_nla_hwaddr(struct tcb *const tcp, +@@ -356,7 +356,7 @@ decode_nla_hwaddr(struct tcb *const tcp, if (len > MAX_ADDR_LEN) return false; @@ -38,10 +38,10 @@ index c007cc8b5..bc8287c1c 100644 if (!umoven_or_printaddr(tcp, addr, len, buf)) { diff --git a/src/socketutils.c b/src/socketutils.c -index 40a8c1991..1482787ff 100644 +index 4994cd6d9..0a3102347 100644 --- a/src/socketutils.c +++ b/src/socketutils.c -@@ -144,7 +144,7 @@ inet_parse_response(const void *const data, const int data_len, +@@ -133,7 +133,7 @@ inet_parse_response(const void *const data, const int data_len, return -1; } @@ -50,7 +50,7 @@ index 40a8c1991..1482787ff 100644 char *details; /* open/closing brackets for IPv6 addresses */ -@@ -157,7 +157,7 @@ inet_parse_response(const void *const data, const int data_len, +@@ -146,7 +146,7 @@ inet_parse_response(const void *const data, const int data_len, if (diag_msg->id.idiag_dport || memcmp(zero_addr, diag_msg->id.idiag_dst, addr_size)) { @@ -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 ebe5dd9b6..dc5997a94 100644 +index 92aaee092..159a2a511 100644 --- a/src/syscall.c +++ b/src/syscall.c -@@ -304,7 +304,7 @@ decode_socket_subcall(struct tcb *tcp) +@@ -287,7 +287,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 ebe5dd9b6..dc5997a94 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 e87ac94b0..063db0382 100644 +index 302496d36..4ed870ac6 100644 --- a/src/util.c +++ b/src/util.c -@@ -508,8 +508,7 @@ enum sock_proto +@@ -571,8 +571,7 @@ enum sock_proto getfdproto(struct tcb *tcp, int fd) { #ifdef HAVE_SYS_XATTR_H @@ -86,15 +86,15 @@ index e87ac94b0..063db0382 100644 ssize_t r; char path[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3]; -@@ -517,7 +516,7 @@ getfdproto(struct tcb *tcp, int fd) +@@ -580,7 +579,7 @@ getfdproto(struct tcb *tcp, int fd) return SOCK_PROTO_UNKNOWN; - xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp), fd); + xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp->pid), fd); - r = getxattr(path, "system.sockprotoname", buf, bufsize - 1); + r = getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1); if (r <= 0) return SOCK_PROTO_UNKNOWN; else { -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch b/pkg/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch index 71dcbd29..404125dd 100644 --- a/pkg/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch +++ b/pkg/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch @@ -1,4 +1,4 @@ -From b8db0d40427b083351f080cfd151346f23302e03 Mon Sep 17 00:00:00 2001 +From 4facb9769bda85852c9bc8f54b85073314568d04 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 7 Jul 2019 22:29:34 -0700 Subject: [PATCH] Avoid index ranges and empty initializer lists in syscallent @@ -18,14 +18,14 @@ Subject: [PATCH] Avoid index ranges and empty initializer lists in syscallent src/linux/s390/syscallent.h | 42 ++++++++-------- src/linux/s390x/syscallent.h | 78 +++++++++++++++--------------- src/linux/sh/syscallent.h | 12 ++--- - src/linux/sh64/syscallent.h | 22 ++++++--- + src/linux/sh64/syscallent.h | 18 +++---- src/linux/sparc/syscallent.h | 4 +- src/linux/sparc64/syscallent.h | 36 +++++++------- src/linux/xtensa/syscallent.h | 32 ++++++------ - 17 files changed, 173 insertions(+), 167 deletions(-) + 17 files changed, 168 insertions(+), 168 deletions(-) diff --git a/src/linux/alpha/syscallent.h b/src/linux/alpha/syscallent.h -index f9e971ed3..36f29509b 100644 +index 87cbe59bd..88bc0a5a4 100644 --- a/src/linux/alpha/syscallent.h +++ b/src/linux/alpha/syscallent.h @@ -60,7 +60,7 @@ @@ -150,7 +150,7 @@ index f9e971ed3..36f29509b 100644 [406] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" }, [407] = { 1, TD, SEN(epoll_create), "epoll_create" }, diff --git a/src/linux/arm/syscallent.h b/src/linux/arm/syscallent.h -index 4fd351305..3ec054c84 100644 +index 2086308a2..f4d808f2d 100644 --- a/src/linux/arm/syscallent.h +++ b/src/linux/arm/syscallent.h @@ -433,7 +433,7 @@ @@ -163,7 +163,7 @@ index 4fd351305..3ec054c84 100644 [ARM_FIRST_SHUFFLED_SYSCALL+1+2] = { 3, TM, SEN(printargs), "cacheflush" }, [ARM_FIRST_SHUFFLED_SYSCALL+1+3] = { 0, 0, SEN(printargs), "usr26" }, diff --git a/src/linux/avr32/syscallent.h b/src/linux/avr32/syscallent.h -index 5d4624abe..14aff66a2 100644 +index 104044e5f..1b3f3c64e 100644 --- a/src/linux/avr32/syscallent.h +++ b/src/linux/avr32/syscallent.h @@ -228,7 +228,7 @@ @@ -185,7 +185,7 @@ index 5d4624abe..14aff66a2 100644 [284] = { 5, TD, SEN(pread), "pread64" }, [285] = { 5, TD, SEN(pwrite), "pwrite64" }, diff --git a/src/linux/bfin/syscallent.h b/src/linux/bfin/syscallent.h -index 16287d085..90f55b5c2 100644 +index 05720b4f9..abef9f5c6 100644 --- a/src/linux/bfin/syscallent.h +++ b/src/linux/bfin/syscallent.h @@ -229,7 +229,7 @@ @@ -198,7 +198,7 @@ index 16287d085..90f55b5c2 100644 [225] = { 4, TD, SEN(readahead), "readahead" }, [226] = { 5, TF, SEN(setxattr), "setxattr" }, diff --git a/src/linux/i386/syscallent.h b/src/linux/i386/syscallent.h -index 3c4cb9fe4..fe9e8b4a6 100644 +index 3553a0575..4ae813d43 100644 --- a/src/linux/i386/syscallent.h +++ b/src/linux/i386/syscallent.h @@ -229,7 +229,7 @@ @@ -229,7 +229,7 @@ index 3c4cb9fe4..fe9e8b4a6 100644 [287] = { 4, 0, SEN(request_key), "request_key" }, [288] = { 5, 0, SEN(keyctl), "keyctl" }, diff --git a/src/linux/m68k/syscallent.h b/src/linux/m68k/syscallent.h -index 67f66d719..2205f4982 100644 +index 3abd77b0c..d861832e2 100644 --- a/src/linux/m68k/syscallent.h +++ b/src/linux/m68k/syscallent.h @@ -225,7 +225,7 @@ @@ -242,7 +242,7 @@ index 67f66d719..2205f4982 100644 [221] = { 0, PU|NF, SEN(gettid), "gettid" }, [222] = { 2, TS|TP, SEN(tkill), "tkill" }, diff --git a/src/linux/microblaze/syscallent.h b/src/linux/microblaze/syscallent.h -index d3446abdb..7d8c7394f 100644 +index 15ca048ca..7c86c2d07 100644 --- a/src/linux/microblaze/syscallent.h +++ b/src/linux/microblaze/syscallent.h @@ -229,7 +229,7 @@ @@ -437,7 +437,7 @@ index 29cc42632..b1274f890 100644 [3261] = { 0, 0, SEN(printargs), "posix_netunboot" }, [3262] = { 0, 0, SEN(printargs), "posix_rdump" }, diff --git a/src/linux/powerpc/syscallent.h b/src/linux/powerpc/syscallent.h -index 98b29e5e8..38056daf6 100644 +index c8f954be4..c47134fd5 100644 --- a/src/linux/powerpc/syscallent.h +++ b/src/linux/powerpc/syscallent.h @@ -231,7 +231,7 @@ @@ -450,7 +450,7 @@ index 98b29e5e8..38056daf6 100644 [226] = { 4, TD|TN, SEN(sendfile64), "sendfile64" }, [227] = { 2, TM, SEN(io_setup), "io_setup" }, diff --git a/src/linux/powerpc64/syscallent.h b/src/linux/powerpc64/syscallent.h -index a5035cb31..86ffe0099 100644 +index 64f4c3ad5..6d6b3fa74 100644 --- a/src/linux/powerpc64/syscallent.h +++ b/src/linux/powerpc64/syscallent.h @@ -199,14 +199,14 @@ @@ -492,7 +492,7 @@ index a5035cb31..86ffe0099 100644 [256] = { 5, 0, SEN(printargs), "sys_debug_setcontext" }, [257] = { 5, 0, SEN(vserver), "vserver" }, diff --git a/src/linux/s390/syscallent.h b/src/linux/s390/syscallent.h -index 5b83b3d15..ccb956441 100644 +index a808c7b5b..8f7a0aca0 100644 --- a/src/linux/s390/syscallent.h +++ b/src/linux/s390/syscallent.h @@ -26,8 +26,8 @@ @@ -626,12 +626,12 @@ index 5b83b3d15..ccb956441 100644 [244] = { 1, TM, SEN(io_destroy), "io_destroy" }, [245] = { 5, 0, SEN(io_getevents_time32), "io_getevents" }, diff --git a/src/linux/s390x/syscallent.h b/src/linux/s390x/syscallent.h -index d64141075..8225b5ec4 100644 +index 90bf993b7..8c03af9d9 100644 --- a/src/linux/s390x/syscallent.h +++ b/src/linux/s390x/syscallent.h @@ -21,29 +21,29 @@ [ 10] = { 1, TF, SEN(unlink), "unlink" }, - [ 11] = { 3, TF|TP|TSD|SE|SI, SEN(execve), "execve" }, + [ 11] = { 3, CC|TF|TP|TSD|SE|SI, SEN(execve), "execve" }, [ 12] = { 1, TF, SEN(chdir), "chdir" }, -[ 13] = { }, +/* [ 13] - unused */ @@ -785,7 +785,7 @@ index d64141075..8225b5ec4 100644 [169] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, -[170 ... 171] = { }, +/* [170 ... 171] - unused */ - [172] = { 5, TC, SEN(prctl), "prctl" }, + [172] = { 5, CC|TC, SEN(prctl), "prctl" }, [173] = { 0, TS, SEN(rt_sigreturn), "rt_sigreturn" }, [174] = { 4, TS, SEN(rt_sigaction), "rt_sigaction" }, @@ -180,7 +180,7 @@ @@ -837,7 +837,7 @@ index d64141075..8225b5ec4 100644 [266] = { 3, TD|TFSF|TSFA, SEN(fstatfs64), "fstatfs64" }, [267] = { 5, TM|SI, SEN(remap_file_pages), "remap_file_pages" }, diff --git a/src/linux/sh/syscallent.h b/src/linux/sh/syscallent.h -index 64f3d6f1f..d79c2e8ed 100644 +index c238f0400..a95f0db99 100644 --- a/src/linux/sh/syscallent.h +++ b/src/linux/sh/syscallent.h @@ -197,7 +197,7 @@ @@ -894,7 +894,7 @@ index 64f3d6f1f..d79c2e8ed 100644 [295] = { 4, TD|TF, SEN(openat), "openat" }, [296] = { 3, TD|TF, SEN(mkdirat), "mkdirat" }, diff --git a/src/linux/sh64/syscallent.h b/src/linux/sh64/syscallent.h -index 94e6cea3a..ad192a1b9 100644 +index f33504235..646eb6f4a 100644 --- a/src/linux/sh64/syscallent.h +++ b/src/linux/sh64/syscallent.h @@ -89,7 +89,7 @@ @@ -915,23 +915,16 @@ index 94e6cea3a..ad192a1b9 100644 [114] = { 4, TP, SEN(wait4), "wait4" }, [115] = { 1, TF, SEN(swapoff), "swapoff" }, [116] = { 1, 0, SEN(sysinfo), "sysinfo" }, -@@ -171,9 +171,15 @@ - [161] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"}, - [162] = { 2, 0, SEN(nanosleep_time64), "nanosleep" }, +@@ -173,7 +173,7 @@ [163] = { 5, TM|SI, SEN(mremap), "mremap" }, -+<<<<<<< HEAD [164] = { 3, TC, SEN(setresuid16), "setresuid" }, [165] = { 3, TC, SEN(getresuid16), "getresuid" }, - [166] = { }, -+======= -+[164] = { 3, 0, SEN(setresuid16), "setresuid" }, -+[165] = { 3, 0, SEN(getresuid16), "getresuid" }, +-[166] = { }, +/* [166] - unused */ -+>>>>>>> c63898a0... Avoid index ranges and empty initializer lists in syscallent arrays [167] = { 5, 0, SEN(query_module), "query_module" }, [168] = { 3, TD, SEN(poll_time64), "poll" }, [169] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, -@@ -195,7 +201,7 @@ +@@ -195,7 +195,7 @@ [185] = { 2, TC, SEN(capset), "capset" }, [186] = { 2, TS, SEN(sigaltstack), "sigaltstack" }, [187] = { 4, TD|TN, SEN(sendfile), "sendfile" }, @@ -940,7 +933,7 @@ index 94e6cea3a..ad192a1b9 100644 [190] = { 0, TP, SEN(vfork), "vfork" }, [191] = { 2, 0, SEN(getrlimit), "ugetrlimit" }, [192] = { 6, TD|TM|SI, SEN(mmap_4koff), "mmap2" }, -@@ -256,7 +262,7 @@ +@@ -256,7 +256,7 @@ [247] = { 3, TI, SEN(shmctl), "shmctl" }, [248] = { 3, TD, SEN(getdents64), "getdents64" }, [249] = { 3, TD, SEN(fcntl64), "fcntl64" }, @@ -949,7 +942,7 @@ index 94e6cea3a..ad192a1b9 100644 [252] = { 0, PU|NF, SEN(gettid), "gettid" }, [253] = { 3, TD, SEN(readahead), "readahead" }, [254] = { 5, TF, SEN(setxattr), "setxattr" }, -@@ -276,14 +282,14 @@ +@@ -276,14 +276,14 @@ [268] = { 6, 0, SEN(futex_time64), "futex" }, [269] = { 3, 0, SEN(sched_setaffinity), "sched_setaffinity" }, [270] = { 3, 0, SEN(sched_getaffinity), "sched_getaffinity" }, @@ -966,7 +959,7 @@ index 94e6cea3a..ad192a1b9 100644 [280] = { 1, TP|SE, SEN(exit), "exit_group" }, [281] = { 3, 0, SEN(lookup_dcookie), "lookup_dcookie" }, [282] = { 1, TD, SEN(epoll_create), "epoll_create" }, -@@ -305,7 +311,7 @@ +@@ -305,7 +305,7 @@ [298] = { 3, TS|TP, SEN(tgkill), "tgkill" }, [299] = { 2, TF, SEN(utimes), "utimes" }, [300] = { 4, TD, SEN(fadvise64_64), "fadvise64_64" }, @@ -975,7 +968,7 @@ index 94e6cea3a..ad192a1b9 100644 [302] = { 6, TM, SEN(mbind), "mbind" }, [303] = { 5, TM, SEN(get_mempolicy), "get_mempolicy" }, [304] = { 3, TM, SEN(set_mempolicy), "set_mempolicy" }, -@@ -325,7 +331,7 @@ +@@ -325,7 +325,7 @@ [318] = { 0, TD, SEN(inotify_init), "inotify_init" }, [319] = { 3, TD|TF, SEN(inotify_add_watch), "inotify_add_watch" }, [320] = { 2, TD, SEN(inotify_rm_watch), "inotify_rm_watch" }, @@ -985,7 +978,7 @@ index 94e6cea3a..ad192a1b9 100644 [323] = { 4, TD|TF, SEN(openat), "openat" }, [324] = { 3, TD|TF, SEN(mkdirat), "mkdirat" }, diff --git a/src/linux/sparc/syscallent.h b/src/linux/sparc/syscallent.h -index e3321f448..1f83f1619 100644 +index 55d10ec5d..e0d74b014 100644 --- a/src/linux/sparc/syscallent.h +++ b/src/linux/sparc/syscallent.h @@ -57,7 +57,7 @@ @@ -1007,7 +1000,7 @@ index e3321f448..1f83f1619 100644 [166] = { 1, 0, SEN(set_tid_address), "set_tid_address" }, [167] = { 5, TF, SEN(mount), "mount" }, diff --git a/src/linux/sparc64/syscallent.h b/src/linux/sparc64/syscallent.h -index 94471f0c7..f0bfccd56 100644 +index 9cd51431d..78278a045 100644 --- a/src/linux/sparc64/syscallent.h +++ b/src/linux/sparc64/syscallent.h @@ -36,10 +36,10 @@ @@ -1044,7 +1037,7 @@ index 94471f0c7..f0bfccd56 100644 +/* [ 56] - unused */ [ 57] = { 2, TF, SEN(symlink), "symlink" }, [ 58] = { 3, TF, SEN(readlink), "readlink" }, - [ 59] = { 3, TF|TP|TSD|SE|SI, SEN(execve), "execve" }, + [ 59] = { 3, CC|TF|TP|TSD|SE|SI, SEN(execve), "execve" }, @@ -73,31 +73,31 @@ [ 66] = { 0, TP, SEN(vfork), "vfork" }, [ 67] = { 4, TD, SEN(pread), "pread64" }, @@ -1118,7 +1111,7 @@ index 94471f0c7..f0bfccd56 100644 [233] = { 1, 0, SEN(stime), "stime" }, [234] = { 3, TF|TSF|TSFA, SEN(statfs64), "statfs64" }, diff --git a/src/linux/xtensa/syscallent.h b/src/linux/xtensa/syscallent.h -index eb6425d53..5289872d7 100644 +index 09fed329c..69d58ec6d 100644 --- a/src/linux/xtensa/syscallent.h +++ b/src/linux/xtensa/syscallent.h @@ -7,7 +7,7 @@ @@ -1243,5 +1236,5 @@ index eb6425d53..5289872d7 100644 [321] = { 6, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, [322] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, -- -2.30.0 +2.34.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 8ad06b05..07dae470 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,4 +1,4 @@ -From 1c1cc6c87f4388ef1e7259fee347a0c36fe11bac Mon Sep 17 00:00:00 2001 +From 4673bf0d6a0eba5d363266a40cfb087e08a66e7f 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 @@ -8,10 +8,10 @@ Subject: [PATCH] Use alloca when VLAs aren't available 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c -index 08d5d9034..01b87ca3e 100644 +index 81dd951cb..74a765469 100644 --- a/src/evdev.c +++ b/src/evdev.c -@@ -161,9 +161,13 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg, +@@ -164,9 +164,13 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg, return RVAL_IOCTL_DECODED; } @@ -27,5 +27,5 @@ index 08d5d9034..01b87ca3e 100644 if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_RAW) { -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/0011-Avoid-index-ranges.patch b/pkg/strace/patch/0011-Avoid-index-ranges.patch index 9fb087c4..0292e350 100644 --- a/pkg/strace/patch/0011-Avoid-index-ranges.patch +++ b/pkg/strace/patch/0011-Avoid-index-ranges.patch @@ -1,4 +1,4 @@ -From 499954f5529fb95ed5bc435ff79c320d7f3e8ee9 Mon Sep 17 00:00:00 2001 +From ec81ad56aec0cdfe0eff2cd4cb9ea396e3ab9794 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 @@ -11,7 +11,7 @@ ignore this for now. 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/print_mac.c b/src/print_mac.c -index c12a1eca3..dc3794787 100644 +index 9674b9841..7446fa719 100644 --- a/src/print_mac.c +++ b/src/print_mac.c @@ -17,8 +17,6 @@ @@ -23,7 +23,7 @@ index c12a1eca3..dc3794787 100644 [ARPHRD_NETROM] = 7 /* AX25_ADDR_LEN */, [ARPHRD_ETHER] = 6 /* ETH_ALEN */, /* ARPHRD_EETHER - no actual devices in Linux */ -@@ -128,7 +126,7 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size) +@@ -129,7 +127,7 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size) const char * sprint_hwaddr(const uint8_t hwaddr[], size_t size, uint32_t devtype) { @@ -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 063db0382..05d160080 100644 +index 4ed870ac6..e6a7fdfba 100644 --- a/src/util.c +++ b/src/util.c -@@ -1231,16 +1231,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr, +@@ -1382,16 +1382,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 063db0382..05d160080 100644 /* Fetching data from tracee. */ -- -2.31.1 +2.34.1 diff --git a/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch b/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch index 1d2de5c4..f168d664 100644 --- a/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch +++ b/pkg/strace/patch/1001-Prevent-zero-sized-arrays.patch @@ -1,22 +1,21 @@ -From 55ff71bf1e559974132c313181134f8a24625fcc Mon Sep 17 00:00:00 2001 +From a9a8b003bc97952fcc47d84b2ba9c490d90985e3 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> -Date: Sat, 26 Sep 2020 16:30:33 -0700 +Date: Fri, 18 Feb 2022 01:40:22 -0800 Subject: [PATCH] Prevent zero-sized arrays --- src/xlat/btrfs_features_compat.h | 3 ++- - src/xlat/mq_attr_flags.h | 3 ++- + src/xlat/compat_ptrace_cmds.h | 3 ++- src/xlat/sigprof_codes.h | 3 ++- - src/xlat/sock_ipx_options.h | 3 ++- - 4 files changed, 8 insertions(+), 4 deletions(-) + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xlat/btrfs_features_compat.h b/src/xlat/btrfs_features_compat.h -index 44d99a5..f20e7c4 100644 +index 12136c495..cc5804a1b 100644 --- a/src/xlat/btrfs_features_compat.h +++ b/src/xlat/btrfs_features_compat.h -@@ -13,13 +13,14 @@ extern const struct xlat btrfs_features_compat[]; - # else +@@ -15,13 +15,14 @@ extern const struct xlat btrfs_features_compat[]; + DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE static const struct xlat_data btrfs_features_compat_xdata[] = { + {0} }; @@ -30,31 +29,29 @@ index 44d99a5..f20e7c4 100644 .type = XT_NORMAL, .flags_mask = 0 , -diff --git a/src/xlat/mq_attr_flags.h b/src/xlat/mq_attr_flags.h -index c8593a6..3534c0e 100644 ---- a/src/xlat/mq_attr_flags.h -+++ b/src/xlat/mq_attr_flags.h -@@ -18,13 +18,14 @@ static const struct xlat_data mq_attr_flags_xdata[] = { - #define XLAT_VAL_0 ((unsigned) (O_NONBLOCK)) - #define XLAT_STR_0 STRINGIFY(O_NONBLOCK) +diff --git a/src/xlat/compat_ptrace_cmds.h b/src/xlat/compat_ptrace_cmds.h +index 9a7fc96b1..a29567689 100644 +--- a/src/xlat/compat_ptrace_cmds.h ++++ b/src/xlat/compat_ptrace_cmds.h +@@ -225,11 +225,12 @@ static const struct xlat_data compat_ptrace_cmds_xdata[] = { + #define XLAT_VAL_9 ((unsigned) (COMPAT_PTRACE_SETHBPREGS)) + #define XLAT_STR_9 STRINGIFY(COMPAT_PTRACE_SETHBPREGS) #endif -+ {0}, ++ {0} }; - # if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS) static - # endif - const struct xlat mq_attr_flags[1] = { { - .data = mq_attr_flags_xdata, -- .size = ARRAY_SIZE(mq_attr_flags_xdata), -+ .size = ARRAY_SIZE(mq_attr_flags_xdata) - 1, - .type = XT_NORMAL, + const struct xlat compat_ptrace_cmds[1] = { { + .data = compat_ptrace_cmds_xdata, +- .size = ARRAY_SIZE(compat_ptrace_cmds_xdata), ++ .size = ARRAY_SIZE(compat_ptrace_cmds_xdata) - 1, + .type = XT_SORTED, .flags_mask = 0 # ifdef XLAT_VAL_0 diff --git a/src/xlat/sigprof_codes.h b/src/xlat/sigprof_codes.h -index 5147a5f..019edf3 100644 +index bc61fdc8f..88f043ab9 100644 --- a/src/xlat/sigprof_codes.h +++ b/src/xlat/sigprof_codes.h -@@ -18,13 +18,14 @@ static const struct xlat_data sigprof_codes_xdata[] = { +@@ -20,13 +20,14 @@ static const struct xlat_data sigprof_codes_xdata[] = { #define XLAT_VAL_0 ((unsigned) (PROF_SIG)) #define XLAT_STR_0 STRINGIFY(PROF_SIG) #endif @@ -70,24 +67,6 @@ index 5147a5f..019edf3 100644 .type = XT_NORMAL, .flags_mask = 0 # ifdef XLAT_VAL_0 -diff --git a/src/xlat/sock_ipx_options.h b/src/xlat/sock_ipx_options.h -index 653d4dc..2f259ba 100644 ---- a/src/xlat/sock_ipx_options.h -+++ b/src/xlat/sock_ipx_options.h -@@ -18,11 +18,12 @@ static const struct xlat_data sock_ipx_options_xdata[] = { - #define XLAT_VAL_0 ((unsigned) (IPX_TYPE)) - #define XLAT_STR_0 STRINGIFY(IPX_TYPE) - #endif -+ {0} - }; - static - const struct xlat sock_ipx_options[1] = { { - .data = sock_ipx_options_xdata, -- .size = ARRAY_SIZE(sock_ipx_options_xdata), -+ .size = ARRAY_SIZE(sock_ipx_options_xdata) - 1, - .type = XT_NORMAL, - .flags_mask = 0 - # ifdef XLAT_VAL_0 -- -2.30.0 +2.34.1 |
