File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ int strcmp(const char *cs, const char *ct);
87
87
*
88
88
* Low level memory copy function that catches machine checks
89
89
*
90
- * Return true for success, false for fail
90
+ * Return 0 for success, -EFAULT for fail
91
91
*/
92
- bool memcpy_mcsafe (void * dst , const void * src , size_t cnt );
92
+ int memcpy_mcsafe (void * dst , const void * src , size_t cnt );
93
93
94
94
#endif /* __KERNEL__ */
95
95
Original file line number Diff line number Diff line change 1
1
/* Copyright 2002 Andi Kleen */
2
2
3
3
#include <linux/linkage.h>
4
+ #include <asm/errno.h>
4
5
#include <asm/cpufeatures.h>
5
6
#include <asm/alternative-asm.h>
6
7
@@ -268,16 +269,16 @@ ENTRY(memcpy_mcsafe)
268
269
decl %ecx
269
270
jnz .L_copy_trailing_bytes
270
271
271
- /* Copy successful. Return true */
272
+ /* Copy successful. Return zero */
272
273
.L_done_memcpy_trap:
273
274
xorq %rax , %rax
274
275
ret
275
276
ENDPROC(memcpy_mcsafe)
276
277
277
278
.section .fixup, "ax"
278
- /* Return false for any failure */
279
+ /* Return -EFAULT for any failure */
279
280
.L_memcpy_mcsafe_fail:
280
- mov $1 , %rax
281
+ mov $-EFAULT , %rax
281
282
ret
282
283
283
284
.previous
You can’t perform that action at this time.
0 commit comments