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
Kirill Smelkov
linux
Commits
81029b1f
Commit
81029b1f
authored
Sep 03, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mn10300: finish verify_area() off
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
08435d89
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
arch/mn10300/include/asm/uaccess.h
arch/mn10300/include/asm/uaccess.h
+0
-6
arch/mn10300/kernel/signal.c
arch/mn10300/kernel/signal.c
+3
-3
No files found.
arch/mn10300/include/asm/uaccess.h
View file @
81029b1f
...
...
@@ -72,12 +72,6 @@ static inline int ___range_ok(unsigned long addr, unsigned int size)
#define access_ok(type, addr, size) (__range_ok((addr), (size)) == 0)
#define __access_ok(addr, size) (__range_ok((addr), (size)) == 0)
static
inline
int
verify_area
(
int
type
,
const
void
*
addr
,
unsigned
long
size
)
{
return
access_ok
(
type
,
addr
,
size
)
?
0
:
-
EFAULT
;
}
/*
* The exception table consists of pairs of addresses: the first is the
* address of an instruction that is allowed to fault, and the second is
...
...
arch/mn10300/kernel/signal.c
View file @
81029b1f
...
...
@@ -75,7 +75,7 @@ static int restore_sigcontext(struct pt_regs *regs,
struct
fpucontext
*
buf
;
err
|=
__get_user
(
buf
,
&
sc
->
fpucontext
);
if
(
buf
)
{
if
(
verify_area
(
VERIFY_READ
,
buf
,
sizeof
(
*
buf
)))
if
(
!
access_ok
(
VERIFY_READ
,
buf
,
sizeof
(
*
buf
)))
goto
badframe
;
err
|=
fpu_restore_sigcontext
(
buf
);
}
...
...
@@ -98,7 +98,7 @@ asmlinkage long sys_sigreturn(void)
long
d0
;
frame
=
(
struct
sigframe
__user
*
)
current_frame
()
->
sp
;
if
(
verify_area
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
if
(
!
access_ok
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
if
(
__get_user
(
set
.
sig
[
0
],
&
frame
->
sc
.
oldmask
))
goto
badframe
;
...
...
@@ -130,7 +130,7 @@ asmlinkage long sys_rt_sigreturn(void)
long
d0
;
frame
=
(
struct
rt_sigframe
__user
*
)
current_frame
()
->
sp
;
if
(
verify_area
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
if
(
!
access_ok
(
VERIFY_READ
,
frame
,
sizeof
(
*
frame
)))
goto
badframe
;
if
(
__copy_from_user
(
&
set
,
&
frame
->
uc
.
uc_sigmask
,
sizeof
(
set
)))
goto
badframe
;
...
...
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