Blame SOURCES/0127-Consistently-print-process-ids-as-signed-integers.patch

d811e0
From edf6f95bd19f5ce7ac0ef62f923cd17fb6052f51 Mon Sep 17 00:00:00 2001
d811e0
From: "Dmitry V. Levin" <ldv@altlinux.org>
d811e0
Date: Sat, 18 Jul 2020 08:00:00 +0000
d811e0
Subject: [PATCH 127/138] Consistently print process ids as signed integers
d811e0
d811e0
* block.c (block_ioctl): Print struct_blk_user_trace_setup.pid using
d811e0
PRINT_FIELD_D instead of PRINT_FIELD_U.
d811e0
* bpf.c (BPF_TASK_FD_QUERY): Print task_fd_query.pid using PRINT_FIELD_D
d811e0
instead of PRINT_FIELD_U.
d811e0
* ipc_msgctl.c (print_msqid_ds): Print msqid_ds.msg_lspid
d811e0
and msqid_ds.msg_lrpid using PRINT_FIELD_D.
d811e0
* ipc_shmctl.c (print_shmid_ds): Print shmid_ds.shm_cpid and shm_lpid
d811e0
using PRINT_FIELD_D.
d811e0
* msghdr.c (print_scm_creds): Print ucred.pid using PRINT_FIELD_D
d811e0
instead of PRINT_FIELD_U.
d811e0
* netlink.c (print_nlmsghdr): Print nlmsghdr.nlmsg_pid using %d format
d811e0
instead of %u.
d811e0
* tests/bpf.c (BPF_TASK_FD_QUERY_checks): Update expected output.
d811e0
* tests/ioctl_block.c (main): Update expected output.
d811e0
* tests/ipc_msg.c (main): Likewise.
d811e0
* tests/ipc_shm.c (main): Likewise.
d811e0
* tests/net-yy-netlink.c (main): Likewise.
d811e0
* tests/netlink_protocol.c (test_nlmsgerr): Likewise.
d811e0
---
d811e0
 block.c                  | 2 +-
d811e0
 bpf.c                    | 2 +-
d811e0
 ipc_msgctl.c             | 4 ++--
d811e0
 ipc_shmctl.c             | 4 ++--
d811e0
 msghdr.c                 | 2 +-
d811e0
 netlink.c                | 2 +-
d811e0
 tests/bpf.c              | 8 ++++----
d811e0
 tests/ioctl_block.c      | 2 +-
d811e0
 tests/ipc_msg.c          | 6 +++---
d811e0
 tests/ipc_shm.c          | 8 ++++----
d811e0
 tests/net-yy-netlink.c   | 4 ++--
d811e0
 tests/netlink_protocol.c | 4 ++--
d811e0
 12 files changed, 24 insertions(+), 24 deletions(-)
d811e0
d811e0
Index: strace-5.7/block.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/block.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/block.c	2020-09-09 14:59:14.715043707 +0200
d811e0
@@ -179,7 +179,7 @@
d811e0
 			PRINT_FIELD_U(", ", buts, buf_nr);
d811e0
 			PRINT_FIELD_U(", ", buts, start_lba);
d811e0
 			PRINT_FIELD_U(", ", buts, end_lba);
d811e0
-			PRINT_FIELD_U(", ", buts, pid);
d811e0
+			PRINT_FIELD_D(", ", buts, pid);
d811e0
 			return 0;
