Commit 85850b21 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] compat_sys_sigpending and compat_sys_sigprocmask

Here is the s390x patch to use the new generic compatibility functions.
parent 851f8c30
...@@ -464,7 +464,7 @@ sys_call_table: ...@@ -464,7 +464,7 @@ sys_call_table:
.long SYSCALL(sys_ni_syscall,sys32_setreuid16_wrapper) /* old setreuid16 syscall */ .long SYSCALL(sys_ni_syscall,sys32_setreuid16_wrapper) /* old setreuid16 syscall */
.long SYSCALL(sys_ni_syscall,sys32_setregid16_wrapper) /* old setregid16 syscall */ .long SYSCALL(sys_ni_syscall,sys32_setregid16_wrapper) /* old setregid16 syscall */
.long SYSCALL(sys_sigsuspend_glue,sys32_sigsuspend_glue) .long SYSCALL(sys_sigsuspend_glue,sys32_sigsuspend_glue)
.long SYSCALL(sys_sigpending,sys32_sigpending_wrapper) .long SYSCALL(sys_sigpending,compat_sys_sigpending_wrapper)
.long SYSCALL(sys_sethostname,sys32_sethostname_wrapper) .long SYSCALL(sys_sethostname,sys32_sethostname_wrapper)
.long SYSCALL(sys_setrlimit,sys32_setrlimit_wrapper) /* 75 */ .long SYSCALL(sys_setrlimit,sys32_setrlimit_wrapper) /* 75 */
.long SYSCALL(sys_getrlimit,sys32_old_getrlimit_wrapper) .long SYSCALL(sys_getrlimit,sys32_old_getrlimit_wrapper)
...@@ -517,7 +517,7 @@ sys_call_table: ...@@ -517,7 +517,7 @@ sys_call_table:
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* modify_ldt for i386 */ .long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* modify_ldt for i386 */
.long SYSCALL(sys_adjtimex,sys32_adjtimex_wrapper) .long SYSCALL(sys_adjtimex,sys32_adjtimex_wrapper)
.long SYSCALL(sys_mprotect,sys32_mprotect_wrapper) /* 125 */ .long SYSCALL(sys_mprotect,sys32_mprotect_wrapper) /* 125 */
.long SYSCALL(sys_sigprocmask,sys32_sigprocmask_wrapper) .long SYSCALL(sys_sigprocmask,compat_sys_sigprocmask_wrapper)
.long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old "create module" */ .long SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old "create module" */
.long SYSCALL(sys_init_module,sys32_init_module_wrapper) .long SYSCALL(sys_init_module,sys32_init_module_wrapper)
.long SYSCALL(sys_delete_module,sys32_delete_module_wrapper) .long SYSCALL(sys_delete_module,sys32_delete_module_wrapper)
......
...@@ -1621,23 +1621,6 @@ asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid, ...@@ -1621,23 +1621,6 @@ asmlinkage int sys32_sched_rr_get_interval(compat_pid_t pid,
return ret; return ret;
} }
extern asmlinkage int sys_sigprocmask(int how, old_sigset_t *set, old_sigset_t *oset);
asmlinkage int sys32_sigprocmask(int how, compat_old_sigset_t *set, compat_old_sigset_t *oset)
{
old_sigset_t s;
int ret;
mm_segment_t old_fs = get_fs();
if (set && get_user (s, set)) return -EFAULT;
set_fs (KERNEL_DS);
ret = sys_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL);
set_fs (old_fs);
if (ret) return ret;
if (oset && put_user (s, oset)) return -EFAULT;
return 0;
}
extern asmlinkage int sys_rt_sigprocmask(int how, sigset_t *set, sigset_t *oset, size_t sigsetsize); extern asmlinkage int sys_rt_sigprocmask(int how, sigset_t *set, sigset_t *oset, size_t sigsetsize);
asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, compat_sigset_t *oset, compat_size_t sigsetsize) asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, compat_sigset_t *oset, compat_size_t sigsetsize)
...@@ -1674,21 +1657,6 @@ asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, compat_sigset ...@@ -1674,21 +1657,6 @@ asmlinkage int sys32_rt_sigprocmask(int how, compat_sigset_t *set, compat_sigset
return 0; return 0;
} }
extern asmlinkage int sys_sigpending(old_sigset_t *set);
asmlinkage int sys32_sigpending(compat_old_sigset_t *set)
{
old_sigset_t s;
int ret;
mm_segment_t old_fs = get_fs();
set_fs (KERNEL_DS);
ret = sys_sigpending(&s);
set_fs (old_fs);
if (put_user (s, set)) return -EFAULT;
return ret;
}
extern asmlinkage int sys_rt_sigpending(sigset_t *set, size_t sigsetsize); extern asmlinkage int sys_rt_sigpending(sigset_t *set, size_t sigsetsize);
asmlinkage int sys32_rt_sigpending(compat_sigset_t *set, compat_size_t sigsetsize) asmlinkage int sys32_rt_sigpending(compat_sigset_t *set, compat_size_t sigsetsize)
......
...@@ -288,10 +288,10 @@ sys32_setregid16_wrapper: ...@@ -288,10 +288,10 @@ sys32_setregid16_wrapper:
#sys32_sigsuspend_wrapper # done in sigsuspend_glue #sys32_sigsuspend_wrapper # done in sigsuspend_glue
.globl sys32_sigpending_wrapper .globl compat_sys_sigpending_wrapper
sys32_sigpending_wrapper: compat_sys_sigpending_wrapper:
llgtr %r2,%r2 # old_sigset_emu31_t * llgtr %r2,%r2 # compat_old_sigset_t *
jg sys32_sigpending # branch to system call jg compat_sys_sigpending # branch to system call
.globl sys32_sethostname_wrapper .globl sys32_sethostname_wrapper
sys32_sethostname_wrapper: sys32_sethostname_wrapper:
...@@ -557,12 +557,12 @@ sys32_mprotect_wrapper: ...@@ -557,12 +557,12 @@ sys32_mprotect_wrapper:
llgfr %r4,%r4 # unsigned long llgfr %r4,%r4 # unsigned long
jg sys_mprotect # branch to system call jg sys_mprotect # branch to system call
.globl sys32_sigprocmask_wrapper .globl compat_sys_sigprocmask_wrapper
sys32_sigprocmask_wrapper: compat_sys_sigprocmask_wrapper:
lgfr %r2,%r2 # int lgfr %r2,%r2 # int
llgtr %r3,%r3 # old_sigset_emu31 * llgtr %r3,%r3 # compat_old_sigset_t *
llgtr %r4,%r4 # old_sigset_emu31 * llgtr %r4,%r4 # compat_old_sigset_t *
jg sys32_sigprocmask # branch to system call jg compat_sys_sigprocmask # branch to system call
.globl sys32_init_module_wrapper .globl sys32_init_module_wrapper
sys32_init_module_wrapper: sys32_init_module_wrapper:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment