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
f438e605
Commit
f438e605
authored
Sep 24, 2003
by
Kumar Gala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PPC32; Added "user64" versions of the user access functions that allow
modification of 64-bit data.
parent
5d777edb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
include/asm-ppc/uaccess.h
include/asm-ppc/uaccess.h
+14
-3
No files found.
include/asm-ppc/uaccess.h
View file @
f438e605
...
...
@@ -81,7 +81,7 @@ extern void sort_exception_table(void);
* exception handling means that it's no longer "just"...)
*
* The "user64" versions of the user access functions are versions that
* allow
modification
of 64-bit data. The "get_user" functions do not
* allow
access
of 64-bit data. The "get_user" functions do not
* properly handle 64-bit data because the value gets down cast to a long.
* The "put_user" functions already handle 64-bit data properly but we add
* "user64" versions for completeness
...
...
@@ -184,7 +184,7 @@ struct __large_struct { unsigned long buf[100]; };
({ \
long __gu_err; \
long long __gu_val; \
__get_user_size(__gu_val,(ptr),(size),__gu_err); \
__get_user_size
64
(__gu_val,(ptr),(size),__gu_err); \
(x) = (__typeof__(*(ptr)))__gu_val; \
__gu_err; \
})
...
...
@@ -205,7 +205,7 @@ struct __large_struct { unsigned long buf[100]; };
long long __gu_val = 0; \
const __typeof__(*(ptr)) *__gu_addr = (ptr); \
if (access_ok(VERIFY_READ,__gu_addr,size)) \
__get_user_size(__gu_val,__gu_addr,(size),__gu_err); \
__get_user_size
64
(__gu_val,__gu_addr,(size),__gu_err); \
(x) = (__typeof__(*(ptr)))__gu_val; \
__gu_err; \
})
...
...
@@ -213,6 +213,17 @@ struct __large_struct { unsigned long buf[100]; };
extern
long
__get_user_bad
(
void
);
#define __get_user_size(x,ptr,size,retval) \
do { \
retval = 0; \
switch (size) { \
case 1: __get_user_asm(x,ptr,retval,"lbz"); break; \
case 2: __get_user_asm(x,ptr,retval,"lhz"); break; \
case 4: __get_user_asm(x,ptr,retval,"lwz"); break; \
default: (x) = __get_user_bad(); \
} \
} while (0)
#define __get_user_size64(x,ptr,size,retval) \
do { \
retval = 0; \
switch (size) { \
...
...
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