d811e0
 		} else {
d811e0
 			struct_blk_user_trace_setup buts;
d811e0
Index: strace-5.7/bpf.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/bpf.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/bpf.c	2020-09-09 14:59:14.715043707 +0200
d811e0
@@ -927,7 +927,7 @@
d811e0
 	if (entering(tcp)) {
d811e0
 		set_tcb_priv_ulong(tcp, attr.buf_len);
d811e0
 
d811e0
-		PRINT_FIELD_U("{task_fd_query={", attr, pid);
d811e0
+		PRINT_FIELD_D("{task_fd_query={", attr, pid);
d811e0
 		PRINT_FIELD_FD(", ", attr, fd, tcp);
d811e0
 		PRINT_FIELD_U(", ", attr, flags);
d811e0
 		PRINT_FIELD_U(", ", attr, buf_len);
d811e0
Index: strace-5.7/ipc_msgctl.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/ipc_msgctl.c	2020-09-09 14:59:12.909042630 +0200
d811e0
+++ strace-5.7/ipc_msgctl.c	2020-09-09 14:59:14.715043707 +0200
d811e0
@@ -58,8 +58,8 @@
d811e0
 		tprintf(", msg_ctime=%u", (unsigned) msqid_ds.msg_ctime);
d811e0
 		tprintf(", msg_qnum=%u", (unsigned) msqid_ds.msg_qnum);
d811e0
 		tprintf(", msg_qbytes=%u", (unsigned) msqid_ds.msg_qbytes);
d811e0
-		tprintf(", msg_lspid=%u", (unsigned) msqid_ds.msg_lspid);
d811e0
-		tprintf(", msg_lrpid=%u", (unsigned) msqid_ds.msg_lrpid);
d811e0
+		PRINT_FIELD_D(", ", msqid_ds, msg_lspid);
d811e0
+		PRINT_FIELD_D(", ", msqid_ds, msg_lrpid);
d811e0
 		tprints("}");
d811e0
 		break;
d811e0
 
d811e0
Index: strace-5.7/ipc_shmctl.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/ipc_shmctl.c	2020-09-09 14:59:12.909042630 +0200
d811e0
+++ strace-5.7/ipc_shmctl.c	2020-09-09 14:59:14.716043707 +0200
d811e0
@@ -54,8 +54,8 @@
d811e0
 		PRINT_FIELD_UID(", ", shmid_ds.shm_perm, cgid);
d811e0
 		tprints("}");
d811e0
 		tprintf(", shm_segsz=%u", (unsigned) shmid_ds.shm_segsz);
d811e0
-		tprintf(", shm_cpid=%u", (unsigned) shmid_ds.shm_cpid);
d811e0
-		tprintf(", shm_lpid=%u", (unsigned) shmid_ds.shm_lpid);
d811e0
+		PRINT_FIELD_D(", ", shmid_ds, shm_cpid);
d811e0
+		PRINT_FIELD_D(", ", shmid_ds, shm_lpid);
d811e0
 		tprintf(", shm_nattch=%u", (unsigned) shmid_ds.shm_nattch);
d811e0
 		tprintf(", shm_atime=%u", (unsigned) shmid_ds.shm_atime);
d811e0
 		tprintf(", shm_dtime=%u", (unsigned) shmid_ds.shm_dtime);
d811e0
Index: strace-5.7/msghdr.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/msghdr.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/msghdr.c	2020-09-09 14:59:14.717043708 +0200
d811e0
@@ -69,7 +69,7 @@
d811e0
 {
d811e0
 	const struct ucred *uc = cmsg_data;
d811e0
 
d811e0
-	PRINT_FIELD_U("{", *uc, pid);
d811e0
+	PRINT_FIELD_D("{", *uc, pid);
d811e0
 	PRINT_FIELD_UID(", ", *uc, uid);
d811e0
 	PRINT_FIELD_UID(", ", *uc, gid);
d811e0
 	tprints("}");
d811e0
Index: strace-5.7/netlink.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/netlink.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/netlink.c	2020-09-09 14:59:14.717043708 +0200
d811e0
@@ -446,7 +446,7 @@
d811e0
 	decode_nlmsg_flags(nlmsghdr->nlmsg_flags,
d811e0
 			   nlmsghdr->nlmsg_type, family);
d811e0
 
d811e0
-	tprintf(", seq=%u, pid=%u}", nlmsghdr->nlmsg_seq,
d811e0
+	tprintf(", seq=%u, pid=%d}", nlmsghdr->nlmsg_seq,
d811e0
 		nlmsghdr->nlmsg_pid);
d811e0
 }
d811e0
 
d811e0
Index: strace-5.7/tests/bpf.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/bpf.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/bpf.c	2020-09-09 14:59:14.717043708 +0200
d811e0
@@ -1289,16 +1289,16 @@
d811e0
 
d811e0
 static const struct bpf_attr_check BPF_TASK_FD_QUERY_checks[] = {
d811e0
 	{
d811e0
-		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 0xdeadbeef } },
d811e0
+		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 1735928559 } },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, pid),
d811e0
-		.str = "task_fd_query={pid=3735928559, fd=0" FD0_PATH
d811e0
+		.str = "task_fd_query={pid=1735928559, fd=0" FD0_PATH
d811e0
 		       ", flags=0, buf_len=0, buf=NULL, prog_id=0"
d811e0
 		       ", fd_type=BPF_FD_TYPE_RAW_TRACEPOINT"
d811e0
 		       ", probe_offset=0, probe_addr=0}"
d811e0
 	},
d811e0
 	{ /* 1 */
d811e0
 		.data = { .BPF_TASK_FD_QUERY_data = {
d811e0
-			.pid = 0xcafef00d,
d811e0
+			.pid = 1405705229,
d811e0
 			.fd = 0xdeadbeef,
d811e0
 			.flags = 0xfacefeed,
d811e0
 			.buf_len = 0xdefaced,
d811e0
@@ -1309,7 +1309,7 @@
d811e0
 			.probe_addr = 0xfac5fed5fac7fed8
d811e0
 		} },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, probe_addr),
d811e0
-		.str = "task_fd_query={pid=3405705229"
d811e0
+		.str = "task_fd_query={pid=1405705229"
d811e0
 		       ", fd=-559038737"
d811e0
 		       ", flags=4207869677"
d811e0
 		       ", buf_len=233811181"
d811e0
Index: strace-5.7/tests/ioctl_block.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/ioctl_block.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/ioctl_block.c	2020-09-09 14:59:14.717043708 +0200
d811e0
@@ -165,7 +165,7 @@
d811e0
 
d811e0
 	ioctl(-1, BLKTRACESETUP, buts);
d811e0
 	printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u"
d811e0
-	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})"
d811e0
+	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%d})"
d811e0
 	       " = -1 EBADF (%m)\n",
d811e0
 	       buts->act_mask, buts->buf_size, buts->buf_nr,
d811e0
 	       buts->start_lba, buts->end_lba, buts->pid);
d811e0
Index: strace-5.7/tests/ipc_msg.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/ipc_msg.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/ipc_msg.c	2020-09-09 14:59:14.717043708 +0200
d811e0
@@ -128,15 +128,15 @@
d811e0
 	printf("msgctl\\(%d, (%s\\|)?%s, \\{msg_perm=\\{uid=%u"
d811e0
 	       ", gid=%u, mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u"
d811e0
 	       ", msg_rtime=%u, msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u"
d811e0
-	       ", msg_lspid=%u, msg_lrpid=%u\\}\\) = 0\n",
d811e0
+	       ", msg_lspid=%d, msg_lrpid=%d\\}\\) = 0\n",
d811e0
 	       id, str_ipc_64, str_ipc_stat,
d811e0
 	       (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid,
d811e0
 	       (unsigned) ds.msg_perm.mode, (unsigned) ds.msg_perm.__key,
d811e0
 	       (unsigned) ds.msg_perm.cuid, (unsigned) ds.msg_perm.cgid,
d811e0
 	       (unsigned) ds.msg_stime, (unsigned) ds.msg_rtime,
d811e0
 	       (unsigned) ds.msg_ctime, (unsigned) ds.msg_qnum,
d811e0
-	       (unsigned) ds.msg_qbytes, (unsigned) ds.msg_lspid,
d811e0
-	       (unsigned) ds.msg_lrpid);
d811e0
+	       (unsigned) ds.msg_qbytes, (int) ds.msg_lspid,
d811e0
+	       (int) ds.msg_lrpid);
d811e0
 
d811e0
 	if (msgctl(id, IPC_SET, &ds))
d811e0
 		perror_msg_and_skip("msgctl IPC_SET");
d811e0
Index: strace-5.7/tests/ipc_shm.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/ipc_shm.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/ipc_shm.c	2020-09-09 14:59:14.718043708 +0200
d811e0
@@ -168,15 +168,15 @@
d811e0
 	if (shmctl(id, IPC_STAT, &ds))
d811e0
 		perror_msg_and_skip("shmctl IPC_STAT");
d811e0
 	printf("shmctl\\(%d, (%s\\|)?%s, \\{shm_perm=\\{uid=%u, gid=%u, "
d811e0
-		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, "
d811e0
-		"shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
+		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%d, "
d811e0
+		"shm_lpid=%d, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
 		"shm_ctime=%u\\}\\) = 0\n",
d811e0
 		id, str_ipc_64, str_ipc_stat,
d811e0
 		(unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid,
d811e0
 		(unsigned) ds.shm_perm.mode, (unsigned) ds.shm_perm.__key,
d811e0
 		(unsigned) ds.shm_perm.cuid, (unsigned) ds.shm_perm.cgid,
d811e0
-		(unsigned) ds.shm_segsz, (unsigned) ds.shm_cpid,
d811e0
-		(unsigned) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
+		(unsigned) ds.shm_segsz, (int) ds.shm_cpid,
d811e0
+		(int) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
 		(unsigned) ds.shm_atime, (unsigned) ds.shm_dtime,
d811e0
 		(unsigned) ds. shm_ctime);
d811e0
 
d811e0
Index: strace-5.7/tests/net-yy-netlink.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/net-yy-netlink.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/net-yy-netlink.c	2020-09-09 14:59:14.718043708 +0200
d811e0
@@ -67,13 +67,13 @@
d811e0
 	if (bind(fd, sa, *len))
d811e0
 		perror_msg_and_skip("bind");
d811e0
 	printf("bind(%d" FMT_UNBOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, %u) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, %u) = 0\n",
d811e0
 	       fd, ARG_UNBOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (getsockname(fd, sa, len))
d811e0
 		perror_msg_and_fail("getsockname");
d811e0
 	printf("getsockname(%d" FMT_BOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, [%u]) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, [%u]) = 0\n",
d811e0
 	       fd, ARG_BOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (close(fd))
d811e0
Index: strace-5.7/tests/netlink_protocol.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests/netlink_protocol.c	2020-09-09 14:50:43.878739225 +0200
d811e0
+++ strace-5.7/tests/netlink_protocol.c	2020-09-09 14:59:14.718043708 +0200
d811e0
@@ -264,7 +264,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
+	       ", seq=%u, pid=%d}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,
d811e0
 	       nlh->nlmsg_len, sprintrc(rc));
d811e0
@@ -289,7 +289,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
+	       ", seq=%u, pid=%d}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
 	       ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,
d811e0
Index: strace-5.7/tests-m32/bpf.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/bpf.c	2020-04-18 15:47:17.000000000 +0200
d811e0
+++ strace-5.7/tests-m32/bpf.c	2020-09-09 14:59:52.229066067 +0200
d811e0
@@ -1289,16 +1289,16 @@
d811e0
 
d811e0
 static const struct bpf_attr_check BPF_TASK_FD_QUERY_checks[] = {
d811e0
 	{
d811e0
-		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 0xdeadbeef } },
d811e0
+		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 1735928559 } },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, pid),
d811e0
-		.str = "task_fd_query={pid=3735928559, fd=0" FD0_PATH
d811e0
+		.str = "task_fd_query={pid=1735928559, fd=0" FD0_PATH
d811e0
 		       ", flags=0, buf_len=0, buf=NULL, prog_id=0"
d811e0
 		       ", fd_type=BPF_FD_TYPE_RAW_TRACEPOINT"
d811e0
 		       ", probe_offset=0, probe_addr=0}"
d811e0
 	},
