signal_32.c (e532c37858fdcc18e9a91d24c2e22cd21aa22561) signal_32.c (a7f290dad32ee34d931561b7943c858fe2aae503)
1/*
2 * Signal handling for 32bit PPC and 32bit tasks on 64bit PPC
3 *
4 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Copyright (C) 2001 IBM
7 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)

--- 29 unchanged lines hidden (view full) ---

38#include <linux/tty.h>
39#include <linux/binfmts.h>
40#include <linux/suspend.h>
41#endif
42
43#include <asm/uaccess.h>
44#include <asm/cacheflush.h>
45#include <asm/sigcontext.h>
1/*
2 * Signal handling for 32bit PPC and 32bit tasks on 64bit PPC
3 *
4 * PowerPC version
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Copyright (C) 2001 IBM
7 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)

--- 29 unchanged lines hidden (view full) ---

38#include <linux/tty.h>
39#include <linux/binfmts.h>
40#include <linux/suspend.h>
41#endif
42
43#include <asm/uaccess.h>
44#include <asm/cacheflush.h>
45#include <asm/sigcontext.h>
46#include <asm/vdso.h>
46#ifdef CONFIG_PPC64
47#include "ppc32.h"
48#include <asm/unistd.h>
47#ifdef CONFIG_PPC64
48#include "ppc32.h"
49#include <asm/unistd.h>
49#include <asm/vdso.h>
50#else
51#include <asm/ucontext.h>
52#include <asm/pgtable.h>
53#endif
54
55#undef DEBUG_SIG
56
57#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

--- 746 unchanged lines hidden (view full) ---

804 || __put_user(current->sas_ss_size, &rt_sf->uc.uc_stack.ss_size)
805 || __put_user(to_user_ptr(&rt_sf->uc.uc_mcontext),
806 &rt_sf->uc.uc_regs)
807 || put_sigset_t(&rt_sf->uc.uc_sigmask, oldset))
808 goto badframe;
809
810 /* Save user registers on the stack */
811 frame = &rt_sf->uc.uc_mcontext;
50#else
51#include <asm/ucontext.h>
52#include <asm/pgtable.h>
53#endif
54
55#undef DEBUG_SIG
56
57#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

--- 746 unchanged lines hidden (view full) ---

804 || __put_user(current->sas_ss_size, &rt_sf->uc.uc_stack.ss_size)
805 || __put_user(to_user_ptr(&rt_sf->uc.uc_mcontext),
806 &rt_sf->uc.uc_regs)
807 || put_sigset_t(&rt_sf->uc.uc_sigmask, oldset))
808 goto badframe;
809
810 /* Save user registers on the stack */
811 frame = &rt_sf->uc.uc_mcontext;
812#ifdef CONFIG_PPC64
813 if (vdso32_rt_sigtramp && current->thread.vdso_base) {
814 if (save_user_regs(regs, frame, 0))
815 goto badframe;
816 regs->link = current->thread.vdso_base + vdso32_rt_sigtramp;
812 if (vdso32_rt_sigtramp && current->thread.vdso_base) {
813 if (save_user_regs(regs, frame, 0))
814 goto badframe;
815 regs->link = current->thread.vdso_base + vdso32_rt_sigtramp;
817 } else
818#endif
819 {
816 } else {
820 if (save_user_regs(regs, frame, __NR_rt_sigreturn))
821 goto badframe;
822 regs->link = (unsigned long) frame->tramp;
823 }
824 if (put_user(regs->gpr[1], (u32 __user *)newsp))
825 goto badframe;
826 regs->gpr[1] = newsp;
827 regs->gpr[3] = sig;

--- 257 unchanged lines hidden (view full) ---

1085 || __put_user((oldset->sig[0] >> 32), &sc->_unused[3])
1086#else
1087 || __put_user(oldset->sig[1], &sc->_unused[3])
1088#endif
1089 || __put_user(to_user_ptr(frame), &sc->regs)
1090 || __put_user(sig, &sc->signal))
1091 goto badframe;
1092
817 if (save_user_regs(regs, frame, __NR_rt_sigreturn))
818 goto badframe;
819 regs->link = (unsigned long) frame->tramp;
820 }
821 if (put_user(regs->gpr[1], (u32 __user *)newsp))
822 goto badframe;
823 regs->gpr[1] = newsp;
824 regs->gpr[3] = sig;

--- 257 unchanged lines hidden (view full) ---

1082 || __put_user((oldset->sig[0] >> 32), &sc->_unused[3])
1083#else
1084 || __put_user(oldset->sig[1], &sc->_unused[3])
1085#endif
1086 || __put_user(to_user_ptr(frame), &sc->regs)
1087 || __put_user(sig, &sc->signal))
1088 goto badframe;
1089
1093#ifdef CONFIG_PPC64
1094 if (vdso32_sigtramp && current->thread.vdso_base) {
1095 if (save_user_regs(regs, &frame->mctx, 0))
1096 goto badframe;
1097 regs->link = current->thread.vdso_base + vdso32_sigtramp;
1090 if (vdso32_sigtramp && current->thread.vdso_base) {
1091 if (save_user_regs(regs, &frame->mctx, 0))
1092 goto badframe;
1093 regs->link = current->thread.vdso_base + vdso32_sigtramp;
1098 } else
1099#endif
1100 {
1094 } else {
1101 if (save_user_regs(regs, &frame->mctx, __NR_sigreturn))
1102 goto badframe;
1103 regs->link = (unsigned long) frame->mctx.tramp;
1104 }
1105
1106 if (put_user(regs->gpr[1], (u32 __user *)newsp))
1107 goto badframe;
1108 regs->gpr[1] = newsp;

--- 161 unchanged lines hidden ---
1095 if (save_user_regs(regs, &frame->mctx, __NR_sigreturn))
1096 goto badframe;
1097 regs->link = (unsigned long) frame->mctx.tramp;
1098 }
1099
1100 if (put_user(regs->gpr[1], (u32 __user *)newsp))
1101 goto badframe;
1102 regs->gpr[1] = newsp;

--- 161 unchanged lines hidden ---