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
66aa3880
Commit
66aa3880
authored
Jul 12, 2020
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
m68k: get rid of zeroing destination on error in csum_and_copy_from_user()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
1d60be3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
64 deletions
+15
-64
arch/m68k/lib/checksum.c
arch/m68k/lib/checksum.c
+15
-64
No files found.
arch/m68k/lib/checksum.c
View file @
66aa3880
...
...
@@ -236,82 +236,33 @@ csum_and_copy_from_user(const void __user *src, void *dst, int len)
"clrl %5
\n\t
"
"addxl %5,%0
\n\t
"
/* add X bit */
"7:
\t
"
"clrl %5
\n
"
/* no error - clear return value */
"8:
\n
"
".section .fixup,
\"
ax
\"\n
"
".even
\n
"
/* If any exception occurs zero out the rest.
Similarities with the code above are intentional :-) */
/* If any exception occurs, return 0 */
"90:
\t
"
"clrw %3@+
\n\t
"
"movel %1,%4
\n\t
"
"lsrl #5,%1
\n\t
"
"jeq 1f
\n\t
"
"subql #1,%1
\n
"
"91:
\t
"
"clrl %3@+
\n
"
"92:
\t
"
"clrl %3@+
\n
"
"93:
\t
"
"clrl %3@+
\n
"
"94:
\t
"
"clrl %3@+
\n
"
"95:
\t
"
"clrl %3@+
\n
"
"96:
\t
"
"clrl %3@+
\n
"
"97:
\t
"
"clrl %3@+
\n
"
"98:
\t
"
"clrl %3@+
\n\t
"
"dbra %1,91b
\n\t
"
"clrw %1
\n\t
"
"subql #1,%1
\n\t
"
"jcc 91b
\n
"
"1:
\t
"
"movel %4,%1
\n\t
"
"andw #0x1c,%4
\n\t
"
"jeq 1f
\n\t
"
"lsrw #2,%4
\n\t
"
"subqw #1,%4
\n
"
"99:
\t
"
"clrl %3@+
\n\t
"
"dbra %4,99b
\n\t
"
"1:
\t
"
"andw #3,%1
\n\t
"
"jeq 9f
\n
"
"100:
\t
"
"clrw %3@+
\n\t
"
"tstw %1
\n\t
"
"jeq 9f
\n
"
"101:
\t
"
"clrb %3@+
\n
"
"9:
\t
"
#define STR(X) STR1(X)
#define STR1(X) #X
"moveq #-"
STR
(
EFAULT
)
",%5
\n\t
"
"jra 8b
\n
"
"clrl %0
\n
"
"jra 7b
\n
"
".previous
\n
"
".section __ex_table,
\"
a
\"\n
"
".long 10b,90b
\n
"
".long 11b,9
1
b
\n
"
".long 12b,9
2
b
\n
"
".long 13b,9
3
b
\n
"
".long 14b,9
4
b
\n
"
".long 15b,9
5
b
\n
"
".long 16b,9
6
b
\n
"
".long 17b,9
7
b
\n
"
".long 18b,9
8
b
\n
"
".long 19b,9
9
b
\n
"
".long 20b,
10
0b
\n
"
".long 21b,
101
b
\n
"
".long 11b,9
0
b
\n
"
".long 12b,9
0
b
\n
"
".long 13b,9
0
b
\n
"
".long 14b,9
0
b
\n
"
".long 15b,9
0
b
\n
"
".long 16b,9
0
b
\n
"
".long 17b,9
0
b
\n
"
".long 18b,9
0
b
\n
"
".long 19b,9
0
b
\n
"
".long 20b,
9
0b
\n
"
".long 21b,
90
b
\n
"
".previous"
:
"=d"
(
sum
),
"=d"
(
len
),
"=a"
(
src
),
"=a"
(
dst
),
"=&d"
(
tmp1
),
"=d"
(
tmp2
)
:
"0"
(
sum
),
"1"
(
len
),
"2"
(
src
),
"3"
(
dst
)
);
return
tmp2
?
0
:
sum
;
return
sum
;
}
EXPORT_SYMBOL
(
csum_and_copy_from_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