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
4855bd25
Commit
4855bd25
authored
Sep 10, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arm64: don't zero in __copy_from_user{,_inatomic}
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
91344493
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
arch/arm64/include/asm/uaccess.h
arch/arm64/include/asm/uaccess.h
+6
-4
arch/arm64/lib/copy_from_user.S
arch/arm64/lib/copy_from_user.S
+1
-6
No files found.
arch/arm64/include/asm/uaccess.h
View file @
4855bd25
...
@@ -278,14 +278,16 @@ static inline unsigned long __must_check __copy_to_user(void __user *to, const v
...
@@ -278,14 +278,16 @@ static inline unsigned long __must_check __copy_to_user(void __user *to, const v
static
inline
unsigned
long
__must_check
copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
__must_check
copy_from_user
(
void
*
to
,
const
void
__user
*
from
,
unsigned
long
n
)
{
{
unsigned
long
res
=
n
;
kasan_check_write
(
to
,
n
);
kasan_check_write
(
to
,
n
);
if
(
access_ok
(
VERIFY_READ
,
from
,
n
))
{
if
(
access_ok
(
VERIFY_READ
,
from
,
n
))
{
check_object_size
(
to
,
n
,
false
);
check_object_size
(
to
,
n
,
false
);
n
=
__arch_copy_from_user
(
to
,
from
,
n
);
res
=
__arch_copy_from_user
(
to
,
from
,
n
);
}
else
/* security hole - plug it */
}
memset
(
to
,
0
,
n
);
if
(
unlikely
(
res
))
return
n
;
memset
(
to
+
(
n
-
res
),
0
,
res
);
return
res
;
}
}
static
inline
unsigned
long
__must_check
copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
static
inline
unsigned
long
__must_check
copy_to_user
(
void
__user
*
to
,
const
void
*
from
,
unsigned
long
n
)
...
...
arch/arm64/lib/copy_from_user.S
View file @
4855bd25
...
@@ -79,11 +79,6 @@ ENDPROC(__arch_copy_from_user)
...
@@ -79,11 +79,6 @@ ENDPROC(__arch_copy_from_user)
.
section
.
fixup
,
"ax"
.
section
.
fixup
,
"ax"
.
align
2
.
align
2
9998
:
9998
:
sub
x0
,
end
,
dst
//
bytes
not
copied
sub
x0
,
end
,
dst
9999
:
strb
wzr
,
[
dst
],
#
1
//
zero
remaining
buffer
space
cmp
dst
,
end
b.lo
9999
b
ret
ret
.
previous
.
previous
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