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
d0aab922
Commit
d0aab922
authored
Apr 27, 2009
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: Make access_ok() sideeffect proof.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
1699e5c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+13
-3
No files found.
arch/mips/include/asm/uaccess.h
View file @
d0aab922
...
@@ -104,11 +104,21 @@
...
@@ -104,11 +104,21 @@
#define __access_mask get_fs().seg
#define __access_mask get_fs().seg
#define __access_ok(addr, size, mask) \
#define __access_ok(addr, size, mask) \
(((signed long)((mask) & ((addr) | ((addr) + (size)) | __ua_size(size)))) == 0)
({ \
const volatile void __user *__up = addr; \
unsigned long __addr = (unsigned long) __up; \
unsigned long __size = size; \
unsigned long __mask = mask; \
unsigned long __ok; \
\
__ok = (signed long)(__mask & (__addr | (__addr + __size) | \
__ua_size(__size))); \
__ok == 0; \
})
#define access_ok(type, addr, size) \
#define access_ok(type, addr, size) \
likely(__access_ok((
unsigned long)(
addr), (size), __access_mask))
likely(__access_ok((addr), (size), __access_mask))
/*
/*
* put_user: - Write a simple value into user space.
* put_user: - Write a simple value into user space.
...
...
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