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
ac4691fa
Commit
ac4691fa
authored
Mar 28, 2017
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hexagon: switch to RAW_COPY_USER
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d597580d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
17 deletions
+15
-17
arch/hexagon/Kconfig
arch/hexagon/Kconfig
+1
-0
arch/hexagon/include/asm/uaccess.h
arch/hexagon/include/asm/uaccess.h
+10
-13
arch/hexagon/kernel/hexagon_ksyms.c
arch/hexagon/kernel/hexagon_ksyms.c
+2
-2
arch/hexagon/mm/copy_from_user.S
arch/hexagon/mm/copy_from_user.S
+1
-1
arch/hexagon/mm/copy_to_user.S
arch/hexagon/mm/copy_to_user.S
+1
-1
No files found.
arch/hexagon/Kconfig
View file @
ac4691fa
...
...
@@ -26,6 +26,7 @@ config HEXAGON
select GENERIC_CLOCKEVENTS_BROADCAST
select MODULES_USE_ELF_RELA
select GENERIC_CPU_DEVICES
select ARCH_HAS_RAW_COPY_USER
---help---
Qualcomm Hexagon is a processor architecture designed for high
performance and low power across a wide variety of applications.
...
...
arch/hexagon/include/asm/uaccess.h
View file @
ac4691fa
...
...
@@ -65,19 +65,12 @@
*/
/* Assembly somewhat optimized copy routines */
unsigned
long
__copy_from_user_hexagon
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
raw_copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
);
unsigned
long
__copy_to_user_hexagon
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
raw_copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
);
#define __copy_from_user(to, from, n) __copy_from_user_hexagon(to, from, n)
#define __copy_to_user(to, from, n) __copy_to_user_hexagon(to, from, n)
/*
* XXX todo: some additonal performance gain is possible by
* implementing __copy_to/from_user_inatomic, which is much
* like __copy_to/from_user, but performs slightly less checking.
*/
#define INLINE_COPY_FROM_USER
#define INLINE_COPY_TO_USER
__kernel_size_t
__clear_user_hexagon
(
void
__user
*
dest
,
unsigned
long
count
);
#define __clear_user(a, s) __clear_user_hexagon((a), (s))
...
...
@@ -104,10 +97,14 @@ static inline long hexagon_strncpy_from_user(char *dst, const char __user *src,
return
-
EFAULT
;
if
(
res
>
n
)
{
copy_from_user
(
dst
,
src
,
n
);
long
left
=
raw_copy_from_user
(
dst
,
src
,
n
);
if
(
unlikely
(
left
))
memset
(
dst
+
(
n
-
left
),
0
,
left
);
return
n
;
}
else
{
copy_from_user
(
dst
,
src
,
res
);
long
left
=
raw_copy_from_user
(
dst
,
src
,
res
);
if
(
unlikely
(
left
))
memset
(
dst
+
(
res
-
left
),
0
,
left
);
return
res
-
1
;
}
}
...
...
arch/hexagon/kernel/hexagon_ksyms.c
View file @
ac4691fa
...
...
@@ -25,8 +25,8 @@
/* Additional functions */
EXPORT_SYMBOL
(
__clear_user_hexagon
);
EXPORT_SYMBOL
(
__copy_from_user_hexagon
);
EXPORT_SYMBOL
(
__copy_to_user_hexagon
);
EXPORT_SYMBOL
(
raw_copy_from_user
);
EXPORT_SYMBOL
(
raw_copy_to_user
);
EXPORT_SYMBOL
(
__iounmap
);
EXPORT_SYMBOL
(
__strnlen_user
);
EXPORT_SYMBOL
(
__vmgetie
);
...
...
arch/hexagon/mm/copy_from_user.S
View file @
ac4691fa
...
...
@@ -44,7 +44,7 @@
#define bytes r2
#define loopcount r5
#define FUNCNAME
__copy_from_user_hexagon
#define FUNCNAME
raw_copy_from_user
#include "copy_user_template.S"
/
*
LOAD
FAULTS
from
COPY_FROM_USER
*/
...
...
arch/hexagon/mm/copy_to_user.S
View file @
ac4691fa
...
...
@@ -43,7 +43,7 @@
#define bytes r2
#define loopcount r5
#define FUNCNAME
__copy_to_user_hexagon
#define FUNCNAME
raw_copy_to_user
#include "copy_user_template.S"
/
*
STORE
FAULTS
from
COPY_TO_USER
*/
...
...
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