d811e0
 	{ /* 1 */
d811e0
 		.data = { .BPF_TASK_FD_QUERY_data = {
d811e0
-			.pid = 0xcafef00d,
d811e0
+			.pid = 1405705229,
d811e0
 			.fd = 0xdeadbeef,
d811e0
 			.flags = 0xfacefeed,
d811e0
 			.buf_len = 0xdefaced,
d811e0
@@ -1309,7 +1309,7 @@
d811e0
 			.probe_addr = 0xfac5fed5fac7fed8
d811e0
 		} },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, probe_addr),
d811e0
-		.str = "task_fd_query={pid=3405705229"
d811e0
+		.str = "task_fd_query={pid=1405705229"
d811e0
 		       ", fd=-559038737"
d811e0
 		       ", flags=4207869677"
d811e0
 		       ", buf_len=233811181"
d811e0
Index: strace-5.7/tests-m32/ioctl_block.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/ioctl_block.c	2019-07-24 19:12:18.000000000 +0200
d811e0
+++ strace-5.7/tests-m32/ioctl_block.c	2020-09-09 14:59:52.290066103 +0200
d811e0
@@ -165,7 +165,7 @@
d811e0
 
d811e0
 	ioctl(-1, BLKTRACESETUP, buts);
d811e0
 	printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u"
d811e0
-	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})"
d811e0
+	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%d})"
d811e0
 	       " = -1 EBADF (%m)\n",
d811e0
 	       buts->act_mask, buts->buf_size, buts->buf_nr,
d811e0
 	       buts->start_lba, buts->end_lba, buts->pid);
d811e0
Index: strace-5.7/tests-m32/ipc_msg.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/ipc_msg.c	2019-09-25 03:02:03.000000000 +0200
d811e0
+++ strace-5.7/tests-m32/ipc_msg.c	2020-09-09 14:59:52.349066138 +0200
d811e0
@@ -128,15 +128,15 @@
d811e0
 	printf("msgctl\\(%d, (%s\\|)?%s, \\{msg_perm=\\{uid=%u"
d811e0
 	       ", gid=%u, mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u"
d811e0
 	       ", msg_rtime=%u, msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u"
d811e0
-	       ", msg_lspid=%u, msg_lrpid=%u\\}\\) = 0\n",
d811e0
+	       ", msg_lspid=%d, msg_lrpid=%d\\}\\) = 0\n",
d811e0
 	       id, str_ipc_64, str_ipc_stat,
d811e0
 	       (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid,
d811e0
 	       (unsigned) ds.msg_perm.mode, (unsigned) ds.msg_perm.__key,
d811e0
 	       (unsigned) ds.msg_perm.cuid, (unsigned) ds.msg_perm.cgid,
d811e0
 	       (unsigned) ds.msg_stime, (unsigned) ds.msg_rtime,
d811e0
 	       (unsigned) ds.msg_ctime, (unsigned) ds.msg_qnum,
d811e0
-	       (unsigned) ds.msg_qbytes, (unsigned) ds.msg_lspid,
d811e0
-	       (unsigned) ds.msg_lrpid);
d811e0
+	       (unsigned) ds.msg_qbytes, (int) ds.msg_lspid,
d811e0
+	       (int) ds.msg_lrpid);
d811e0
 
d811e0
 	if (msgctl(id, IPC_SET, &ds))
d811e0
 		perror_msg_and_skip("msgctl IPC_SET");
d811e0
Index: strace-5.7/tests-m32/ipc_shm.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/ipc_shm.c	2019-11-28 20:30:05.000000000 +0100
d811e0
+++ strace-5.7/tests-m32/ipc_shm.c	2020-09-09 14:59:52.406066172 +0200
d811e0
@@ -168,15 +168,15 @@
d811e0
 	if (shmctl(id, IPC_STAT, &ds))
d811e0
 		perror_msg_and_skip("shmctl IPC_STAT");
