]> granicus.if.org Git - strace/commitdiff
ia64, mips, x86_64: remove no longer used parsers of sigreturn syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 13 Mar 2017 01:58:39 +0000 (01:58 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 13 Mar 2017 15:22:51 +0000 (15:22 +0000)
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.

Makefile.am
linux/ia64/arch_sigreturn.c [deleted file]
linux/mips/arch_sigreturn.c
linux/x86_64/arch_sigreturn.c

index 61aa7ea00ce6fcc58d82767c204c75d364853536..c77f463f0450ac6ea1b44d9478dd0d535bbe0bd7 100644 (file)
@@ -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 (file)
index 32f9bc5..0000000
+++ /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("}");
-}
index 8ce4609652793e1c4bcb24187c58fd7467fed382..522b731522b56db2a04dee44e820ad92af58d203 100644 (file)
@@ -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
 }
index 16cadc2ca1f17e0b8e03302b3728a66576ff1b6f..9f4f0d879d5cf4227c2b625d71a0ede92c814cfa 100644 (file)
@@ -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("}");
-}