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
12097b81
Commit
12097b81
authored
Jun 10, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Add ucontext bits for sigaltstack handling.
parent
3c3daf31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
arch/arm/kernel/signal.c
arch/arm/kernel/signal.c
+12
-2
No files found.
arch/arm/kernel/signal.c
View file @
12097b81
...
@@ -253,6 +253,9 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
...
@@ -253,6 +253,9 @@ asmlinkage int sys_rt_sigreturn(struct pt_regs *regs)
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
if
(
restore_sigcontext
(
regs
,
&
frame
->
uc
.
uc_mcontext
))
goto
badframe
;
goto
badframe
;
if
(
do_sigaltstack
(
&
frame
->
uc
.
uc_stack
,
NULL
,
regs
->
ARM_sp
)
==
-
EFAULT
)
goto
badframe
;
/* Send SIGTRAP if we're single-stepping */
/* Send SIGTRAP if we're single-stepping */
if
(
current
->
ptrace
&
PT_SINGLESTEP
)
{
if
(
current
->
ptrace
&
PT_SINGLESTEP
)
{
ptrace_cancel_bpt
(
current
);
ptrace_cancel_bpt
(
current
);
...
@@ -402,6 +405,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
...
@@ -402,6 +405,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
sigset_t
*
set
,
struct
pt_regs
*
regs
)
sigset_t
*
set
,
struct
pt_regs
*
regs
)
{
{
struct
rt_sigframe
__user
*
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
struct
rt_sigframe
__user
*
frame
=
get_sigframe
(
ka
,
regs
,
sizeof
(
*
frame
));
stack_t
stack
;
int
err
=
0
;
int
err
=
0
;
if
(
!
access_ok
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
)))
if
(
!
access_ok
(
VERIFY_WRITE
,
frame
,
sizeof
(
*
frame
)))
...
@@ -411,8 +415,14 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
...
@@ -411,8 +415,14 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
__put_user_error
(
&
frame
->
uc
,
&
frame
->
puc
,
err
);
__put_user_error
(
&
frame
->
uc
,
&
frame
->
puc
,
err
);
err
|=
copy_siginfo_to_user
(
&
frame
->
info
,
info
);
err
|=
copy_siginfo_to_user
(
&
frame
->
info
,
info
);
/* Clear all the bits of the ucontext we don't use. */
__put_user_error
(
0
,
&
frame
->
uc
.
uc_flags
,
err
);
err
|=
__clear_user
(
&
frame
->
uc
,
offsetof
(
struct
ucontext
,
uc_mcontext
));
__put_user_error
(
NULL
,
&
frame
->
uc
.
uc_link
,
err
);
memset
(
&
stack
,
0
,
sizeof
(
stack
));
stack
.
ss_sp
=
(
void
*
)
current
->
sas_ss_sp
;
stack
.
ss_flags
=
sas_ss_flags
(
regs
->
ARM_sp
);
stack
.
ss_size
=
current
->
sas_ss_size
;
err
|=
__copy_to_user
(
&
frame
->
uc
.
uc_stack
,
&
stack
,
sizeof
(
stack
));
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
/*&frame->fpstate,*/
err
|=
setup_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
/*&frame->fpstate,*/
regs
,
set
->
sig
[
0
]);
regs
,
set
->
sig
[
0
]);
...
...
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