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
19dbf70c
Commit
19dbf70c
authored
Mar 21, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mn10300: switch to RAW_COPY_USER
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
4df3715e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
54 deletions
+5
-54
arch/mn10300/Kconfig
arch/mn10300/Kconfig
+1
-0
arch/mn10300/include/asm/uaccess.h
arch/mn10300/include/asm/uaccess.h
+4
-33
arch/mn10300/kernel/mn10300_ksyms.c
arch/mn10300/kernel/mn10300_ksyms.c
+0
-2
arch/mn10300/lib/usercopy.c
arch/mn10300/lib/usercopy.c
+0
-19
No files found.
arch/mn10300/Kconfig
View file @
19dbf70c
...
...
@@ -16,6 +16,7 @@ config MN10300
select OLD_SIGACTION
select HAVE_DEBUG_STACKOVERFLOW
select ARCH_NO_COHERENT_DMA_MMAP
select ARCH_HAS_RAW_COPY_USER
config AM33_2
def_bool n
...
...
arch/mn10300/include/asm/uaccess.h
View file @
19dbf70c
...
...
@@ -275,49 +275,20 @@ do { \
} \
} while (0)
/* We let the __ versions of copy_from/to_user inline, because they're often
* used in fast paths and have only a small space overhead.
*/
static
inline
unsigned
long
__copy_from_user_inatomic
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
raw_copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
__copy_user
(
to
,
from
,
n
);
return
n
;
}
static
inline
unsigned
long
__copy_to_user_inatomic
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
raw_copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
__copy_user
(
to
,
from
,
n
);
return
n
;
}
extern
unsigned
long
__generic_copy_to_user
(
void
__user
*
,
const
void
*
,
unsigned
long
);
extern
unsigned
long
__generic_copy_from_user
(
void
*
,
const
void
__user
*
,
unsigned
long
);
static
inline
unsigned
long
__copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
might_fault
();
return
__copy_to_user_inatomic
(
to
,
from
,
n
);
}
static
inline
unsigned
long
__copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
might_fault
();
return
__copy_from_user_inatomic
(
to
,
from
,
n
);
}
#define copy_to_user(to, from, n) __generic_copy_to_user((to), (from), (n))
#define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
extern
long
strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
extern
long
__strncpy_from_user
(
char
*
dst
,
const
char
__user
*
src
,
long
count
);
extern
long
strnlen_user
(
const
char
__user
*
str
,
long
n
);
...
...
arch/mn10300/kernel/mn10300_ksyms.c
View file @
19dbf70c
...
...
@@ -26,8 +26,6 @@ EXPORT_SYMBOL(strncpy_from_user);
EXPORT_SYMBOL
(
__strncpy_from_user
);
EXPORT_SYMBOL
(
clear_user
);
EXPORT_SYMBOL
(
__clear_user
);
EXPORT_SYMBOL
(
__generic_copy_from_user
);
EXPORT_SYMBOL
(
__generic_copy_to_user
);
EXPORT_SYMBOL
(
strnlen_user
);
extern
u64
__ashrdi3
(
u64
,
unsigned
);
...
...
arch/mn10300/lib/usercopy.c
View file @
19dbf70c
...
...
@@ -11,25 +11,6 @@
*/
#include <linux/uaccess.h>
unsigned
long
__generic_copy_to_user
(
void
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
if
(
access_ok
(
VERIFY_WRITE
,
to
,
n
))
__copy_user
(
to
,
from
,
n
);
return
n
;
}
unsigned
long
__generic_copy_from_user
(
void
*
to
,
const
void
*
from
,
unsigned
long
n
)
{
unsigned
long
res
=
n
;
if
(
access_ok
(
VERIFY_READ
,
from
,
res
))
__copy_user
(
to
,
from
,
res
);
if
(
unlikely
(
res
))
memset
(
to
+
n
-
res
,
0
,
res
);
return
res
;
}
/*
* Copy a null terminated string from userspace.
*/
...
...
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