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
47669ab0
Commit
47669ab0
authored
Dec 23, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tile: switch to generic sigaltstack
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
0aa0203f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
63 deletions
+5
-63
arch/tile/Kconfig
arch/tile/Kconfig
+1
-0
arch/tile/include/asm/compat.h
arch/tile/include/asm/compat.h
+0
-2
arch/tile/include/asm/syscalls.h
arch/tile/include/asm/syscalls.h
+0
-2
arch/tile/kernel/compat_signal.c
arch/tile/kernel/compat_signal.c
+2
-46
arch/tile/kernel/signal.c
arch/tile/kernel/signal.c
+2
-13
No files found.
arch/tile/Kconfig
View file @
47669ab0
...
...
@@ -21,6 +21,7 @@ config TILE
select ARCH_HAVE_NMI_SAFE_CMPXCHG
select GENERIC_CLOCKEVENTS
select MODULES_USE_ELF_RELA
select GENERIC_SIGALTSTACK
# FIXME: investigate whether we need/want these options.
# select HAVE_IOREMAP_PROT
...
...
arch/tile/include/asm/compat.h
View file @
47669ab0
...
...
@@ -281,8 +281,6 @@ long compat_sys_rt_sigaction(int sig, struct compat_sigaction __user *act,
long
compat_sys_rt_sigqueueinfo
(
int
pid
,
int
sig
,
struct
compat_siginfo
__user
*
uinfo
);
long
compat_sys_rt_sigreturn
(
void
);
long
compat_sys_sigaltstack
(
const
struct
compat_sigaltstack
__user
*
uss_ptr
,
struct
compat_sigaltstack
__user
*
uoss_ptr
);
long
compat_sys_truncate64
(
char
__user
*
filename
,
u32
dummy
,
u32
low
,
u32
high
);
long
compat_sys_ftruncate64
(
unsigned
int
fd
,
u32
dummy
,
u32
low
,
u32
high
);
long
compat_sys_pread64
(
unsigned
int
fd
,
char
__user
*
ubuf
,
size_t
count
,
...
...
arch/tile/include/asm/syscalls.h
View file @
47669ab0
...
...
@@ -64,9 +64,7 @@ long sys_ftruncate64(unsigned int fd, loff_t length);
/* Provide versions of standard syscalls that use current_pt_regs(). */
long
sys_rt_sigreturn
(
void
);
long
sys_sigaltstack
(
const
stack_t
__user
*
,
stack_t
__user
*
);
#define sys_rt_sigreturn sys_rt_sigreturn
#define sys_sigaltstack sys_sigaltstack
/* These are the intvec*.S trampolines. */
long
_sys_rt_sigreturn
(
void
);
...
...
arch/tile/kernel/compat_signal.c
View file @
47669ab0
...
...
@@ -41,12 +41,6 @@ struct compat_sigaction {
sigset_t
sa_mask
__packed
;
};
struct
compat_sigaltstack
{
compat_uptr_t
ss_sp
;
int
ss_flags
;
compat_size_t
ss_size
;
};
struct
compat_ucontext
{
compat_ulong_t
uc_flags
;
compat_uptr_t
uc_link
;
...
...
@@ -196,40 +190,6 @@ int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from)
return
err
;
}
long
compat_sys_sigaltstack
(
const
struct
compat_sigaltstack
__user
*
uss_ptr
,
struct
compat_sigaltstack
__user
*
uoss_ptr
)
{
stack_t
uss
,
uoss
;
int
ret
;
mm_segment_t
seg
;
if
(
uss_ptr
)
{
u32
ptr
;
memset
(
&
uss
,
0
,
sizeof
(
stack_t
));
if
(
!
access_ok
(
VERIFY_READ
,
uss_ptr
,
sizeof
(
*
uss_ptr
))
||
__get_user
(
ptr
,
&
uss_ptr
->
ss_sp
)
||
__get_user
(
uss
.
ss_flags
,
&
uss_ptr
->
ss_flags
)
||
__get_user
(
uss
.
ss_size
,
&
uss_ptr
->
ss_size
))
return
-
EFAULT
;
uss
.
ss_sp
=
compat_ptr
(
ptr
);
}
seg
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
do_sigaltstack
(
uss_ptr
?
(
stack_t
__user
__force
*
)
&
uss
:
NULL
,
(
stack_t
__user
__force
*
)
&
uoss
,
(
unsigned
long
)
compat_ptr
(
current_pt_regs
()
->
sp
));
set_fs
(
seg
);
if
(
ret
>=
0
&&
uoss_ptr
)
{
if
(
!
access_ok
(
VERIFY_WRITE
,
uoss_ptr
,
sizeof
(
*
uoss_ptr
))
||
__put_user
(
ptr_to_compat
(
uoss
.
ss_sp
),
&
uoss_ptr
->
ss_sp
)
||
__put_user
(
uoss
.
ss_flags
,
&
uoss_ptr
->
ss_flags
)
||
__put_user
(
uoss
.
ss_size
,
&
uoss_ptr
->
ss_size
))
ret
=
-
EFAULT
;
}
return
ret
;
}
/* The assembly shim for this function arranges to ignore the return value. */
long
compat_sys_rt_sigreturn
(
void
)
{
...
...
@@ -248,7 +208,7 @@ long compat_sys_rt_sigreturn(void)
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
goto
badframe
;
if
(
compat_
sys_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
)
==
-
EFAULT
)
if
(
compat_
restore_altstack
(
&
frame
->
uc
.
uc_stack
)
)
goto
badframe
;
return
0
;
...
...
@@ -325,11 +285,7 @@ int compat_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
err
|=
__clear_user
(
&
frame
->
save_area
,
sizeof
(
frame
->
save_area
));
err
|=
__put_user
(
0
,
&
frame
->
uc
.
uc_flags
);
err
|=
__put_user
(
0
,
&
frame
->
uc
.
uc_link
);
err
|=
__put_user
(
ptr_to_compat
((
void
*
)(
current
->
sas_ss_sp
)),
&
frame
->
uc
.
uc_stack
.
ss_sp
);
err
|=
__put_user
(
sas_ss_flags
(
regs
->
sp
),
&
frame
->
uc
.
uc_stack
.
ss_flags
);
err
|=
__put_user
(
current
->
sas_ss_size
,
&
frame
->
uc
.
uc_stack
.
ss_size
);
err
|=
__compat_save_altstack
(
&
frame
->
uc
.
uc_stack
,
regs
->
sp
);
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
regs
);
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
if
(
err
)
...
...
arch/tile/kernel/signal.c
View file @
47669ab0
...
...
@@ -37,13 +37,6 @@
#define DEBUG_SIG 0
SYSCALL_DEFINE2
(
sigaltstack
,
const
stack_t
__user
*
,
uss
,
stack_t
__user
*
,
uoss
)
{
return
do_sigaltstack
(
uss
,
uoss
,
current_pt_regs
()
->
sp
);
}
/*
* Do a signal return; undo the signal stack.
*/
...
...
@@ -100,7 +93,7 @@ SYSCALL_DEFINE0(rt_sigreturn)
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
goto
badframe
;
if
(
do_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
,
regs
->
sp
)
==
-
EFAULT
)
if
(
restore_altstack
(
&
frame
->
uc
.
uc_stack
)
)
goto
badframe
;
return
0
;
...
...
@@ -191,11 +184,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
err
|=
__clear_user
(
&
frame
->
save_area
,
sizeof
(
frame
->
save_area
));
err
|=
__put_user
(
0
,
&
frame
->
uc
.
uc_flags
);
err
|=
__put_user
(
NULL
,
&
frame
->
uc
.
uc_link
);
err
|=
__put_user
((
void
__user
*
)(
current
->
sas_ss_sp
),
&
frame
->
uc
.
uc_stack
.
ss_sp
);
err
|=
__put_user
(
sas_ss_flags
(
regs
->
sp
),
&
frame
->
uc
.
uc_stack
.
ss_flags
);
err
|=
__put_user
(
current
->
sas_ss_size
,
&
frame
->
uc
.
uc_stack
.
ss_size
);
err
|=
__save_altstack
(
&
frame
->
uc
.
uc_stack
,
regs
->
sp
);
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
regs
);
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_sigmask
,
set
,
sizeof
(
*
set
));
if
(
err
)
...
...
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