From 672ab4ed941782b55ee0094e63e9c5538c23630c Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Sat, 8 Oct 2016 10:46:52 +0100 Subject: [PATCH] pinktrace: update to 0.9.3. --- srcpkgs/pinktrace/patches/arm.patch | 125 ------------------------- srcpkgs/pinktrace/patches/kernel.patch | 11 --- srcpkgs/pinktrace/template | 4 +- 3 files changed, 2 insertions(+), 138 deletions(-) delete mode 100644 srcpkgs/pinktrace/patches/arm.patch delete mode 100644 srcpkgs/pinktrace/patches/kernel.patch diff --git a/srcpkgs/pinktrace/patches/arm.patch b/srcpkgs/pinktrace/patches/arm.patch deleted file mode 100644 index 84962c91a49..00000000000 --- a/srcpkgs/pinktrace/patches/arm.patch +++ /dev/null @@ -1,125 +0,0 @@ -From fe89eb08d1e70e31d6a9a71fc447d6fa1626b9cd Mon Sep 17 00:00:00 2001 -From: Marvin Schmidt -Date: Thu, 27 Aug 2015 16:02:42 +0000 -Subject: Update syscall table and fix shuffle_scno for ARM - -The shuffle_scno function was broken in commit 2ca0b96 due to the -removal of the ARM_LAST_ORDINARY_SYSCALL definition. - -This updates the syscall table and makes the shuffle_scno function -more readable analogue to the way it was changed in strace - -Change-Id: Id2c9bd196d2e1950f87e548bef5c28abcc305aad -Reviewed-on: https://galileo.mailstation.de/gerrit/3392 -Reviewed-by: Jenkins -Reviewed-by: Kylie McClain ---- - pinktrace/linux/arm/syscallent.h | 29 +++++++++++++++++++++++++++++ - pinktrace/name.c | 40 +++++++++++++++++++++------------------- - 2 files changed, 50 insertions(+), 19 deletions(-) - -diff --git pinktrace/linux/arm/syscallent.h pinktrace/linux/arm/syscallent.h -index a6315a4..545f8f5 100644 ---- pinktrace/linux/arm/syscallent.h -+++ pinktrace/linux/arm/syscallent.h -@@ -378,3 +378,32 @@ - "process_vm_writev", /* 377 */ - "kcmp", /* 378 */ - "finit_module", /* 379 */ -+ "sched_setattr", /* 380 */ -+ "sched_getattr", /* 381 */ -+ "renameat2", /* 382 */ -+ "seccomp", /* 383 */ -+ "getrandom", /* 384 */ -+ "memfd_create", /* 385 */ -+ "bpf", /* 386 */ -+ "execveat", /* 387 */ -+ -+#define ARM_FIRST_SHUFFLED_SYSCALL 388 -+ -+ /* __ARM_NR_cmpxchg (0x000ffff0). -+ * Remapped by shuffle_scno() to be directly after ordinary syscalls -+ * in this table. -+ */ -+ "cmpxchg", /* ARM_FIRST_SHUFFLED_SYSCALL */ -+ -+ /* ARM specific syscalls. Encoded with scno 0x000f00xx. -+ * Remapped by shuffle_scno() to be directly after __ARM_NR_cmpxchg. -+ */ -+ NULL, /* 0 */ -+ "breakpoint", /* 1 */ -+ "cacheflush", /* 2 */ -+ "usr26", /* 3 */ -+ "usr32", /* 4 */ -+ "set_tls" /* 5 */ -+ -+#define ARM_LAST_SPECIAL_SYSCALL 5 -+ -diff --git pinktrace/name.c pinktrace/name.c -index b3e3d13..df3461f 100644 ---- pinktrace/name.c -+++ pinktrace/name.c -@@ -247,39 +247,41 @@ static const struct xlat addrfams[] = { - { 0, NULL }, - }; - --/* Shuffle syscall numbers so that we don't have huge gaps in syscall table. -- * The shuffling should be reversible: shuffle_scno(shuffle_scno(n)) == n. -+/* -+ * Shuffle syscall numbers so that we don't have huge gaps in syscall table. -+ * The shuffling should be an involution: shuffle_scno(shuffle_scno(n)) == n. - */ --#if PINK_ARCH_ARM /* So far only ARM needs this */ --static long shuffle_scno(unsigned long scno) -+#if defined(ARM) || defined(AARCH64) /* So far only 32-bit ARM needs this */ -+static long -+shuffle_scno(unsigned long scno) - { -- if (scno <= ARM_LAST_ORDINARY_SYSCALL) -+ if (scno < ARM_FIRST_SHUFFLED_SYSCALL) - return scno; - - /* __ARM_NR_cmpxchg? Swap with LAST_ORDINARY+1 */ -- if (scno == 0x000ffff0) -- return ARM_LAST_ORDINARY_SYSCALL+1; -- if (scno == ARM_LAST_ORDINARY_SYSCALL+1) -+ if (scno == ARM_FIRST_SHUFFLED_SYSCALL) - return 0x000ffff0; -+ if (scno == 0x000ffff0) -+ return ARM_FIRST_SHUFFLED_SYSCALL; - -- /* Is it ARM specific syscall? -- * Swap with [LAST_ORDINARY+2, LAST_ORDINARY+2 + LAST_SPECIAL] range. -+#define ARM_SECOND_SHUFFLED_SYSCALL (ARM_FIRST_SHUFFLED_SYSCALL + 1) -+ /* -+ * Is it ARM specific syscall? -+ * Swap [0x000f0000, 0x000f0000 + LAST_SPECIAL] range -+ * with [SECOND_SHUFFLED, SECOND_SHUFFLED + LAST_SPECIAL] range. - */ -- if (scno >= 0x000f0000 -- && scno <= 0x000f0000 + ARM_LAST_SPECIAL_SYSCALL -- ) { -- return scno - 0x000f0000 + (ARM_LAST_ORDINARY_SYSCALL+2); -+ if (scno >= 0x000f0000 && -+ scno <= 0x000f0000 + ARM_LAST_SPECIAL_SYSCALL) { -+ return scno - 0x000f0000 + ARM_SECOND_SHUFFLED_SYSCALL; - } -- if (/* scno >= ARM_LAST_ORDINARY_SYSCALL+2 - always true */ 1 -- && scno <= (ARM_LAST_ORDINARY_SYSCALL+2) + ARM_LAST_SPECIAL_SYSCALL -- ) { -- return scno + 0x000f0000 - (ARM_LAST_ORDINARY_SYSCALL+2); -+ if (scno <= ARM_SECOND_SHUFFLED_SYSCALL + ARM_LAST_SPECIAL_SYSCALL) { -+ return scno + 0x000f0000 - ARM_SECOND_SHUFFLED_SYSCALL; - } - - return scno; - } - #else --# define shuffle_scno(scno) (long)(scno) -+# define shuffle_scno(scno) ((long)(scno)) - #endif - - PINK_GCC_ATTR((pure)) --- -cgit v0.11.2 - diff --git a/srcpkgs/pinktrace/patches/kernel.patch b/srcpkgs/pinktrace/patches/kernel.patch deleted file mode 100644 index 36a25afa455..00000000000 --- a/srcpkgs/pinktrace/patches/kernel.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.ac.old 2015-09-19 11:59:18.683048677 +0200 -+++ configure.ac 2015-09-19 12:00:18.407968543 +0200 -@@ -109,7 +109,7 @@ - AC_MSG_CHECKING([for supported kernel]) - kernel_version=`uname -r | cut -d'-' -f1` - case "$kernel_version" in -- 3.*|2.6*) -+ 4.*|3.*|2.6*) - AC_MSG_RESULT([$kernel_version]) - ;; - 2.5*) diff --git a/srcpkgs/pinktrace/template b/srcpkgs/pinktrace/template index 52fb3113b00..84a65e98f0e 100644 --- a/srcpkgs/pinktrace/template +++ b/srcpkgs/pinktrace/template @@ -1,6 +1,6 @@ # Template file for 'pinktrace' pkgname=pinktrace -version=0.9.2 +version=0.9.3 revision=1 wrksrc="$pkgname-1-$version" build_style=gnu-configure @@ -13,7 +13,7 @@ maintainer="Andrea Brancaleoni " license="MIT" homepage="http://dev.exherbo.org/~alip/pinktrace/" distfiles="http://git.exherbo.org/$pkgname-1.git/snapshot/$pkgname-1-$version.tar.gz" -checksum=bebc724e3006e5a0f2019cd6ee64c868c835e8a24e69f172397de3a017913f68 +checksum=260fba87c3c1d8a296295bab9ddaf9ff393f5c961ee7567f86fb5751d9f7a125 pre_configure() { ./autogen.sh