Skip to content

Commit 1c7e17b

Browse files
davem330gregkh
authored andcommitted
sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.
[ Upstream commit ee841d0aff649164080e445e84885015958d8ff4 ] Report the exact number of bytes which have not been successfully copied when an exception occurs, using the running remaining length. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7181969 commit 1c7e17b

3 files changed

Lines changed: 162 additions & 81 deletions

File tree

arch/sparc/lib/U3copy_from_user.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
* Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
44
*/
55

6-
#define EX_LD(x) \
6+
#define EX_LD(x,y) \
77
98: x; \
88
.section __ex_table,"a";\
99
.align 4; \
10-
.word 98b, __retl_mone; \
10+
.word 98b, y; \
1111
.text; \
1212
.align 4;
1313

14-
#define EX_LD_FP(x) \
14+
#define EX_LD_FP(x,y) \
1515
98: x; \
1616
.section __ex_table,"a";\
1717
.align 4; \
18-
.word 98b, __retl_mone_fp;\
18+
.word 98b, y##_fp; \
1919
.text; \
2020
.align 4;
2121

arch/sparc/lib/U3copy_to_user.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
* Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
44
*/
55

6-
#define EX_ST(x) \
6+
#define EX_ST(x,y) \
77
98: x; \
88
.section __ex_table,"a";\
99
.align 4; \
10-
.word 98b, __retl_mone; \
10+
.word 98b, y; \
1111
.text; \
1212
.align 4;
1313

14-
#define EX_ST_FP(x) \
14+
#define EX_ST_FP(x,y) \
1515
98: x; \
1616
.section __ex_table,"a";\
1717
.align 4; \
18-
.word 98b, __retl_mone_fp;\
18+
.word 98b, y##_fp; \
1919
.text; \
2020
.align 4;
2121

0 commit comments

Comments
 (0)