d811e0
 	printf("shmctl\\(%d, (%s\\|)?%s, \\{shm_perm=\\{uid=%u, gid=%u, "
d811e0
-		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, "
d811e0
-		"shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
+		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%d, "
d811e0
+		"shm_lpid=%d, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
 		"shm_ctime=%u\\}\\) = 0\n",
d811e0
 		id, str_ipc_64, str_ipc_stat,
d811e0
 		(unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid,
d811e0
 		(unsigned) ds.shm_perm.mode, (unsigned) ds.shm_perm.__key,
d811e0
 		(unsigned) ds.shm_perm.cuid, (unsigned) ds.shm_perm.cgid,
d811e0
-		(unsigned) ds.shm_segsz, (unsigned) ds.shm_cpid,
d811e0
-		(unsigned) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
+		(unsigned) ds.shm_segsz, (int) ds.shm_cpid,
d811e0
+		(int) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
 		(unsigned) ds.shm_atime, (unsigned) ds.shm_dtime,
d811e0
 		(unsigned) ds. shm_ctime);
d811e0
 
d811e0
Index: strace-5.7/tests-m32/net-yy-netlink.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/net-yy-netlink.c	2020-04-04 00:58:26.000000000 +0200
d811e0
+++ strace-5.7/tests-m32/net-yy-netlink.c	2020-09-09 14:59:52.464066207 +0200
d811e0
@@ -67,13 +67,13 @@
d811e0
 	if (bind(fd, sa, *len))
d811e0
 		perror_msg_and_skip("bind");
d811e0
 	printf("bind(%d" FMT_UNBOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, %u) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, %u) = 0\n",
d811e0
 	       fd, ARG_UNBOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (getsockname(fd, sa, len))
d811e0
 		perror_msg_and_fail("getsockname");
d811e0
 	printf("getsockname(%d" FMT_BOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, [%u]) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, [%u]) = 0\n",
d811e0
 	       fd, ARG_BOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (close(fd))
d811e0
Index: strace-5.7/tests-m32/netlink_protocol.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-m32/netlink_protocol.c	2018-12-30 16:35:21.000000000 +0100
d811e0
+++ strace-5.7/tests-m32/netlink_protocol.c	2020-09-09 14:59:52.524066242 +0200
d811e0
@@ -264,7 +264,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
+	       ", seq=%u, pid=%d}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,
d811e0
 	       nlh->nlmsg_len, sprintrc(rc));
d811e0
@@ -289,7 +289,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
+	       ", seq=%u, pid=%d}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
 	       ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,
d811e0
Index: strace-5.7/tests-mx32/bpf.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/bpf.c	2020-04-18 15:47:17.000000000 +0200
d811e0
+++ strace-5.7/tests-mx32/bpf.c	2020-09-09 14:59:52.261066086 +0200
d811e0
@@ -1289,16 +1289,16 @@
d811e0
 
d811e0
 static const struct bpf_attr_check BPF_TASK_FD_QUERY_checks[] = {
d811e0
 	{
d811e0
-		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 0xdeadbeef } },
d811e0
+		.data = { .BPF_TASK_FD_QUERY_data = { .pid = 1735928559 } },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, pid),
d811e0
-		.str = "task_fd_query={pid=3735928559, fd=0" FD0_PATH
d811e0
+		.str = "task_fd_query={pid=1735928559, fd=0" FD0_PATH
d811e0
 		       ", flags=0, buf_len=0, buf=NULL, prog_id=0"
d811e0
 		       ", fd_type=BPF_FD_TYPE_RAW_TRACEPOINT"
d811e0
 		       ", probe_offset=0, probe_addr=0}"
d811e0
 	},
d811e0
 	{ /* 1 */
d811e0
 		.data = { .BPF_TASK_FD_QUERY_data = {
d811e0
-			.pid = 0xcafef00d,
d811e0
+			.pid = 1405705229,
d811e0
 			.fd = 0xdeadbeef,
d811e0
 			.flags = 0xfacefeed,
d811e0
 			.buf_len = 0xdefaced,
d811e0
@@ -1309,7 +1309,7 @@
d811e0
 			.probe_addr = 0xfac5fed5fac7fed8
d811e0
 		} },
d811e0
 		.size = offsetofend(struct BPF_TASK_FD_QUERY_struct, probe_addr),
d811e0
-		.str = "task_fd_query={pid=3405705229"
d811e0
+		.str = "task_fd_query={pid=1405705229"
d811e0
 		       ", fd=-559038737"
d811e0
 		       ", flags=4207869677"
d811e0
 		       ", buf_len=233811181"
d811e0
Index: strace-5.7/tests-mx32/ioctl_block.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/ioctl_block.c	2019-07-24 19:12:18.000000000 +0200
d811e0
+++ strace-5.7/tests-mx32/ioctl_block.c	2020-09-09 14:59:52.319066120 +0200
d811e0
@@ -165,7 +165,7 @@
d811e0
 
d811e0
 	ioctl(-1, BLKTRACESETUP, buts);
d811e0
 	printf("ioctl(-1, BLKTRACESETUP, {act_mask=%hu, buf_size=%u, buf_nr=%u"
d811e0
-	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%u})"
d811e0
+	       ", start_lba=%" PRI__u64 ", end_lba=%" PRI__u64 ", pid=%d})"
d811e0
 	       " = -1 EBADF (%m)\n",
d811e0
 	       buts->act_mask, buts->buf_size, buts->buf_nr,
d811e0
 	       buts->start_lba, buts->end_lba, buts->pid);
d811e0
Index: strace-5.7/tests-mx32/ipc_msg.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/ipc_msg.c	2019-09-25 03:02:03.000000000 +0200
d811e0
+++ strace-5.7/tests-mx32/ipc_msg.c	2020-09-09 14:59:52.377066155 +0200
d811e0
@@ -128,15 +128,15 @@
d811e0
 	printf("msgctl\\(%d, (%s\\|)?%s, \\{msg_perm=\\{uid=%u"
d811e0
 	       ", gid=%u, mode=%#o, key=%u, cuid=%u, cgid=%u\\}, msg_stime=%u"
d811e0
 	       ", msg_rtime=%u, msg_ctime=%u, msg_qnum=%u, msg_qbytes=%u"
d811e0
-	       ", msg_lspid=%u, msg_lrpid=%u\\}\\) = 0\n",
d811e0
+	       ", msg_lspid=%d, msg_lrpid=%d\\}\\) = 0\n",
d811e0
 	       id, str_ipc_64, str_ipc_stat,
d811e0
 	       (unsigned) ds.msg_perm.uid, (unsigned) ds.msg_perm.gid,
d811e0
 	       (unsigned) ds.msg_perm.mode, (unsigned) ds.msg_perm.__key,
d811e0
 	       (unsigned) ds.msg_perm.cuid, (unsigned) ds.msg_perm.cgid,
d811e0
 	       (unsigned) ds.msg_stime, (unsigned) ds.msg_rtime,
d811e0
 	       (unsigned) ds.msg_ctime, (unsigned) ds.msg_qnum,
d811e0
-	       (unsigned) ds.msg_qbytes, (unsigned) ds.msg_lspid,
d811e0
-	       (unsigned) ds.msg_lrpid);
d811e0
+	       (unsigned) ds.msg_qbytes, (int) ds.msg_lspid,
d811e0
+	       (int) ds.msg_lrpid);
d811e0
 
d811e0
 	if (msgctl(id, IPC_SET, &ds))
d811e0
 		perror_msg_and_skip("msgctl IPC_SET");
d811e0
Index: strace-5.7/tests-mx32/ipc_shm.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/ipc_shm.c	2019-11-28 20:30:05.000000000 +0100
d811e0
+++ strace-5.7/tests-mx32/ipc_shm.c	2020-09-09 14:59:52.435066189 +0200
d811e0
@@ -168,15 +168,15 @@
d811e0
 	if (shmctl(id, IPC_STAT, &ds))
d811e0
 		perror_msg_and_skip("shmctl IPC_STAT");
d811e0
 	printf("shmctl\\(%d, (%s\\|)?%s, \\{shm_perm=\\{uid=%u, gid=%u, "
d811e0
-		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%u, "
d811e0
-		"shm_lpid=%u, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
+		"mode=%#o, key=%u, cuid=%u, cgid=%u\\}, shm_segsz=%u, shm_cpid=%d, "
d811e0
+		"shm_lpid=%d, shm_nattch=%u, shm_atime=%u, shm_dtime=%u, "
d811e0
 		"shm_ctime=%u\\}\\) = 0\n",
d811e0
 		id, str_ipc_64, str_ipc_stat,
d811e0
 		(unsigned) ds.shm_perm.uid, (unsigned) ds.shm_perm.gid,
d811e0
 		(unsigned) ds.shm_perm.mode, (unsigned) ds.shm_perm.__key,
d811e0
 		(unsigned) ds.shm_perm.cuid, (unsigned) ds.shm_perm.cgid,
d811e0
-		(unsigned) ds.shm_segsz, (unsigned) ds.shm_cpid,
d811e0
-		(unsigned) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
+		(unsigned) ds.shm_segsz, (int) ds.shm_cpid,
d811e0
+		(int) ds.shm_lpid, (unsigned) ds.shm_nattch,
d811e0
 		(unsigned) ds.shm_atime, (unsigned) ds.shm_dtime,
d811e0
 		(unsigned) ds. shm_ctime);
d811e0
 
d811e0
Index: strace-5.7/tests-mx32/net-yy-netlink.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/net-yy-netlink.c	2020-04-04 00:58:26.000000000 +0200
d811e0
+++ strace-5.7/tests-mx32/net-yy-netlink.c	2020-09-09 14:59:52.494066225 +0200
d811e0
@@ -67,13 +67,13 @@
d811e0
 	if (bind(fd, sa, *len))
d811e0
 		perror_msg_and_skip("bind");
d811e0
 	printf("bind(%d" FMT_UNBOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, %u) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, %u) = 0\n",
d811e0
 	       fd, ARG_UNBOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (getsockname(fd, sa, len))
d811e0
 		perror_msg_and_fail("getsockname");
d811e0
 	printf("getsockname(%d" FMT_BOUND ", {sa_family=AF_NETLINK"
d811e0
-	       ", nl_pid=%u, nl_groups=00000000}, [%u]) = 0\n",
d811e0
+	       ", nl_pid=%d, nl_groups=00000000}, [%u]) = 0\n",
d811e0
 	       fd, ARG_BOUND, addr.nl_pid, (unsigned) *len);
d811e0
 
d811e0
 	if (close(fd))
d811e0
Index: strace-5.7/tests-mx32/netlink_protocol.c
d811e0
===================================================================
d811e0
--- strace-5.7.orig/tests-mx32/netlink_protocol.c	2018-12-30 16:35:21.000000000 +0100
d811e0
+++ strace-5.7/tests-mx32/netlink_protocol.c	2020-09-09 14:59:52.553066260 +0200
d811e0
@@ -264,7 +264,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
+	       ", seq=%u, pid=%d}}}, %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,
d811e0
 	       nlh->nlmsg_len, sprintrc(rc));
d811e0
@@ -289,7 +289,7 @@
d811e0
 	printf("sendto(%d, {{len=%u, type=NLMSG_ERROR, flags=NLM_F_REQUEST"
d811e0
 	       ", seq=0, pid=0}, {error=-EACCES"
d811e0
 	       ", msg={{len=%u, type=NLMSG_NOOP, flags=NLM_F_REQUEST|0x%x"
d811e0
-	       ", seq=%u, pid=%u}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
+	       ", seq=%u, pid=%d}, \"\\x61\\x62\\x63\\x64\"}}}"
d811e0
 	       ", %u, MSG_DONTWAIT, NULL, 0) = %s\n",
d811e0
 	       fd, nlh->nlmsg_len, err->msg.nlmsg_len, NLM_F_DUMP,
d811e0
 	       err->msg.nlmsg_seq, err->msg.nlmsg_pid,