Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
ed01b3d2
Commit
ed01b3d2
authored
Apr 27, 2009
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIPS: Make uaccess.h slightly more sparse friendly.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
d0aab922
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
12 deletions
+27
-12
arch/mips/include/asm/uaccess.h
arch/mips/include/asm/uaccess.h
+27
-12
No files found.
arch/mips/include/asm/uaccess.h
View file @
ed01b3d2
...
...
@@ -104,17 +104,17 @@
#define __access_mask get_fs().seg
#define __access_ok(addr, size, mask)
\
({
\
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(addr, size, mask) \
({ \
unsigned long __addr = (unsigned long) (addr);
\
unsigned long __
size = size
; \
unsigned long __
mask = mask;
\
unsigned long __
ok;
\
\
__chk_user_ptr(addr);
\
__ok = (signed long)(__mask & (__addr | (__addr + __size) | \
__ua_size(__size))); \
__ok == 0; \
})
#define access_ok(type, addr, size) \
...
...
@@ -235,6 +235,7 @@ do { \
({ \
int __gu_err; \
\
__chk_user_ptr(ptr); \
__get_user_common((x), size, ptr); \
__gu_err; \
})
...
...
@@ -315,6 +316,7 @@ do { \
__typeof__(*(ptr)) __pu_val; \
int __pu_err = 0; \
\
__chk_user_ptr(ptr); \
__pu_val = (x); \
switch (size) { \
case 1: __put_user_asm("sb", ptr); break; \
...
...
@@ -882,7 +884,20 @@ extern size_t __copy_user_inatomic(void *__to, const void *__from, size_t __n);
__cu_len; \
})
#define __copy_in_user(to, from, n) __copy_from_user(to, from, n)
#define __copy_in_user(to, from, n) \
({ \
void __user *__cu_to; \
const void __user *__cu_from; \
long __cu_len; \
\
might_sleep(); \
__cu_to = (to); \
__cu_from = (from); \
__cu_len = (n); \
__cu_len = __invoke_copy_from_user(__cu_to, __cu_from, \
__cu_len); \
__cu_len; \
})
#define copy_in_user(to, from, n) \
({ \
...
...
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