Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3fe26fa3
Commit
3fe26fa3
authored
Nov 12, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: get rid of pt_regs argument in sigreturn variants
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
b3af11af
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
55 deletions
+23
-55
arch/x86/ia32/ia32_signal.c
arch/x86/ia32/ia32_signal.c
+4
-2
arch/x86/ia32/ia32entry.S
arch/x86/ia32/ia32entry.S
+5
-6
arch/x86/include/asm/sys_ia32.h
arch/x86/include/asm/sys_ia32.h
+2
-2
arch/x86/include/asm/syscalls.h
arch/x86/include/asm/syscalls.h
+2
-2
arch/x86/kernel/entry_32.S
arch/x86/kernel/entry_32.S
+0
-23
arch/x86/kernel/entry_64.S
arch/x86/kernel/entry_64.S
+0
-2
arch/x86/kernel/signal.c
arch/x86/kernel/signal.c
+6
-3
arch/x86/syscalls/syscall_32.tbl
arch/x86/syscalls/syscall_32.tbl
+2
-2
arch/x86/um/signal.c
arch/x86/um/signal.c
+2
-13
No files found.
arch/x86/ia32/ia32_signal.c
View file @
3fe26fa3
...
...
@@ -215,8 +215,9 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
return
err
;
}
asmlinkage
long
sys32_sigreturn
(
struct
pt_regs
*
regs
)
asmlinkage
long
sys32_sigreturn
(
void
)
{
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
sigframe_ia32
__user
*
frame
=
(
struct
sigframe_ia32
__user
*
)(
regs
->
sp
-
8
);
sigset_t
set
;
unsigned
int
ax
;
...
...
@@ -241,8 +242,9 @@ asmlinkage long sys32_sigreturn(struct pt_regs *regs)
return
0
;
}
asmlinkage
long
sys32_rt_sigreturn
(
struct
pt_regs
*
regs
)
asmlinkage
long
sys32_rt_sigreturn
(
void
)
{
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
rt_sigframe_ia32
__user
*
frame
;
sigset_t
set
;
unsigned
int
ax
;
...
...
arch/x86/ia32/ia32entry.S
View file @
3fe26fa3
...
...
@@ -456,17 +456,16 @@ ia32_badsys:
ALIGN
GLOBAL
(\
label
)
leaq
\
func
(%
rip
),%
rax
leaq
-
ARGOFFSET
+
8
(%
rsp
),
\
arg
/*
8
for
return
address
*/
jmp
ia32_ptregs_common
.
endm
CFI_STARTPROC32
PTREGSCALL
stub32_rt_sigreturn
,
sys32_rt_sigreturn
,
%
rdi
PTREGSCALL
stub32_sigreturn
,
sys32_sigreturn
,
%
rdi
PTREGSCALL
stub32_execve
,
compat_sys_execve
,
%
rcx
PTREGSCALL
stub32_fork
,
sys_fork
,
%
rdi
PTREGSCALL
stub32_vfork
,
sys_vfork
,
%
rdi
PTREGSCALL
stub32_rt_sigreturn
,
sys32_rt_sigreturn
PTREGSCALL
stub32_sigreturn
,
sys32_sigreturn
PTREGSCALL
stub32_execve
,
compat_sys_execve
PTREGSCALL
stub32_fork
,
sys_fork
PTREGSCALL
stub32_vfork
,
sys_vfork
ALIGN
GLOBAL
(
stub32_clone
)
...
...
arch/x86/include/asm/sys_ia32.h
View file @
3fe26fa3
...
...
@@ -69,8 +69,8 @@ asmlinkage long sys32_fallocate(int, int, unsigned,
/* ia32/ia32_signal.c */
asmlinkage
long
sys32_sigsuspend
(
int
,
int
,
old_sigset_t
);
asmlinkage
long
sys32_sigreturn
(
struct
pt_regs
*
);
asmlinkage
long
sys32_rt_sigreturn
(
struct
pt_regs
*
);
asmlinkage
long
sys32_sigreturn
(
void
);
asmlinkage
long
sys32_rt_sigreturn
(
void
);
/* ia32/ipc32.c */
asmlinkage
long
sys32_ipc
(
u32
,
int
,
int
,
int
,
compat_uptr_t
,
u32
);
...
...
arch/x86/include/asm/syscalls.h
View file @
3fe26fa3
...
...
@@ -24,7 +24,7 @@ asmlinkage long sys_iopl(unsigned int);
asmlinkage
int
sys_modify_ldt
(
int
,
void
__user
*
,
unsigned
long
);
/* kernel/signal.c */
long
sys_rt_sigreturn
(
struct
pt_regs
*
);
long
sys_rt_sigreturn
(
void
);
/* kernel/tls.c */
asmlinkage
int
sys_set_thread_area
(
struct
user_desc
__user
*
);
...
...
@@ -37,7 +37,7 @@ asmlinkage int sys_get_thread_area(struct user_desc __user *);
asmlinkage
int
sys_sigsuspend
(
int
,
int
,
old_sigset_t
);
asmlinkage
int
sys_sigaction
(
int
,
const
struct
old_sigaction
__user
*
,
struct
old_sigaction
__user
*
);
unsigned
long
sys_sigreturn
(
struct
pt_regs
*
);
unsigned
long
sys_sigreturn
(
void
);
/* kernel/vm86_32.c */
int
sys_vm86old
(
struct
vm86_struct
__user
*
,
struct
pt_regs
*
);
...
...
arch/x86/kernel/entry_32.S
View file @
3fe26fa3
...
...
@@ -702,12 +702,6 @@ END(syscall_badsys)
/*
*
System
calls
that
need
a
pt_regs
pointer
.
*/
#define PTREGSCALL0(name) \
ENTRY
(
ptregs_
##
name
)
; \
leal
4
(%
esp
),%
eax
; \
jmp
sys_
##
name
; \
ENDPROC
(
ptregs_
##
name
)
#define PTREGSCALL1(name) \
ENTRY
(
ptregs_
##
name
)
; \
leal
4
(%
esp
),%
edx
; \
...
...
@@ -723,23 +717,6 @@ ENTRY(ptregs_##name) ; \
jmp
sys_
##
name
; \
ENDPROC
(
ptregs_
##
name
)
#define PTREGSCALL3(name) \
ENTRY
(
ptregs_
##
name
)
; \
CFI_STARTPROC
; \
leal
4
(%
esp
),%
eax
; \
pushl_cfi
%
eax
; \
movl
PT_EDX
(%
eax
),%
ecx
; \
movl
PT_ECX
(%
eax
),%
edx
; \
movl
PT_EBX
(%
eax
),%
eax
; \
call
sys_
##
name
; \
addl
$
4
,%
esp
; \
CFI_ADJUST_CFA_OFFSET
-
4
; \
ret
; \
CFI_ENDPROC
; \
ENDPROC
(
ptregs_
##
name
)
PTREGSCALL0
(
sigreturn
)
PTREGSCALL0
(
rt_sigreturn
)
PTREGSCALL2
(
vm86
)
PTREGSCALL1
(
vm86old
)
...
...
arch/x86/kernel/entry_64.S
View file @
3fe26fa3
...
...
@@ -896,7 +896,6 @@ ENTRY(stub_rt_sigreturn)
addq
$
8
,
%
rsp
PARTIAL_FRAME
0
SAVE_REST
movq
%
rsp
,%
rdi
FIXUP_TOP_OF_STACK
%
r11
call
sys_rt_sigreturn
movq
%
rax
,
RAX
(%
rsp
)
#
fixme
,
this
could
be
done
at
the
higher
layer
...
...
@@ -911,7 +910,6 @@ ENTRY(stub_x32_rt_sigreturn)
addq
$
8
,
%
rsp
PARTIAL_FRAME
0
SAVE_REST
movq
%
rsp
,%
rdi
FIXUP_TOP_OF_STACK
%
r11
call
sys32_x32_rt_sigreturn
movq
%
rax
,
RAX
(%
rsp
)
#
fixme
,
this
could
be
done
at
the
higher
layer
...
...
arch/x86/kernel/signal.c
View file @
3fe26fa3
...
...
@@ -597,8 +597,9 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
* Do a signal return; undo the signal stack.
*/
#ifdef CONFIG_X86_32
unsigned
long
sys_sigreturn
(
struct
pt_regs
*
regs
)
unsigned
long
sys_sigreturn
(
void
)
{
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
sigframe
__user
*
frame
;
unsigned
long
ax
;
sigset_t
set
;
...
...
@@ -625,8 +626,9 @@ unsigned long sys_sigreturn(struct pt_regs *regs)
}
#endif
/* CONFIG_X86_32 */
long
sys_rt_sigreturn
(
struct
pt_regs
*
regs
)
long
sys_rt_sigreturn
(
void
)
{
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
rt_sigframe
__user
*
frame
;
unsigned
long
ax
;
sigset_t
set
;
...
...
@@ -843,8 +845,9 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where)
}
#ifdef CONFIG_X86_X32_ABI
asmlinkage
long
sys32_x32_rt_sigreturn
(
struct
pt_regs
*
regs
)
asmlinkage
long
sys32_x32_rt_sigreturn
(
void
)
{
struct
pt_regs
*
regs
=
current_pt_regs
();
struct
rt_sigframe_x32
__user
*
frame
;
sigset_t
set
;
unsigned
long
ax
;
...
...
arch/x86/syscalls/syscall_32.tbl
View file @
3fe26fa3
...
...
@@ -125,7 +125,7 @@
116 i386 sysinfo sys_sysinfo compat_sys_sysinfo
117 i386 ipc sys_ipc sys32_ipc
118 i386 fsync sys_fsync
119 i386 sigreturn
ptregs_sigreturn
stub32_sigreturn
119 i386 sigreturn
sys_sigreturn
stub32_sigreturn
120 i386 clone sys_clone stub32_clone
121 i386 setdomainname sys_setdomainname
122 i386 uname sys_newuname
...
...
@@ -179,7 +179,7 @@
170 i386 setresgid sys_setresgid16
171 i386 getresgid sys_getresgid16
172 i386 prctl sys_prctl
173 i386 rt_sigreturn
ptreg
s_rt_sigreturn stub32_rt_sigreturn
173 i386 rt_sigreturn
sy
s_rt_sigreturn stub32_rt_sigreturn
174 i386 rt_sigaction sys_rt_sigaction sys32_rt_sigaction
175 i386 rt_sigprocmask sys_rt_sigprocmask
176 i386 rt_sigpending sys_rt_sigpending sys32_rt_sigpending
...
...
arch/x86/um/signal.c
View file @
3fe26fa3
...
...
@@ -464,7 +464,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
return
0
;
}
long
sys_sigreturn
(
struct
pt_regs
*
regs
)
long
sys_sigreturn
(
void
)
{
unsigned
long
sp
=
PT_REGS_SP
(
&
current
->
thread
.
regs
);
struct
sigframe
__user
*
frame
=
(
struct
sigframe
__user
*
)(
sp
-
8
);
...
...
@@ -577,7 +577,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,
}
#endif
long
sys_rt_sigreturn
(
struct
pt_regs
*
regs
)
long
sys_rt_sigreturn
(
void
)
{
unsigned
long
sp
=
PT_REGS_SP
(
&
current
->
thread
.
regs
);
struct
rt_sigframe
__user
*
frame
=
...
...
@@ -601,14 +601,3 @@ long sys_rt_sigreturn(struct pt_regs *regs)
force_sig
(
SIGSEGV
,
current
);
return
0
;
}
#ifdef CONFIG_X86_32
long
ptregs_sigreturn
(
void
)
{
return
sys_sigreturn
(
NULL
);
}
long
ptregs_rt_sigreturn
(
void
)
{
return
sys_rt_sigreturn
(
NULL
);
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment