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
Kirill Smelkov
linux
Commits
da2af0a7
Commit
da2af0a7
authored
Aug 03, 2010
by
Jesper Nilsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CRIS: __do_strncpy_from_user: Don't read the byte beyond the nil
Signed-off-by:
Jesper Nilsson
<
jesper.nilsson@axis.com
>
parent
2dc1c40c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
arch/cris/include/arch-v32/arch/uaccess.h
arch/cris/include/arch-v32/arch/uaccess.h
+3
-4
No files found.
arch/cris/include/arch-v32/arch/uaccess.h
View file @
da2af0a7
...
...
@@ -122,14 +122,14 @@ __do_strncpy_from_user(char *dst, const char *src, long count)
__asm__
__volatile__
(
" move.d %3,%0
\n
"
"5: move.b [%2+],$acr
\n
"
"1: beq
2
f
\n
"
"1: beq
6
f
\n
"
" move.b $acr,[%1+]
\n
"
" subq 1,%0
\n
"
"2: bne 1b
\n
"
" move.b [%2+],$acr
\n
"
" sub.d %3,%0
\n
"
"
6:
sub.d %3,%0
\n
"
" neg.d %0,%0
\n
"
"3:
\n
"
" .section .fixup,
\"
ax
\"\n
"
...
...
@@ -140,8 +140,7 @@ __do_strncpy_from_user(char *dst, const char *src, long count)
/* The address for a fault at the first move is trivial.
The address for a fault at the second move is that of
the preceding branch insn, since the move insn is in
its delay-slot. That address is also a branch
target. Just so you don't get confused... */
its delay-slot. Just so you don't get confused... */
" .previous
\n
"
" .section __ex_table,
\"
a
\"\n
"
" .dword 5b,4b
\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