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
791612e9
Commit
791612e9
authored
Feb 15, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86: x32_setup_rt_frame(): consolidate uaccess areas
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
ead8e4e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
arch/x86/kernel/signal.c
arch/x86/kernel/signal.c
+5
-12
No files found.
arch/x86/kernel/signal.c
View file @
791612e9
...
@@ -517,7 +517,6 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
...
@@ -517,7 +517,6 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
struct
rt_sigframe_x32
__user
*
frame
;
struct
rt_sigframe_x32
__user
*
frame
;
unsigned
long
uc_flags
;
unsigned
long
uc_flags
;
void
__user
*
restorer
;
void
__user
*
restorer
;
int
err
=
0
;
void
__user
*
fp
=
NULL
;
void
__user
*
fp
=
NULL
;
if
(
!
(
ksig
->
ka
.
sa
.
sa_flags
&
SA_RESTORER
))
if
(
!
(
ksig
->
ka
.
sa
.
sa_flags
&
SA_RESTORER
))
...
@@ -525,14 +524,6 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
...
@@ -525,14 +524,6 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
frame
=
get_sigframe
(
&
ksig
->
ka
,
regs
,
sizeof
(
*
frame
),
&
fp
);
frame
=
get_sigframe
(
&
ksig
->
ka
,
regs
,
sizeof
(
*
frame
),
&
fp
);
if
(
!
access_ok
(
frame
,
sizeof
(
*
frame
)))
return
-
EFAULT
;
if
(
ksig
->
ka
.
sa
.
sa_flags
&
SA_SIGINFO
)
{
if
(
__copy_siginfo_to_user32
(
&
frame
->
info
,
&
ksig
->
info
,
true
))
return
-
EFAULT
;
}
uc_flags
=
frame_uc_flags
(
regs
);
uc_flags
=
frame_uc_flags
(
regs
);
if
(
!
user_access_begin
(
frame
,
sizeof
(
*
frame
)))
if
(
!
user_access_begin
(
frame
,
sizeof
(
*
frame
)))
...
@@ -546,11 +537,13 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
...
@@ -546,11 +537,13 @@ static int x32_setup_rt_frame(struct ksignal *ksig,
restorer
=
ksig
->
ka
.
sa
.
sa_restorer
;
restorer
=
ksig
->
ka
.
sa
.
sa_restorer
;
unsafe_put_user
(
restorer
,
(
unsigned
long
__user
*
)
&
frame
->
pretcode
,
Efault
);
unsafe_put_user
(
restorer
,
(
unsigned
long
__user
*
)
&
frame
->
pretcode
,
Efault
);
unsafe_put_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
fp
,
regs
,
set
,
Efault
);
unsafe_put_sigcontext
(
&
frame
->
uc
.
uc_mcontext
,
fp
,
regs
,
set
,
Efault
);
unsafe_put_user
(
*
(
__u64
*
)
set
,
(
__u64
__user
*
)
&
frame
->
uc
.
uc_sigmask
,
Efault
);
user_access_end
();
user_access_end
();
err
|=
__put_user
(
*
(
__u64
*
)
set
,
(
__u64
__user
*
)
&
frame
->
uc
.
uc_sigmask
);
if
(
err
)
if
(
ksig
->
ka
.
sa
.
sa_flags
&
SA_SIGINFO
)
{
return
-
EFAULT
;
if
(
__copy_siginfo_to_user32
(
&
frame
->
info
,
&
ksig
->
info
,
true
))
return
-
EFAULT
;
}
/* Set up registers for signal handler */
/* Set up registers for signal handler */
regs
->
sp
=
(
unsigned
long
)
frame
;
regs
->
sp
=
(
unsigned
long
)
frame
;
...
...
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