summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-03-13 01:58:39 +0000
committerDmitry V. Levin <ldv@altlinux.org>2017-03-13 15:22:51 +0000
commit8e1ebd868f23ca8d8419b38b4724308fc209fff0 (patch)
treee6b1902c1f68d1b72934c050128e5b711d6d1856
parenta3d941a86387e88809e2bf766560178c0a632515 (diff)
downloadstrace-8e1ebd868f23ca8d8419b38b4724308fc209fff0.tar.gz
ia64, mips, x86_64: remove no longer used parsers of sigreturn syscalls
As there is no sigreturn syscall on ia64, mips n32, mips n64, x32, and x86_64, no longer used parsers could be safely removed. * linux/ia64/arch_sigreturn.c: Remove. * Makefile.am (EXTRA_DIST): Remove it. * linux/mips/arch_sigreturn.c (arch_sigreturn): Remove [!LINUX_MIPSO32]. * linux/x86_64/arch_sigreturn.c (arch_sigreturn): Remove.
-rw-r--r--Makefile.am1
-rw-r--r--linux/ia64/arch_sigreturn.c12
-rw-r--r--linux/mips/arch_sigreturn.c15
-rw-r--r--linux/x86_64/arch_sigreturn.c32
4 files changed, 4 insertions, 56 deletions
diff --git a/Makefile.am b/Makefile.am
index 61aa7ea00..c77f463f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -462,7 +462,6 @@ EXTRA_DIST = \
linux/ia64/arch_regs.c \
linux/ia64/arch_regs.h \
linux/ia64/arch_rt_sigframe.c \
- linux/ia64/arch_sigreturn.c \
linux/ia64/get_error.c \
linux/ia64/get_scno.c \
linux/ia64/get_syscall_args.c \
diff --git a/linux/ia64/arch_sigreturn.c b/linux/ia64/arch_sigreturn.c
deleted file mode 100644
index 32f9bc588..000000000
--- a/linux/ia64/arch_sigreturn.c
+++ /dev/null
@@ -1,12 +0,0 @@
-static void
-arch_sigreturn(struct tcb *tcp)
-{
- /* offsetof(struct sigframe, sc) */
-#define OFFSETOF_STRUCT_SIGFRAME_SC 0xA0
- const unsigned long addr = *ia64_frame_ptr + 16 +
- OFFSETOF_STRUCT_SIGFRAME_SC +
- offsetof(struct sigcontext, sc_mask);
- tprints("{mask=");
- print_sigset_addr(tcp, addr);
- tprints("}");
-}
diff --git a/linux/mips/arch_sigreturn.c b/linux/mips/arch_sigreturn.c
index 8ce460965..522b73152 100644
--- a/linux/mips/arch_sigreturn.c
+++ b/linux/mips/arch_sigreturn.c
@@ -1,26 +1,17 @@
static void
arch_sigreturn(struct tcb *tcp)
{
-#if defined LINUX_MIPSO32
+ /* 64-bit ABIs do not have old sigreturn. */
+#ifdef LINUX_MIPSO32
/*
* offsetof(struct sigframe, sf_mask) ==
* sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct sigcontext)
*/
const kernel_ulong_t addr = mips_REG_SP + 6 * 4 +
sizeof(struct sigcontext);
-#else
- /*
- * This decodes rt_sigreturn.
- * The 64-bit ABIs do not have sigreturn.
- *
- * offsetof(struct rt_sigframe, rs_uc) ==
- * sizeof(sf_ass) + sizeof(sf_pad) + sizeof(struct siginfo)
- */
- const kernel_ulong_t addr = mips_REG_SP + 6 * 4 + 128 +
- offsetof(struct ucontext, uc_sigmask);
-#endif
tprints("{mask=");
print_sigset_addr(tcp, addr);
tprints("}");
+#endif
}
diff --git a/linux/x86_64/arch_sigreturn.c b/linux/x86_64/arch_sigreturn.c
index 16cadc2ca..9f4f0d879 100644
--- a/linux/x86_64/arch_sigreturn.c
+++ b/linux/x86_64/arch_sigreturn.c
@@ -1,32 +1,2 @@
-#define arch_sigreturn i386_arch_sigreturn
+/* Only x86 personality has old sigreturn syscall. */
#include "i386/arch_sigreturn.c"
-#undef arch_sigreturn
-
-static void
-arch_sigreturn(struct tcb *tcp)
-{
- if (current_personality == 1) {
- i386_arch_sigreturn(tcp);
- return;
- }
-
- typedef struct {
- uint32_t flags, link, stack[3], pad;
- struct sigcontext mcontext;
- } ucontext_x32_header;
-
-#define X86_64_SIGMASK_OFFSET offsetof(struct ucontext, uc_sigmask)
-#define X32_SIGMASK_OFFSET sizeof(ucontext_x32_header)
-
- const kernel_ulong_t offset =
-#ifdef X32
- X32_SIGMASK_OFFSET;
-#else
- current_personality == 2 ? X32_SIGMASK_OFFSET :
- X86_64_SIGMASK_OFFSET;
-#endif
- const kernel_ulong_t addr = (kernel_ulong_t) *x86_64_rsp_ptr + offset;
- tprints("{mask=");
- print_sigset_addr(tcp, addr);
- tprints("}");
-}